accountCancellation.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="page">
  3. <view class="header dis a-c f-c">
  4. <image src="../../static/image/my/zgcx.png" mode=""></image>
  5. <text class="name">申请注销晋掌柜账号</text>
  6. </view>
  7. <view class="content">
  8. <view class="mb-4">
  9. <text class="p">在您注销账号前,请确保账号内的 <text style="color: #343EEF;">余额</text> 已全部提现,<text
  10. style="color: #343EEF;">订单</text> 已全部关闭以保障您的账号,财产安全。</text>
  11. </view>
  12. <text class="title">注销账号后,将放弃所有资产和权益</text>
  13. <ul class="ul">
  14. <li>身份、帐号信息、增员关系等资产将清空且无法恢复</li>
  15. <li>订单记录、出单员身份、增员关系及收益记录清空</li>
  16. <li>帐号一旦被注销将不可恢复,请在操作前自行备份帐号相关的所有信息和数据</li>
  17. <li>账号注销前请确认不存在或不需要管理的业务团队,否则一旦注销后将会导致其他产品或服务的必要功能无法实现,你将无法再登录掌柜应用。</li>
  18. </ul>
  19. </view>
  20. <view class="footer dis f-c a-start">
  21. <view class="selection">
  22. <u-checkbox v-model="checked" style="margin-top: 4px;"></u-checkbox>
  23. <text>
  24. 我已阅读并同意<text @tap="nav('/pages/login/logoutAgreement')" class="text-color">《用户注销协议》</text>
  25. </text>
  26. </view>
  27. <view class="btn dis a-c j-c " @click="accountSubmit">
  28. 申请注销
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import {
  35. mapState,
  36. mapMutations
  37. } from "vuex"
  38. export default {
  39. data() {
  40. return {
  41. checked: false,
  42. }
  43. },
  44. computed: {
  45. ...mapState(['userInfo']),
  46. },
  47. onShow() {
  48. },
  49. onLoad() {
  50. },
  51. methods: {
  52. ...mapMutations(['emptyUserInfo']),
  53. nav(url) {
  54. uni.navigateTo({
  55. url: url
  56. });
  57. },
  58. async accountSubmit() {
  59. let _this = this;
  60. if (!this.checked) {
  61. return uni.showToast({
  62. title: '请勾选用户注销协议',
  63. icon: 'none'
  64. });
  65. }
  66. uni.showModal({
  67. title: '提示',
  68. content: '是否要注销账户?',
  69. confirmText: '立刻注销',
  70. success: async res => {
  71. if (res.confirm) {
  72. let res = await _this.$http.get('/user/userLogout?userId=' + _this.userInfo
  73. .sysUser.id)
  74. console.log(res);
  75. if (res.code == 200) {
  76. uni.showToast({
  77. title: res.msg,
  78. icon: 'none'
  79. });
  80. _this.emptyUserInfo();
  81. setTimeout(() => {
  82. uni.reLaunch({
  83. url: "/pages/login/login"
  84. })
  85. return true;
  86. }, 500);
  87. } else {
  88. uni.showToast({
  89. title: res.msg,
  90. icon: 'none'
  91. });
  92. }
  93. }
  94. },
  95. });
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. page {
  102. background: #fff;
  103. }
  104. .header {
  105. border-top: 1px solid #EEEEEE;
  106. border-bottom: 1px solid #EEEEEE;
  107. padding: 69rpx 69rpx 65rpx;
  108. image {
  109. width: 72rpx;
  110. height: 72rpx;
  111. margin-bottom: 24rpx;
  112. }
  113. .name {
  114. font-size: 30rpx;
  115. font-weight: bold;
  116. color: #333;
  117. }
  118. }
  119. .content {
  120. padding: 40rpx 40rpx;
  121. .p {
  122. font-size: 28rpx;
  123. color: #333;
  124. }
  125. .title {
  126. font-size: 32rpx;
  127. font-weight: bold;
  128. color: #333;
  129. margin-top: 60rpx;
  130. }
  131. .ul {
  132. li {
  133. font-size: 28rpx;
  134. color: #666;
  135. margin: 30rpx 0;
  136. }
  137. }
  138. }
  139. .footer {
  140. padding: 32rpx;
  141. .selection {
  142. font-size: 28rpx;
  143. color: #666;
  144. margin-bottom: 40rpx;
  145. .text-color {
  146. color: #343EEF;
  147. }
  148. }
  149. .btn {
  150. width: 100%;
  151. background: #343EEF;
  152. border-radius: 6rpx;
  153. padding: 16rpx;
  154. color: #fff;
  155. font-size: 32rpx;
  156. }
  157. }
  158. </style>