forgetPasswordValidationAccount.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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" @tokenEvent="loadToken" :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 = 'security'
  56. } else if (this.logged) {
  57. this.step = 'select'
  58. } else {
  59. this.step = 'first'
  60. }
  61. },
  62. computed: {
  63. logged () {
  64. return this.$store.state.option.isLogin.data.content
  65. },
  66. isMobile () {
  67. return this.$store.state.option.isMobile
  68. }
  69. },
  70. methods: {
  71. setStepLast (type) {
  72. this.stepLast = type
  73. },
  74. loadToken (type) {
  75. this.tokenId = type
  76. },
  77. setInfo (type) {
  78. this.info = type
  79. },
  80. setStep (type) {
  81. this.step = type
  82. }
  83. }
  84. }
  85. </script>