index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="text-black padding-lr" style="background: #fff;">
  3. <!-- #ifndef MP-WEIXIN -->
  4. <view class="flex padding-tb" @click="goNav('/pages/public/pwd')">
  5. <view class="flex-sub text-df" style="line-height: 50upx;">修改密码</view>
  6. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
  7. </image>
  8. </view>
  9. <!-- #endif -->
  10. <view class="flex padding-tb" @click="goNav('/my/help/feedbackIndex')">
  11. <view class="flex-sub text-df" style="line-height: 50upx;">帮助中心</view>
  12. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  13. </view>
  14. <view class="flex padding-tb" @click="goNav('/my/feedback/index')">
  15. <view class="flex-sub text-df" style="line-height: 50upx;">意见反馈</view>
  16. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  17. </view>
  18. <view class="flex padding-tb" @click="goNav('/my/setting/xieyi')">
  19. <view class="flex-sub text-df" style="line-height: 50upx;">用户协议</view>
  20. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
  21. </image>
  22. </view>
  23. <view class="flex padding-tb" @click="goNav('/my/setting/mimi')">
  24. <view class="flex-sub text-df" style="line-height: 50upx;">隐私政策</view>
  25. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
  26. </image>
  27. </view>
  28. <view class="flex padding-tb" @click="goNav('/my/setting/about')">
  29. <view class="flex-sub text-df" style="line-height: 50upx;">关于我们</view>
  30. <image src="../../static/images/my/right.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
  31. </image>
  32. </view>
  33. <view class="btn" @click="goOut">退出登录</view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. }
  41. },
  42. onLoad() {
  43. },
  44. methods: {
  45. goNav(e) {
  46. uni.navigateTo({
  47. url: e
  48. })
  49. },
  50. goOut() {
  51. uni.showModal({
  52. title: '提示',
  53. content: '确定退出登录吗?',
  54. success: function(res) {
  55. if (res.confirm) {
  56. console.log('用户点击确定');
  57. uni.removeStorageSync('userName')
  58. uni.removeStorageSync('avatar')
  59. uni.removeStorageSync('userId')
  60. uni.removeStorageSync('token')
  61. uni.removeStorageSync('phone')
  62. uni.removeStorageSync('zhiFuBaoName')
  63. uni.removeStorageSync('zhiFuBao')
  64. uni.removeStorageSync('invitationCode')
  65. uni.removeStorageSync('unionId')
  66. uni.removeStorageSync('openId')
  67. uni.removeStorageSync('isVIP')
  68. uni.showToast({
  69. title: '退出成功!',
  70. icon: 'none'
  71. })
  72. setTimeout(function() {
  73. uni.navigateBack()
  74. }, 1000)
  75. } else if (res.cancel) {
  76. console.log('用户点击取消');
  77. }
  78. }
  79. })
  80. }
  81. }
  82. }
  83. </script>
  84. <style>
  85. .btn {
  86. width: 686rpx;
  87. height: 100rpx;
  88. line-height: 100rpx;
  89. text-align: center;
  90. background: #1EDA94;
  91. border-radius: 86rpx 86rpx 86rpx 86rpx;
  92. font-weight: bold;
  93. font-size: 32rpx;
  94. color: #FFFFFF;
  95. position: fixed;
  96. bottom: 70rpx;
  97. left: 32rpx;
  98. }
  99. </style>