stepSelect.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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('before')" v-if="$store.state.option.isLogin.data.content.isLogin">
  9. <img src="/images/all/icon03.png">
  10. <span>通过登录密码</span>
  11. <i class="fa fa-angle-right second"></i>
  12. </li>
  13. <li class="item" @click="jump('mobile')">
  14. <img src="/images/all/icon01.png">
  15. <span>通过验证手机</span>
  16. <i class="fa fa-angle-right second"></i>
  17. </li>
  18. <li class="item" @click="jump('email')" v-if="hasEmail">
  19. <img src="/images/all/icon02.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. </div>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'step-two',
  35. data () {
  36. return {
  37. hasEmail: false
  38. }
  39. },
  40. mounted () {
  41. this.$nextTick(() => {
  42. this.getVerifyWay()
  43. })
  44. },
  45. methods: {
  46. jump (type) {
  47. this.$emit('stepEvent', type)
  48. },
  49. // 获取验证方式
  50. getVerifyWay () {
  51. this.$http.get('/sso/resetPwd/checkType/' + (this.$store.state.option.isLogin.data.content.isLogin ? 'update' : 'reset'))
  52. .then(response => {
  53. if (response.data.success) {
  54. console.log(response.data)
  55. if (response.data.content.email) {
  56. this.hasEmail = true
  57. }
  58. }
  59. }).catch(err => {
  60. console.log(err)
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style scoped type="text/scss" lang="scss">
  67. .select-item {
  68. padding-top:.5rem;
  69. .item {
  70. position:relative;
  71. padding-left:.4rem;
  72. margin-bottom:.2rem;
  73. line-height: 1.5rem;
  74. background: #f4f4f4;
  75. font-size: .32rem;
  76. span{
  77. color:#505050;
  78. margin-left:.4rem;
  79. }
  80. i{
  81. display:inline-block;
  82. position:absolute;
  83. right:.4rem;
  84. line-height: 1.5rem;
  85. font-size:.45rem;
  86. }
  87. }
  88. }
  89. </style>