setting.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div id="pages">
  3. <mt-header title="设置">
  4. <router-link to="/" slot="left">
  5. <img src="../../static/images/comm/arrow-left.png" alt="" class="arr_left">
  6. </router-link>
  7. </mt-header>
  8. <div class="container">
  9. <div class="row">
  10. <mt-cell
  11. title="基本资料"
  12. to="/basic"
  13. is-link>
  14. </mt-cell>
  15. <mt-cell
  16. title="安全设置"
  17. to="/safe"
  18. is-link>
  19. </mt-cell>
  20. <div class="gary"></div>
  21. <mt-cell
  22. title="系统消息"
  23. to="/news"
  24. is-link>
  25. </mt-cell>
  26. <div class="gary"></div>
  27. <mt-cell
  28. title="关于我们"
  29. to="/about"
  30. is-link>
  31. </mt-cell>
  32. <div @click.naive="current" class="btns">
  33. <mt-cell
  34. title="版本更新"
  35. value="当前版本 1.0.3"
  36. >
  37. </mt-cell>
  38. </div>
  39. </div>
  40. <!--<mt-button type="default" @click.navie="logout">退出登陆</mt-button>-->
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import axios from 'axios';
  46. import {Cell} from 'mint-ui';
  47. import {Toast} from 'mint-ui';
  48. import {MessageBox} from 'mint-ui';
  49. import Vue from 'vue';
  50. let qs = require('qs');
  51. import Global from '../Global.js'
  52. Vue.component(Cell.name, Cell);
  53. export default {
  54. data() {
  55. return {
  56. msg: 'Welcome to Your Vue.js App'
  57. }
  58. },
  59. mounted() {
  60. },
  61. methods: {
  62. current(){
  63. Toast('当前已是最新版本');
  64. },
  65. // 退出
  66. logout() {
  67. const that = this;
  68. let url = headapi + '?ctl=ajax&mod=index&act=logout';
  69. let param = {};
  70. let postdata = qs.stringify(param);
  71. MessageBox.confirm('确定退出当前账户?').then(action => {
  72. axios.post(url, postdata).then(function (data) {
  73. let json = data.data;
  74. if (json.code == 0) {
  75. Toast('当前账户已退出');
  76. that.$router.push({path: '/login'});
  77. } else {
  78. Toast(json.memo);
  79. }
  80. }, function (response) {
  81. console.info(response);
  82. })
  83. });
  84. },
  85. },
  86. components: {}
  87. }
  88. </script>
  89. <!-- Add "scoped" attribute to limit CSS to this component only -->
  90. <style scoped>
  91. @import "../assets/css/comm.css";
  92. #pages {
  93. background: #EBEBEB;
  94. }
  95. .container {
  96. width: 100%;
  97. overflow: hidden;
  98. display: block;
  99. margin: 0 auto;
  100. margin-top: 10px;
  101. }
  102. /deep/ .mint-cell {
  103. margin-bottom: 1px;
  104. }
  105. .gary {
  106. width: 100%;
  107. overflow: hidden;
  108. display: block;
  109. margin: 0 auto;
  110. height: 10px;
  111. }
  112. /deep/ .mint-cell-title {
  113. color: #454545;
  114. font-size: 16px;
  115. }
  116. /deep/ .mint-cell-value span {
  117. font-size: 14px;
  118. color: #454545;
  119. }
  120. /deep/ .mint-button--default {
  121. width: 92%;
  122. overflow: hidden;
  123. display: block;
  124. margin: 0 auto;
  125. height: 46px;
  126. text-align: center;
  127. font-size: 16px;
  128. color: #fff;
  129. background: #FFD579;
  130. margin-top: 20px;
  131. border-radius: 6px;
  132. }
  133. .btns {
  134. width: 100%;
  135. overflow: hidden;
  136. display: block;
  137. margin: 0 auto;
  138. }
  139. /deep/ .mint-cell {
  140. width: 100%;
  141. overflow: hidden;
  142. display: block;
  143. margin: 0 auto;
  144. border-bottom: 1px solid #EBEBEB;
  145. }
  146. /deep/ .mint-cell-wrapper {
  147. background-image:none;
  148. }
  149. </style>