index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <app-view class="g-form logoff">
  3. <template #header>
  4. <app-navbar title="注销服务" />
  5. </template>
  6. <section class="logoff__details">
  7. <h4>为保证您的账号安全,在提交注销申请时,需同时满足以下条件:</h4>
  8. <dl>
  9. <dt>1. 账号财产已结清</dt>
  10. <dd>没有资产、欠款、未结清的资金和现货。</dd>
  11. <dt>2. 账号处于安全状态</dt>
  12. <dd>账号处于正常使用状态,无被盗风险。</dd>
  13. <dt>3. 账号无任何纠纷</dt>
  14. </dl>
  15. </section>
  16. <template #footer>
  17. <div class="g-form__footer">
  18. <Button type="primary" @click="onSubmit" round block>确认注销</Button>
  19. </div>
  20. </template>
  21. </app-view>
  22. </template>
  23. <script lang="ts" setup>
  24. import { Toast, Button } from 'vant'
  25. import { fullloading, dialog } from '@/utils/vant'
  26. import { useAccountCancellation } from '@/business/user'
  27. const { formSubmit } = useAccountCancellation()
  28. const onSubmit = () => {
  29. dialog('账户注销后不能再使用该系统,如果账户有余额需要人工审核才能注销,确定要注销账户吗?', {
  30. showCancelButton: true,
  31. messageAlign: 'left'
  32. }).then(() => {
  33. fullloading((hideLoading) => {
  34. formSubmit().then(() => {
  35. hideLoading()
  36. dialog('提交成功,请等待审核。')
  37. }).catch((err) => {
  38. Toast.fail(err)
  39. })
  40. })
  41. })
  42. }
  43. </script>
  44. <style lang="less" scoped>
  45. @import './index.less';
  46. </style>