index.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE HTML>
  2. <html manifest="">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10, user-scalable=yes">
  7. <title>uas</title>
  8. <link rel="icon" href="./resources/images/favicon.png" type="image/x-icon">
  9. <!-- The line below must be kept intact for Sencha Cmd to build your application -->
  10. <script type="text/javascript">
  11. /**
  12. * [setCookie 设置cookie]
  13. */
  14. function setCookie(key,value,t){
  15. var oDate=new Date();
  16. oDate.setDate(oDate.getDate()+t);
  17. document.cookie=key+"="+value+"; expires="+oDate.toDateString();
  18. }
  19. /**
  20. * [getCookie 获取cookie]
  21. */
  22. function getCookie(key){
  23. var arr1=document.cookie.split("; ");//由于cookie是通过一个分号+空格的形式串联起来的,所以这里需要先按分号空格截断,变成[name=Jack,pwd=123456,age=22]数组类型;
  24. for(var i=0;i<arr1.length;i++){
  25. var arr2=arr1[i].split("=");//通过=截断,把name=Jack截断成[name,Jack]数组;
  26. if(arr2[0]==key){
  27. return decodeURI(arr2[1]);
  28. }
  29. }
  30. }
  31. /**
  32. * [removeCookie 移除cookie]
  33. */
  34. function removeCookie(key){
  35. setCookie(key,"",-1); // 把cookie设置为过期
  36. };
  37. </script>
  38. <script type=text/javascript>
  39. var Ext = Ext || {};
  40. Ext.beforeLoad = function(tags) {
  41. var theme = getCookie('theme');
  42. if(!theme){
  43. setCookie('theme',"triton",0);
  44. theme = 'triton';
  45. }
  46. console.log('加载系统主题方案:' + theme);
  47. var locale = getCookie('locale');
  48. if(!locale){
  49. setCookie('locale',"zh_CN",0);
  50. locale = 'zh_CN';
  51. }
  52. console.log('加载语言包:' + locale);
  53. Ext.manifest = theme + '-' + locale + '.json'; };
  54. </script>
  55. <script id="microloader" data-app="87100719-3701-4a39-9b0f-ed5f99833426" type="text/javascript" src="bootstrap.js"></script>
  56. </head>
  57. <body></body>
  58. </html>