logout.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="all">
  3. <u-navbar title="注销账号"></u-navbar>
  4. <view class="logout-head">
  5. <img src="../../static/img/logout.png" alt="">
  6. <p>注销帐号</p>
  7. </view>
  8. <view class="logout-text">
  9. <p>我们很遗憾您做出注销帐号的决定,在提交申请前请您仔细阅读以下内容:</p>
  10. <p> 1.您应确保您有权决定该账户的注销事宜,不侵犯任何第三方的合法权益,如因此引发任何投诉争议,由您自行承担。</p>
  11. <p> 2.帐号注销后您无法再使用本社区的各项服务,您的个人信息及求助记录也将被清空。</p>
  12. <p> 3.如您已被国家机关调查或正处于诉讼、仲裁程序中,请注意,注销您的帐号并不代表此帐号注销前的帐号行为和相关责任得到豁免或减轻。</p>
  13. </view>
  14. <view class="logout-btn">
  15. <u-button class="logout-btn1" shape="circle" type="" @click="logout">
  16. <span>继续注销</span>
  17. </u-button>
  18. <u-button class="logout-btn2" shape="circle" type="success" @click="toSetting">
  19. <span>我再想想</span>
  20. </u-button>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import * as userApi from '@/apis/user.js'
  26. export default {
  27. data() {
  28. return {
  29. elderMode:false,
  30. jpcode: 'toLogin',
  31. }
  32. },
  33. onReady(){
  34. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  35. if(this.elderMode)
  36. this.theme('elder')
  37. else
  38. this.theme('standard')
  39. },
  40. methods: {
  41. theme(type) {
  42. if(type == 'elder')
  43. {
  44. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  45. let data = {
  46. "font-size":'32rpx',
  47. };
  48. this.placeholderStyle = data;
  49. }
  50. else
  51. {
  52. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  53. let data = {
  54. "font-size":'28rpx'
  55. };
  56. this.placeholderStyle = data;
  57. }
  58. },
  59. toSetting() {
  60. uni.navigateBack({
  61. })
  62. },
  63. logout() {
  64. uni.showLoading({
  65. title: "加载中",
  66. mask: true,
  67. })
  68. userApi.deleteUser().then((res) => {
  69. uni.hideLoading();
  70. this.carhelp.logoff();
  71. uni.reLaunch({
  72. url: '/pages/index/index'
  73. })
  74. }).catch(error => {
  75. uni.navigateTo({
  76. url: '/pages/user/finance/refundList'
  77. })
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style>
  84. page{
  85. background-color: #fff;
  86. }
  87. </style>
  88. <style lang="scss" scoped>
  89. @import "@/_theme.scss";
  90. .all{
  91. @include themeify{
  92. font-size: themed('font-size2');
  93. }
  94. }
  95. .collapse{
  96. background-color: #fff;
  97. padding:0 10px;
  98. }
  99. .logout-head{
  100. background-color: #FF5E5E ;
  101. padding: 20px 0;
  102. display: flex;
  103. flex-direction: column;
  104. align-items: center;
  105. img{
  106. height: 52px;
  107. width: 52px;
  108. }
  109. p{
  110. color:#fff;
  111. margin-top: 4px;
  112. }
  113. @include themeify{
  114. font-size: themed('font-size2');
  115. }
  116. }
  117. .logout-text{
  118. padding: 24px;
  119. p{
  120. /* line-height: 28px;*/
  121. @include themeify{
  122. line-height: themed('font-size9');
  123. }
  124. }
  125. }
  126. .logout-btn{
  127. display: flex;
  128. justify-content: space-between;
  129. padding: 0 24px;
  130. }
  131. .logout-btn1{
  132. color:#BBBBBB!important;
  133. background-color:#fff!important;
  134. flex: 0.4;
  135. span{
  136. color:#333;
  137. }
  138. @include themeify{
  139. font-size: themed('font-size3');
  140. line-height: themed('font-size3');
  141. }
  142. }
  143. .logout-btn2{
  144. background-color:#00B962!important;
  145. flex: 0.4;
  146. border-color: #00B962!important;
  147. color:#fff!important;
  148. @include themeify{
  149. font-size: themed('font-size3');
  150. line-height: themed('font-size3');
  151. }
  152. }
  153. </style>