logout.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="body">
  3. <view class="phone">
  4. <view class="phone-item">
  5. 手机号
  6. </view>
  7. <input type="number" name="phone" value="" v-model="form.userPhone" disabled
  8. placeholder-style="color:#cccccc; font-size:28rpx;" maxlength="11" placeholder="请输入您的手机号码" />
  9. </view>
  10. <view class="phone">
  11. <view class="phone-item">
  12. 登录密码
  13. </view>
  14. <input type="text" name="phone" value="" v-model="form.psword" placeholder-style="color:#cccccc; font-size:28rpx;"
  15. placeholder="请输入登录密码" />
  16. </view>
  17. <view class="tig">注意:注销账户提交后,工作人员会及时处理。</view>
  18. <view class="button">
  19. <button form-type="submit" @click="submit">立即注销</button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. myInfo,
  26. logout
  27. } from "@/api/login.js"
  28. export default {
  29. data() {
  30. return {
  31. form: {
  32. userPhone: "",
  33. }
  34. }
  35. },
  36. onLoad() {
  37. this.getUserInfo()
  38. },
  39. methods: {
  40. getUserInfo() {
  41. this.$http.get("/account/app-info").then(res => {
  42. if (res && res.code == 200) {
  43. this.form.userPhone = res.data.mobile
  44. }
  45. })
  46. },
  47. submit() {
  48. let that = this;
  49. if (!this.form.psword || this.form.psword.length < 6) {
  50. uni.showToast({
  51. icon: "none",
  52. title: '请输入正确的密码',
  53. duration: 2000
  54. });
  55. } else {
  56. uni.showModal({
  57. title: '提示',
  58. content: '确定提交注销申请?',
  59. success: function(res) {
  60. if (res.confirm) {
  61. that.$mUtil.toast("您的注销申请已收到,工作人员会尽量联系处理");
  62. setTimeout(() => {
  63. uni.navigateBack()
  64. }, 2000)
  65. }
  66. }
  67. });
  68. }
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .body {
  75. .phone {
  76. margin: 0 30rpx;
  77. display: flex;
  78. padding: 27rpx 0 30rpx 0;
  79. align-items: center;
  80. border-bottom: 1rpx solid #E6E6E6;
  81. .phone-item {
  82. font-size: 28rpx;
  83. font-weight: 400;
  84. color: #1A1A1A;
  85. }
  86. input {
  87. flex: 1;
  88. margin-left: 60rpx;
  89. }
  90. }
  91. .tig {
  92. padding: 30rpx;
  93. font-size: 24rpx;
  94. }
  95. .button {
  96. margin: 700rpx 30rpx 0 30rpx;
  97. button {
  98. font-size: 36rpx;
  99. color: #ffffff;
  100. font-weight: 400;
  101. background-color: #FA6138;
  102. border-radius: 43rpx;
  103. }
  104. }
  105. }
  106. </style>