set.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="container">
  3. <view class="list-cell b-b m-t" @click="navTo('../set/grzl/grzl')" hover-class="cell-hover" :hover-stay-time="50">
  4. <text class="cell-tit">个人资料</text>
  5. <image mode="aspectFit" style="width: 30upx; height: 30upx;" :src="staticUrl + 'fh2.png'">
  6. </view>
  7. <!-- <view class="list-cell" @click="navTo('/pages/bdtel/bdtel')" hover-class="cell-hover" :hover-stay-time="50">
  8. <text class="cell-tit">手机已绑定</text>
  9. <text class="cell-more yticon icon-you"></text>
  10. </view> -->
  11. <!-- <view class="list-cell m-t">
  12. <text class="cell-tit">消息推送</text>
  13. <switch checked color="#fa436a" @change="switchChange" />
  14. </view> -->
  15. <!-- <view class="list-cell m-t b-b" @click="navTo('清除缓存')" hover-class="cell-hover" :hover-stay-time="50">
  16. <text class="cell-tit">清除缓存</text>
  17. <text class="cell-more yticon icon-you"></text>
  18. </view> -->
  19. <view class="list-cell b-b" @click="navTo('/pages/set/gywm/gywm')" hover-class="cell-hover" :hover-stay-time="50">
  20. <text class="cell-tit">关于我们</text>
  21. <image mode="aspectFit" style="width: 30upx; height: 30upx;" :src="staticUrl + 'fh2.png'">
  22. </view>
  23. <!-- <view class="list-cell">
  24. <text class="cell-tit">联系我们</text>
  25. <text class="cell-tip">15885388639</text>
  26. <text class="cell-more yticon icon-you"></text>
  27. </view> -->
  28. <view class="list-cell">
  29. <text class="cell-tit">版本信息</text>
  30. <text class="cell-tip">当前版本{{version}}</text>
  31. <!-- <text class="cell-more yticon icon-you"></text> -->
  32. </view>
  33. <view class="list-cell log-out-btn" @click="toLogout">
  34. <text class="cell-tit">退出登录</text>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import {
  40. mapMutations
  41. } from 'vuex';
  42. export default {
  43. data() {
  44. return {
  45. version:'',
  46. staticUrl:this.$config.staticUrl,
  47. }
  48. },
  49. onLoad() {
  50. // #ifdef APP-PLUS
  51. this.version=plus.runtime.version
  52. // #endif
  53. },
  54. methods:{
  55. ...mapMutations(['logout']),
  56. navTo(url){
  57. uni.navigateTo({
  58. url:url
  59. })
  60. },
  61. //退出登录
  62. toLogout(){
  63. uni.showModal({
  64. content: '确定要退出登录么',
  65. success: (e)=>{
  66. if(e.confirm){
  67. uni.removeStorageSync('userinfo');
  68. setTimeout(()=>{
  69. uni.navigateBack();
  70. }, 200)
  71. }
  72. }
  73. });
  74. },
  75. //switch
  76. switchChange(e){
  77. let statusTip = e.detail.value ? '打开': '关闭';
  78. this.$api.msg(`${statusTip}消息推送`);
  79. },
  80. }
  81. }
  82. </script>
  83. <style lang='scss'>
  84. page{
  85. background: $page-color-base;
  86. }
  87. .list-cell{
  88. display:flex;
  89. align-items:baseline;
  90. padding: 20upx $page-row-spacing;
  91. line-height:60upx;
  92. position:relative;
  93. background: #fff;
  94. justify-content: center;
  95. &.log-out-btn{
  96. margin-top: 40upx;
  97. .cell-tit{
  98. color: $uni-color-primary;
  99. text-align: center;
  100. margin-right: 0;
  101. }
  102. }
  103. &.cell-hover{
  104. background:#fafafa;
  105. }
  106. &.b-b:after{
  107. left: 30upx;
  108. }
  109. &.m-t{
  110. margin-top: 16upx;
  111. }
  112. .cell-more{
  113. align-self: baseline;
  114. font-size:$font-lg;
  115. color:$font-color-light;
  116. margin-left:10upx;
  117. }
  118. .cell-tit{
  119. flex: 1;
  120. font-size: $font-base + 2upx;
  121. color: $font-color-dark;
  122. margin-right:10upx;
  123. }
  124. .cell-tip{
  125. font-size: $font-base;
  126. color: $font-color-light;
  127. }
  128. switch{
  129. transform: translateX(16upx) scale(.84);
  130. }
  131. }
  132. </style>