ValidationEmailStepSelect.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="f-main">
  3. <div class="content-top">
  4. <p>验证邮箱</p>
  5. </div>
  6. <div>
  7. <ul class="select-item">
  8. <li class="item" @click="jump('mobile')">
  9. <img src="/images/all/icon01.png">
  10. <span>通过验证手机</span>
  11. <i class="fa fa-angle-right second"></i>
  12. </li>
  13. <li class="item" @click="jump('email')" v-if="hasEmail">
  14. <img src="/images/all/icon02.png">
  15. <span>通过验证邮箱</span>
  16. <i class="fa fa-angle-right second"></i>
  17. </li>
  18. <li class="item" @click="jump('questions')" v-if="hasQuestion">
  19. <img src="/images/all/icon03.png">
  20. <span>通过验证密保</span>
  21. <i class="fa fa-angle-right second"></i>
  22. </li>
  23. <li class="item" @click="jump('appeal')">
  24. <img src="/images/all/icon04.png">
  25. <i></i><span>通过人工申诉</span>
  26. <i class="fa fa-angle-right second"></i>
  27. </li>
  28. </ul>
  29. </div>
  30. <!--未验证手机弹出框-->
  31. <div v-show="goValidPhone">
  32. <el-dialog class="valid-phone"
  33. :visible.sync="goValidPhone"
  34. @close="goValidPhoneStep"
  35. size="tiny">
  36. <div class="set-tip">
  37. <p>您的账号未验证手机,请先验证手机号</p>
  38. <a href="/validation/phoneValidation">确定</a>
  39. </div>
  40. </el-dialog>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. export default {
  46. name: 'step-select',
  47. data () {
  48. return {
  49. hasEmail: false,
  50. hasQuestion: false,
  51. goValidPhone: false,
  52. mobile: '',
  53. email: '',
  54. questions: ''
  55. }
  56. },
  57. mounted () {
  58. this.$nextTick(() => {
  59. this.getVerifyWay()
  60. })
  61. },
  62. methods: {
  63. jump (type) {
  64. this.$emit('stepEvent', type)
  65. if (type === 'mobile') {
  66. this.$emit('setDataEvent', this.mobile)
  67. } else if (type === 'email') {
  68. this.$emit('setDataEvent', this.email)
  69. }
  70. },
  71. // 获取验证方式
  72. getVerifyWay () {
  73. this.$http.get('/update/user/checkType')
  74. .then(response => {
  75. if (response.data.success) {
  76. if (response.data.content.mobile) {
  77. this.mobile = response.data.content.mobile
  78. } else {
  79. this.goValidPhone = true
  80. }
  81. if (response.data.content.email) {
  82. this.hasEmail = true
  83. this.email = response.data.content.email
  84. }
  85. if (response.data.content.questions) {
  86. this.hasQuestion = true
  87. this.questions = response.data.content.questions
  88. }
  89. }
  90. }).catch(err => {
  91. console.log(err)
  92. })
  93. },
  94. goValidPhoneStep () {
  95. this.$router.push({ path: '/validation/phoneValidation' })
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped type="text/scss" lang="scss">
  101. .select-item {
  102. padding-top:.5rem;
  103. .item {
  104. position:relative;
  105. padding-left:.4rem;
  106. margin-bottom:.2rem;
  107. line-height: 1.5rem;
  108. background: #f4f4f4;
  109. font-size: .32rem;
  110. span{
  111. color:#505050;
  112. margin-left:.4rem;
  113. }
  114. i{
  115. display:inline-block;
  116. position:absolute;
  117. right:.4rem;
  118. line-height: 1.5rem;
  119. font-size:.45rem;
  120. }
  121. }
  122. }
  123. </style>