deactivate.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!-- 注销(销毁)账号 -->
  2. <template>
  3. <view class="uni-content">
  4. <text class="words" space="emsp">
  5. 一、注销是不可逆操作,注销后:\n
  6. 1.帐号将无法登录、无法找回。\n
  7. 2.帐号所有信息都会清除(个人身份信息、粉丝数等;发布的作品、评论、点赞等;交易信息等),你
  8. 的朋友将无法通过本应用帐号联系你,请自行备份相关
  9. 信息和数据。\n
  10. 二、重要提示\n
  11. 1.封禁帐号(永久封禁、社交封禁、直播权限封禁)不能申请注销。\n
  12. 2.注销后,你的身份证、三方帐号(微信、QQ、微博、支付宝)、手机号等绑定关系将解除,解除后可以绑定到其他帐号。\n
  13. 3.注销后,手机号可以注册新的帐号,新帐号不会存在之前帐号的任何信息(作品、粉丝、评论、个人信息等)。\n
  14. 4.注销本应用帐号前,需尽快处理帐号下的资金问题。\n
  15. 5.视具体帐号情况而定,注销最多需要7天。\n
  16. </text>
  17. <view class="button-group">
  18. <button @click="nextStep" class="next" type="default">下一步</button>
  19. <button @click="cancel" type="warn">取消</button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. }
  28. },
  29. onLoad() {},
  30. methods: {
  31. cancel() {
  32. uni.navigateBack()
  33. },
  34. nextStep() {
  35. uni.showModal({
  36. content: '已经仔细阅读注销提示,知晓可能带来的后果,并确认要注销',
  37. complete: (e) => {
  38. if (e.confirm) {
  39. const db = uniCloud.database();
  40. const uniIdco = uniCloud.importObject("uni-id-co");
  41. uniIdco.closeAccount().then((e) => {
  42. console.log(e);
  43. uni.showToast({
  44. title: '注销成功'
  45. });
  46. uni.removeStorageSync('uni_id_token');
  47. uni.setStorageSync('uni_id_token_expired', 0)
  48. uni.navigateTo({
  49. url:"/uni_modules/uni-id-pages/pages/login/login-withoutpwd"
  50. })
  51. })
  52. } else {
  53. uni.navigateBack()
  54. }
  55. }
  56. });
  57. }
  58. }
  59. }
  60. </script>
  61. <style>
  62. .uni-content {
  63. display: flex;
  64. flex-direction: column;
  65. font-size: 28rpx;
  66. }
  67. .words {
  68. padding: 0 26rpx;
  69. line-height: 46rpx;
  70. margin-top: 20rpx;
  71. margin-bottom: 80px;
  72. }
  73. .button-group button {
  74. border-radius: 100px;
  75. border: none;
  76. width: 300rpx;
  77. height: 42px;
  78. line-height: 42px;
  79. font-size: 32rpx;
  80. }
  81. .button-group button:after {
  82. border: none;
  83. }
  84. .button-group button.next {
  85. color: #e64340;
  86. border: solid 1px #e64340;
  87. }
  88. .button-group {
  89. display: flex;
  90. flex-direction: row;
  91. position: fixed;
  92. height: 50px;
  93. bottom: 10px;
  94. width: 750rpx;
  95. justify-content: center;
  96. align-items: center;
  97. border-top: solid 1px #e4e6ec;
  98. padding-top: 10px;
  99. background-color: #FFFFFF;
  100. max-width: 690px;
  101. }
  102. @media screen and (min-width: 690px) {
  103. .uni-content{
  104. max-width: 690px;
  105. margin-left: calc(50% - 345px);
  106. }
  107. }
  108. </style>