setting.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="container">
  3. <view class="main-out-box">
  4. <view class="main-inner-box">
  5. <u-cell-group :border="false">
  6. <u-cell
  7. size="large"
  8. :border="false"
  9. icon="account-fill"
  10. title="个人信息"
  11. isLink
  12. url="/pages/client/clientUser/mine/setting/personInfo"
  13. />
  14. <u-cell
  15. size="large"
  16. :border="false"
  17. icon="fingerprint"
  18. title="安全中心"
  19. isLink
  20. url="/pages/client/clientUser/mine/setting/personInfo"
  21. />
  22. <u-cell
  23. size="large"
  24. :border="false"
  25. icon="github-circle-fill"
  26. title="关于我们"
  27. isLink
  28. url="/pages/client/clientUser/mine/setting/aboutMine"
  29. />
  30. <u-cell
  31. size="large"
  32. :border="false"
  33. icon="file-text-fill"
  34. title="用户协议"
  35. isLink
  36. url="/pages/client/clientUser/mine/setting/agreement"
  37. />
  38. <u-cell
  39. size="large"
  40. :border="false"
  41. icon="file-text"
  42. title="隐私政策"
  43. isLink
  44. url="/pages/client/clientUser/mine/setting/privacyPolicy"
  45. />
  46. <u-cell icon="integral-fill" title="版本信息" value="V0.0.1" />
  47. </u-cell-group>
  48. </view>
  49. </view>
  50. <SwitchIdentityDialog v-if="showSwitchDialog" @confirm="confirmSwitch" @cancel="cancelSwitch">
  51. <p>您确定要从用户/商家端切换到商家段/用户端吗?</p>
  52. <br />
  53. <br />
  54. </SwitchIdentityDialog>
  55. <view class="policy-out-box">
  56. <view class="policy-inner-box">
  57. <u-cell-group :border="false">
  58. <u-cell
  59. size="large"
  60. :border="false"
  61. icon="level"
  62. title="切换身份"
  63. isLink
  64. @click="openSwitchDialog"
  65. />
  66. </u-cell-group>
  67. </view>
  68. </view>
  69. <view class="exit">
  70. <u-row class="button" justify="center" align="center">
  71. <u-col span="24">
  72. <u-button type="info" shape="circle" text="注销账号" :style="{ width: '500rpx' }" />
  73. </u-col>
  74. </u-row>
  75. <u-row class="button" justify="center" align="center">
  76. <u-col span="24">
  77. <u-button type="primary" shape="circle" text="退出登录" :style="{ width: '500rpx' }" />
  78. </u-col>
  79. </u-row>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. import SwitchIdentityDialog from '@/components/SwitchIdentityDialog/SwitchIdentityDialog.vue';
  85. export default {
  86. components: {
  87. SwitchIdentityDialog,
  88. },
  89. data() {
  90. return {
  91. showSwitchDialog: false,
  92. };
  93. },
  94. mounted() {},
  95. methods: {
  96. // 获取当前用户信息
  97. handlerInitUserMessage() {
  98. maintainUserInfo().then(res => {
  99. this.user_info = res.data;
  100. });
  101. },
  102. // 点击跳转到全部订单
  103. gotoOrder(item) {
  104. uni.navigateTo({
  105. url: `/pages/client/clientPackage/orderAll?type=${item.type}`,
  106. });
  107. },
  108. // 点击跳转到我的收益
  109. handlerSkipMyProfit() {
  110. uni.navigateTo({
  111. url: '/pages/client/clientUser/myProfit',
  112. });
  113. },
  114. // 点击身份切换
  115. openSwitchDialog() {
  116. // 打开切换身份确认弹框
  117. this.showSwitchDialog = true;
  118. },
  119. confirmSwitch() {
  120. // 点击确认切换身份
  121. // 处理身份切换逻辑
  122. uni.setStorageSync('tabbar_type', false);
  123. uni.navigateTo({
  124. url:'/pages/merchant/tabBar/extend/index'
  125. })
  126. // ... 其他操作
  127. },
  128. cancelSwitch() {
  129. // 点击取消切换身份
  130. this.showSwitchDialog = false;
  131. // ... 其他操作
  132. },
  133. },
  134. };
  135. </script>
  136. <style lang="scss" scoped>
  137. .container {
  138. min-height: 100vh;
  139. background-color: #efefef;
  140. .main-out-box {
  141. padding: 20rpx 16rpx;
  142. box-sizing: border-box;
  143. .main-inner-box {
  144. background-color: $uni-bg-color;
  145. border-radius: 20rpx;
  146. }
  147. }
  148. .policy-out-box {
  149. padding: 50rpx 16rpx;
  150. box-sizing: border-box;
  151. .policy-inner-box {
  152. background-color: $uni-bg-color;
  153. border-radius: 20rpx;
  154. }
  155. }
  156. }
  157. .exit {
  158. width: 100%;
  159. display: flex;
  160. flex-direction: column;
  161. justify-content: center;
  162. align-items: center;
  163. }
  164. .button {
  165. margin-top: 35rpx;
  166. }
  167. </style>