Skip to content

Instantly share code, notes, and snippets.

@mgttt
Created May 15, 2016 15:15
Show Gist options
  • Save mgttt/02282e582371dd4970aacf5436d1002b to your computer and use it in GitHub Desktop.
Save mgttt/02282e582371dd4970aacf5436d1002b to your computer and use it in GitHub Desktop.
{eval $html_title="login (".getConf("CONFIG_TYPE").")";
}{inc inc.common.header.htm}
<script>
{eval
//mini js page needed
print jsa_enc_txt(array(
"src.onerror.js",//page global error handling
"../weblib/src.mg_cookie.js",//my_cookie and my_trim
"../weblib/src.mg.miniajax2014.js",//mini ajax
"../weblib/src.common.js",//shtml_load_page_data and other funcs
));
}
</script>
{* async get page data *}
<script>
window['tenant_code']={eval print my_json_encode(getConf("tenant_code"));};
shtml_load_page_data("login");
</script>
{* main css *}
<style>
{eval
print cssa_enc_txt(array(
"src.login.css"
));
}
</style>
{* main tpl *}
{eval include(TPL("tpl.login.htm"));}
<script src="../weblib/jquery.1.8.3.min.js" comment="IE6/7/8 need jq lt 1.9"></script>
<script>
{eval
print jsa_enc_txt(array(
"../weblib/src.mg_core.js",//一些很常用的函数
"../weblib/src.mg.aj.2014.js",
"../_xxtea/bigint.js",
"../_xxtea/md5.js",
"../_xxtea/utf_mgfix.js",//分號fix
"../_xxtea/base64.js",
"../_xxtea/xxtea_mgfix.js",//主要是fix了些分號位置,否則加密失敗...
"src.login.js",
"../weblib/src.lazyload.js",
));
}
//async js load
setTimeout(function(){
LazyLoad.css('../jqeasyui1.4/themes/default/easyui.css', function (){
}, null, {foo: 'bar1'});
LazyLoad.css('../jqeasyui1.4/themes/icon.css', function (){
}, null, {foo: 'bar2'});
LazyLoad.js('../jqeasyui1.4/jquery.easyui.min.js', function (){
}, null, {foo: 'bar3'});
},1111);
</script>
{inc inc.common.end.htm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment