logout.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view>
  3. <u-navbar back-text="注销账号"></u-navbar>
  4. <view class="logout-head">
  5. <u-image width="100" height="100" src="/static/img/logout.png"></u-image>
  6. <p>注销荆州工会鹊桥帐号</p>
  7. </view>
  8. <view class="logout-main">
  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 :custom-style="customStyle1" @click="continueLogOff"><span>继续注销</span></u-button>
  16. <u-button type="error" :custom-style="customStyle2" @click="thinkAgain">我再想想</u-button>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import * as loginApi from '@/apis/login.js'
  23. export default {
  24. data() {
  25. return {
  26. navbarBg: {
  27. background: 'none'
  28. },
  29. customStyle1:{
  30. background: '#EFEFEF',
  31. color:'#eee',
  32. flex:'0.45',
  33. },
  34. customStyle2: {
  35. background: '#FF5E5E',
  36. flex:'0.45',
  37. },
  38. }
  39. },
  40. methods:{
  41. continueLogOff(){
  42. let personalInfo = this.carhelp.getPersonInfo();
  43. let data = {subject:personalInfo.id};
  44. loginApi.logout(data).then(function(data){
  45. console.log('注销成功'+JSON.stringify(data));
  46. uni.switchTab({
  47. url:'../index/index'
  48. })
  49. },function(err){
  50. console.log('注销失败'+JSON.stringify(err))
  51. })
  52. },
  53. thinkAgain(){
  54. console.log('thinkAgain')
  55. uni.navigateBack({
  56. delta:1
  57. })
  58. /*uni.switchTab({
  59. url:'../index/index'
  60. })*/
  61. /* uni.navigateTo({
  62. url:'../index/index'
  63. })*/
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .logout-head{
  70. height: 120px;
  71. background-color: #FF5E5E;
  72. display: flex;
  73. flex-direction: column;
  74. align-items: center;
  75. justify-content: center;
  76. p{
  77. color:#fff;
  78. margin-top: 5px;
  79. font-size: 16px;
  80. }
  81. }
  82. .logout-main{
  83. padding: 12px 24px;
  84. line-height: 24px;
  85. p{
  86. margin-bottom: 10px;
  87. }
  88. }
  89. .logout-btn{
  90. padding: 15px;
  91. display: flex;
  92. justify-content: space-between;
  93. span{
  94. color:#888;
  95. }
  96. }
  97. </style>