setting.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>系统设置</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="../../css/mui.min.css" rel="stylesheet" />
  8. <link href="../../css/iconfont.css" rel="stylesheet" />
  9. <link href="../../css/animate.min.css" rel="stylesheet" />
  10. <style>
  11. .mui-content{margin-top: 54px;}
  12. .mui-table-view-cell>a:not(.mui-btn){color: #818181;}
  13. .mui-table-view-cell{padding: 13px;text-align: left;border-bottom: 1px solid #efefef;font-size: 15px;}
  14. .mui-table-view-cell:last-child{border: 0px;}
  15. .mui-table-view:before{background-color: rgba(200, 199, 204, 0);}
  16. .mui-table-view:after{background-color: rgba(200, 199, 204, 0);}
  17. .mui-table-view-cell:after{background-color: rgba(200, 199, 204, 0);}
  18. .mui-pull-right{margin-right: 20px;font-size: 14px;color: darkgray;}
  19. .bg{padding: 10px;text-align: center;}
  20. .m_box {padding: 10px 10px 60px 10px;margin-top: -20px;box-shadow: 0 1px 6px #dbdbdb;}
  21. .btn{width: 230px;margin-top: -21px;}
  22. .icon{margin-right: 10px;font-size: 20px;font-weight: bold;}
  23. </style>
  24. </head>
  25. <body>
  26. <header class="mui-bar mui-bar-nav">
  27. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  28. <h1 class="mui-title">系统设置</h1>
  29. </header>
  30. <div class="mui-content bg animated fadeInUp">
  31. <div class="m_box">
  32. <ul class="mui-table-view">
  33. <li class="mui-table-view-cell" style="margin-top: -10px;">
  34. <a class="mui-navigate-right" onclick="op(5)"><span class="mui-pull-right" id="cache">20M</span><i class="icon iconfont icon-qingchuhuancun"></i>清理缓存</a>
  35. </li>
  36. <li class="mui-table-view-cell">
  37. <a class="mui-navigate-right"><span class="mui-pull-right">v 1.0.0</span><i class="icon iconfont icon-banbenjiance"></i>当前版本</a>
  38. </li>
  39. <li class="mui-table-view-cell">
  40. <a class="mui-navigate-right" onclick="op(1)"><span class="mui-pull-right" id="phone"></span><i class="icon iconfont icon-service-phone"></i>客服电话</a>
  41. </li>
  42. <li class="mui-table-view-cell">
  43. <a class="mui-navigate-right" onclick="op(2)"><span class="mui-pull-right">党建扶贫</span><i class="icon iconfont icon-guanyu"></i>关于</a>
  44. </li>
  45. </ul>
  46. </div>
  47. <button class="btn" onclick="op(3)">退出登录</button>
  48. </div>
  49. <script src="../../js/mui.min.js"></script>
  50. <script src="../../js/app.js" ></script>
  51. <script type="text/javascript">
  52. mui.plusReady(function() {
  53. var cache = document.getElementById("cache");
  54. plus.cache.calculate(function(size) {
  55. var s = size / 1024 / 1024
  56. cache.innerHTML = s.toFixed(1) + 'M';
  57. });
  58. })
  59. document.getElementById("phone").innerText=getConstant().phone;
  60. //操作
  61. function op(flag) {
  62. switch(flag) {
  63. case 1:
  64. plus.device.dial(getConstant().phone, false);
  65. break;
  66. case 2:
  67. open('about', 'about.html', null, 'slide-in-bottom');
  68. break;
  69. case 3:
  70. mui.confirm('是否退出登录?', '提示', ['否', '是'], function(e) {
  71. if(e.index == 1) {
  72. localStorage.removeItem("user");
  73. localStorage.removeItem("token");
  74. plus.webview.getWebviewById('tab/mine.html').reload(true);
  75. mui.back();
  76. }
  77. })
  78. break;
  79. case 5:
  80. mui.confirm('是否清除缓存?', '提示', ['否', '是'], function(e) {
  81. if(e.index == 1) {
  82. plus.cache.clear(function() {
  83. mui.alert("清除成功!");
  84. document.getElementById("cache").innerHTML = "0M"
  85. });
  86. }
  87. })
  88. break;
  89. }
  90. }
  91. </script>
  92. </body>
  93. </html>