verify.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div style="height: 100vh;background-color: #fff;">
  3. <van-nav-bar title="账号注销" left-text="返回" @click-left="$route_back" left-arrow/>
  4. <div class="all">
  5. <div style="text-align: center;margin-bottom: 0.3rem;"><img src="static/images/e66f.jpg" class="img" /></div>
  6. <div class="text">
  7. <div>
  8. 注销前请完成以下动作方可注销</br>
  9. 退出所有企业/组织
  10. </div>
  11. <div>
  12. 注销后</br>
  13. 所有数据将被抹除且不可恢复,请谨慎操作!
  14. </div>
  15. </div>
  16. <van-button v-if="canNext" @click="$route_back" style="background-color: #26A2FF;border:1px solid #26A2FF;border-radius: 3px;color: #FFF;" block >我知道了</van-button>
  17. <van-button v-else @click="verify" style="background-color: #26A2FF;border:1px solid #26A2FF;border-radius: 3px;color: #FFF;" block >注销</van-button>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'verify',
  24. data () {
  25. return {
  26. canNext:false
  27. }
  28. },
  29. activated(){
  30. this.get_site_list()
  31. },
  32. methods: {
  33. verify () {
  34. this.$dialog.confirm({
  35. message: '注销操作不可撤销,是否继续?'
  36. }).then(() => {
  37. this.$router.push({name: 'accountVf'})
  38. }).catch(() => {
  39. // on cancel
  40. })
  41. },
  42. get_site_list() {
  43. this.$toast.loading({
  44. mask: false,
  45. message: '获取企业信息'
  46. });
  47. this.$axios('get', '/api/pro/account/site', '', 'token').then(res => {
  48. this.$toast.clear();
  49. if (res.data.code === 1) {
  50. if (res.data.data.length > 0) {
  51. this.canNext = true;
  52. }else{
  53. this.canNext = false;
  54. }
  55. } else {
  56. console.log("获取企业失败")
  57. }
  58. });
  59. },
  60. }
  61. }
  62. </script>
  63. <style scoped lang="less">
  64. .all{
  65. padding: 0.32rem;
  66. }
  67. .text{
  68. color: #969799;
  69. font-size: 0.28rem;
  70. padding: 0 0.3rem;
  71. }
  72. .text div{
  73. margin-bottom: 1rem;
  74. }
  75. .img{
  76. width: 2rem;
  77. height: 2rem;
  78. margin: 0 auto;
  79. }
  80. </style>