| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <template>
- <div>
- <template v-if="isMobile">
- <validationEmail-stepSelect v-if="step === 'select'" @stepEvent="setStep" @setDataEvent="setInfo"/>
- <validationEmail-stepMobile v-if="step === 'mobile'" @stepEvent="setStep" @tokenEvent="loadToken" :info="info"/>
- <validationEmail-stepEmail v-if="step === 'email'" @stepEvent="setStep" :info="info"/>
- <validationEmail-stepSecurity v-if="step === 'questions'" @stepEvent="setStep" @tokenEvent="loadToken"/>
- <validationEmail-stepNew v-if="step === 'new'" @stepEvent="setStep" :tokenId="tokenId"/>
- <validationEmail-stepSuccess v-if="step === 'last'" @stepEvent="setStep" :stepLast="stepLast"/>
- <step-appeal v-if="step === 'appeal'" @stepEvent="setStep" @lastEvent="setStepLast"/>
- </template>
- <template v-else>
- <accountCenter-header/>
- <email-validation/>
- </template>
- </div>
- </template>
- <script>
- import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
- import EmailValidation from '~components/validation/EmailValidation.vue'
- import {ValidationEmailStepSelect, ValidationEmailStepMobile, ValidationEmailStepEmail, ValidationEmailStepSecurity, ValidationEmailStepNew, ValidationEmailStepSuccess, StepAppeal} from '~components/mobile/validation'
- export default {
- layout (content) {
- // console.log(content, 'content')
- return content.store.state.option.isMobile ? 'mobile' : 'default'
- },
- transition: {
- name: 'fade',
- mode: 'out-in'
- },
- data () {
- return {
- step: 'select',
- info: '',
- tokenId: '',
- stepLast: 'last'
- }
- },
- components: {
- AccountCenterHeader,
- EmailValidation,
- ValidationEmailStepSelect,
- ValidationEmailStepMobile,
- ValidationEmailStepEmail,
- ValidationEmailStepSecurity,
- ValidationEmailStepNew,
- ValidationEmailStepSuccess,
- StepAppeal
- },
- mounted () {
- if (!this.$route.query.token) {
- if (this.logged.isLogin) {
- this.step = 'select'
- } else {
- this.$router.push('/')
- }
- } else {
- if (this.$route.query.step === '2') {
- this.step = 'new'
- } else if (this.$route.query.step === '3') {
- this.step = 'last'
- this.stepLast = 'last'
- }
- }
- },
- computed: {
- logged () {
- // console.log(this.$store.state.option.isLogin.data.content.isLogin)
- return this.$store.state.option.isLogin.data.content
- },
- isMobile () {
- return this.$store.state.option.isMobile
- }
- },
- methods: {
- setStepLast (type) {
- console.log(type)
- this.stepLast = type
- },
- setStep (step) {
- console.log(step)
- this.step = step
- },
- setInfo (info) {
- this.info = info
- },
- loadToken (token) {
- this.tokenId = token
- }
- }
- }
- </script>
|