forgetPasswordValidationAccount.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <div>
  3. <template v-if="isMobile">
  4. <step-first v-if="step === 'first'" @stepEvent="setStep"/>
  5. <step-select v-if="step === 'select'" @stepEvent="setStep" @setDataEvent="setInfo"/>
  6. <step-before v-if="step === 'before'" @stepEvent="setStep"/>
  7. <step-email v-if="step === 'email'" @stepEvent="setStep" :info="info"/>
  8. <step-mobile v-if="step === 'mobile'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
  9. <step-appeal v-if="step === 'appeal'" @stepEvent="setStep" @lastEvent="setStepLast"/>
  10. <step-security v-if="step === 'security'" @stepEvent="setStep" :tokenId="tokenId"/>
  11. <step-new v-if="step === 'new'" @stepEvent="setStep" @lastEvent="setStepLast" :stepLast="stepLast" :tokenId="tokenId"/>
  12. <step-Last v-if="step === 'last'" @stepEvent="setStep" :stepLast="stepLast"/>
  13. </template>
  14. <template v-else>
  15. <accountCenter-header/>
  16. <forgetPassword-validationAccount/>
  17. </template>
  18. </div>
  19. </template>
  20. <script>
  21. import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
  22. import ForgetPasswordValidationAccount from '~components/reset/ForgetPasswordValidationAccount.vue'
  23. import {StepFirst, StepSelect, StepBefore, StepEmail, StepMobile, StepAppeal, StepNew, StepSecurity, StepLast} from '~components/mobile/reset'
  24. export default {
  25. layout (context) {
  26. return context.store.state.option.isMobile ? 'mobile' : 'default'
  27. },
  28. transition: {
  29. name: 'fade',
  30. mode: 'out-in'
  31. },
  32. data () {
  33. return {
  34. step: 'first',
  35. stepLast: 'new',
  36. info: '',
  37. tokenId: ''
  38. }
  39. },
  40. components: {
  41. AccountCenterHeader,
  42. ForgetPasswordValidationAccount,
  43. StepFirst,
  44. StepSelect,
  45. StepNew,
  46. StepLast,
  47. StepSecurity,
  48. StepBefore,
  49. StepMobile,
  50. StepEmail,
  51. StepAppeal
  52. },
  53. mounted () {
  54. if (this.$route.query.token) {
  55. this.step = 'new'
  56. } else if (this.$store.state.option.isLogin.data.content.isLogin) {
  57. this.step = 'select'
  58. }
  59. },
  60. computed: {
  61. isMobile () {
  62. return this.$store.state.option.isMobile
  63. }
  64. },
  65. methods: {
  66. setStepLast (type) {
  67. this.stepLast = type
  68. },
  69. loadToken (type) {
  70. this.tokenId = type
  71. },
  72. setInfo (type) {
  73. this.info = type
  74. },
  75. setStep (type) {
  76. this.step = type
  77. }
  78. }
  79. }
  80. </script>