setting.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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" id="app">
  31. <div class="m_box">
  32. <ul class="mui-table-view">
  33. <li class="mui-table-view-cell">
  34. <a class="mui-navigate-right"><span class="mui-pull-right">v 1.0.0</span><i class="icon iconfont icon-banbenjiance"></i>当前版本</a>
  35. </li>
  36. <li class="mui-table-view-cell">
  37. <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>
  38. </li>
  39. <li class="mui-table-view-cell">
  40. <a class="mui-navigate-right" onclick="op(2)"><span class="mui-pull-right">党建扶贫</span><i class="icon iconfont icon-guanyu"></i>关于</a>
  41. </li>
  42. </ul>
  43. </div>
  44. <button class="btn" onclick="op(3)">退出登录</button>
  45. </div>
  46. <script src="../../js/mui.min.js"></script>
  47. <script src="../../js/app.js" ></script>
  48. <script type="text/javascript">
  49. //操作
  50. mui.plusReady(function() {
  51. var vm = new Vue({
  52. el: "#app",
  53. data:{
  54. phone:getConstant().phone,
  55. qq:getConstant().qq,
  56. group:getConstant().group
  57. },
  58. methods: {
  59. op: function(flag) {
  60. switch(flag) {
  61. case 1:
  62. callqq(vm.qq);
  63. break;
  64. case 2:
  65. mui.toast("已复制,请打开qq搜索添加群");
  66. copy(vm.group);
  67. break;
  68. }
  69. }
  70. }
  71. })
  72. })
  73. mui.plusReady(function() {
  74. var cache = document.getElementById("cache");
  75. plus.cache.calculate(function(size) {
  76. var s = size / 1024 / 1024
  77. cache.innerHTML = s.toFixed(1) + 'M';
  78. });
  79. })
  80. document.getElementById("phone").innerText=getConstant().phone;
  81. //操作
  82. function op(flag) {
  83. switch(flag) {
  84. case 1:
  85. plus.device.dial(getConstant().phone, false);
  86. break;
  87. case 2:
  88. open('about', 'about.html', null, 'slide-in-bottom');
  89. break;
  90. case 3:
  91. mui.confirm('是否退出登录?', '提示', ['否', '是'], function(e) {
  92. if(e.index == 1) {
  93. localStorage.removeItem("user");
  94. localStorage.removeItem("token");
  95. plus.webview.getWebviewById('tab/mine.html').reload(true);
  96. mui.back();
  97. }
  98. })
  99. break;
  100. case 5:
  101. mui.confirm('是否清除缓存?', '提示', ['否', '是'], function(e) {
  102. if(e.index == 1) {
  103. plus.cache.clear(function() {
  104. mui.alert("清除成功!");
  105. document.getElementById("cache").innerHTML = "0M"
  106. });
  107. }
  108. })
  109. break;
  110. }
  111. }
  112. </script>
  113. </body>
  114. </html>