index.vue 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="text-white padding-lr">
  3. <view class="flex padding-tb" @click="goNav('/pages/public/pwd')">
  4. <view class="flex-sub text-df" style="line-height: 50upx;">修改密码</view>
  5. <image src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/02/a8eddf683c009eaca0cfc915664e4a09.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  6. </view>
  7. <!-- <view class="flex padding-tb">
  8. <view class="flex-sub text-df" style="line-height: 50upx;">帮助中心</view>
  9. <image src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/02/a8eddf683c009eaca0cfc915664e4a09.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  10. </view> -->
  11. <view class="flex padding-tb" @click="goNav('/my/setting/xieyi')">
  12. <view class="flex-sub text-df" style="line-height: 50upx;">用户协议</view>
  13. <image src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/02/a8eddf683c009eaca0cfc915664e4a09.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  14. </view>
  15. <view class="flex padding-tb" @click="goNav('/my/setting/mimi')">
  16. <view class="flex-sub text-df" style="line-height: 50upx;">隐私政策</view>
  17. <image src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/02/a8eddf683c009eaca0cfc915664e4a09.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  18. </view>
  19. <view class="flex padding-tb" @click="goNav('/my/setting/about')">
  20. <view class="flex-sub text-df" style="line-height: 50upx;">关于我们</view>
  21. <image src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/02/a8eddf683c009eaca0cfc915664e4a09.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;"></image>
  22. </view>
  23. <view class="btn" @click="goOut" >退出登录</view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. }
  31. },
  32. onLoad() {
  33. },
  34. methods: {
  35. goNav(e) {
  36. uni.navigateTo({
  37. url:e
  38. })
  39. },
  40. goOut() {
  41. uni.showModal({
  42. title: '提示',
  43. content: '确定退出登录吗?',
  44. confirmColor:'#00B88F',
  45. success: function (res) {
  46. if (res.confirm) {
  47. console.log('用户点击确定');
  48. uni.removeStorageSync('userName')
  49. uni.removeStorageSync('avatar')
  50. uni.removeStorageSync('userId')
  51. uni.removeStorageSync('token')
  52. uni.removeStorageSync('phone')
  53. uni.removeStorageSync('zhiFuBaoName')
  54. uni.removeStorageSync('zhiFuBao')
  55. uni.removeStorageSync('invitationCode')
  56. uni.removeStorageSync('unionId')
  57. uni.removeStorageSync('openId')
  58. uni.removeStorageSync('isVIP')
  59. uni.showToast({
  60. title: '退出成功!',
  61. icon: 'none'
  62. })
  63. setTimeout(function() {
  64. uni.navigateBack()
  65. },1000)
  66. } else if (res.cancel) {
  67. console.log('用户点击取消');
  68. }
  69. }
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. .btn {
  77. width: 100%;
  78. height: 80upx;
  79. background: #557EFD;
  80. border-radius: 6upx;
  81. text-align: center;
  82. line-height: 80upx;
  83. margin-top: 40upx;
  84. font-size: 34upx;
  85. color: #fff;
  86. }
  87. </style>