logout.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <view class="all">
  3. <ujp-navbar title="注销账号"></ujp-navbar>
  4. <view class="logout-head">
  5. <img src="@/assets/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. }
  46. else
  47. {
  48. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  49. }
  50. },
  51. toSetting() {
  52. uni.navigateBack({
  53. })
  54. },
  55. logout() {
  56. uni.showLoading({
  57. title: "加载中",
  58. mask: true,
  59. })
  60. userApi.deleteUser().then((res) => {
  61. uni.hideLoading();
  62. this.carhelp.logoff();
  63. uni.reLaunch({
  64. url: '/pages/index/index'
  65. })
  66. }).catch(error => {
  67. uni.navigateTo({
  68. url: '/pages/user/finance/refundList'
  69. })
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. page{
  77. background-color: #fff;
  78. }
  79. </style>
  80. <style lang="scss" scoped>
  81. @import "@/_theme.scss";
  82. .all{
  83. @include themeify{
  84. font-size: themed('font-size2');
  85. }
  86. }
  87. .collapse{
  88. background-color: #fff;
  89. padding:0 10px;
  90. }
  91. .logout-head{
  92. background-color: #FF5E5E ;
  93. padding: 20px 0;
  94. display: flex;
  95. flex-direction: column;
  96. align-items: center;
  97. img{
  98. height: 52px;
  99. width: 52px;
  100. }
  101. p{
  102. color:#fff;
  103. margin-top: 4px;
  104. }
  105. @include themeify{
  106. font-size: themed('font-size2');
  107. }
  108. }
  109. .logout-text{
  110. padding: 24px;
  111. p{
  112. /* line-height: 28px;*/
  113. @include themeify{
  114. line-height: themed('font-size9');
  115. }
  116. }
  117. }
  118. .logout-btn{
  119. display: flex;
  120. justify-content: space-between;
  121. padding: 0 24px;
  122. }
  123. .logout-btn1{
  124. color:#BBBBBB!important;
  125. background-color:#fff!important;
  126. flex: 0.4;
  127. span{
  128. color:#333;
  129. }
  130. @include themeify{
  131. font-size: themed('font-size3');
  132. line-height: themed('font-size3');
  133. }
  134. }
  135. .logout-btn2{
  136. background-color:#00B962!important;
  137. flex: 0.4;
  138. border-color: #00B962!important;
  139. color:#fff!important;
  140. @include themeify{
  141. font-size: themed('font-size3');
  142. line-height: themed('font-size3');
  143. }
  144. }
  145. </style>