forgetPasswordValidationAccount.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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"/>
  6. <step-before v-if="step === 'before'" @stepEvent="setStep"/>
  7. <step-email v-if="step === 'email'" @stepEvent="setStep"/>
  8. <step-mobile v-if="step === 'mobile'" @stepEvent="setStep"/>
  9. <step-appeal v-if="step === 'appeal'" @stepEvent="setStep"/>
  10. <step-security v-if="step === 'security'" @stepEvent="setStep"/>
  11. <step-new v-if="step === 'new'" @stepEvent="setStep" :stepLast="stepLast"/>
  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. data () {
  29. return {
  30. step: 'before',
  31. stepLast: 'new'
  32. }
  33. },
  34. components: {
  35. AccountCenterHeader,
  36. ForgetPasswordValidationAccount,
  37. StepFirst,
  38. StepSelect,
  39. StepNew,
  40. StepLast,
  41. StepSecurity,
  42. StepBefore,
  43. StepMobile,
  44. StepEmail,
  45. StepAppeal
  46. },
  47. mounted () {
  48. if (this.$store.state.option.isLogin.data.isLogin) {
  49. this.step = 'select'
  50. }
  51. },
  52. computed: {
  53. isMobile () {
  54. return this.$store.state.option.isMobile
  55. }
  56. },
  57. methods: {
  58. setStep (type) {
  59. this.step = type
  60. }
  61. }
  62. }
  63. </script>