forgetPasswordValidationAccount.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. transition: {
  29. name: 'fade',
  30. mode: 'out-in'
  31. },
  32. data () {
  33. return {
  34. step: 'first',
  35. stepLast: 'new'
  36. }
  37. },
  38. components: {
  39. AccountCenterHeader,
  40. ForgetPasswordValidationAccount,
  41. StepFirst,
  42. StepSelect,
  43. StepNew,
  44. StepLast,
  45. StepSecurity,
  46. StepBefore,
  47. StepMobile,
  48. StepEmail,
  49. StepAppeal
  50. },
  51. mounted () {
  52. if (this.$store.state.option.isLogin.data.content.isLogin) {
  53. this.step = 'select'
  54. }
  55. },
  56. computed: {
  57. isMobile () {
  58. return this.$store.state.option.isMobile
  59. }
  60. },
  61. methods: {
  62. setStep (type) {
  63. this.step = type
  64. }
  65. }
  66. }
  67. </script>