|
@@ -4,10 +4,9 @@
|
|
|
<van-cell-group title="请填写订单信息">
|
|
|
<van-field v-model="userInfo.email" class="field" center placeholder="输入邮箱地址" @blur="checkPass('email')" :error-message="errorMsg.email" />
|
|
|
<transition name="van-slide-right">
|
|
|
- <van-field v-show="true" class="field" center v-model="userInfo.code" @blur="checkPass('code')" placeholder="输入邮箱验证码" :error-message="errorMsg.code">
|
|
|
+ <van-field v-show="true" class="field" center v-model="userInfo.code" maxlength="6" @blur="checkPass('code')" placeholder="输入邮箱验证码" :error-message="errorMsg.code">
|
|
|
<template #button>
|
|
|
- <!-- <countdown-button @click="sendCode" :countdown="120" :disabled="sendButtonDisabled"></countdown-button> -->
|
|
|
- <countdown-button @click="sendCode" :countdown="120"></countdown-button>
|
|
|
+ <countdown-button @click="sendCode" :countdown="120" :disabled="sendButtonDisabled"></countdown-button>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
</transition>
|
|
@@ -42,7 +41,7 @@
|
|
|
<template #title>
|
|
|
<p class="state">
|
|
|
<span>我已阅读,理解并接受</span>
|
|
|
- <a class="link highlight-text" @click="serviceTerms" href="/jyapp/front/staticPage/dataExport_serviceterms.html">《剑鱼标讯线上购买与服务条款》</a>
|
|
|
+ <a class="link highlight-text" @click.stop.prevent="toServiceTerms" href="/jyapp/front/staticPage/dataExport_serviceterms.html">《剑鱼标讯线上购买与服务条款》</a>
|
|
|
</p>
|
|
|
</template>
|
|
|
</van-cell>
|
|
@@ -56,6 +55,7 @@
|
|
|
<script lang="ts">
|
|
|
import { Component, Vue } from 'vue-property-decorator'
|
|
|
import { Field, Cell, CellGroup, Checkbox, CheckboxGroup } from 'vant'
|
|
|
+import { mapActions } from 'vuex'
|
|
|
import countdownButton from '@/components/common/CountDownButton.vue'
|
|
|
import { inputFocusHideFooter } from '@/utils/globalFunctions'
|
|
|
|
|
@@ -68,10 +68,17 @@ import { inputFocusHideFooter } from '@/utils/globalFunctions'
|
|
|
[Checkbox.name]: Checkbox,
|
|
|
[CheckboxGroup.name]: CheckboxGroup,
|
|
|
countdownButton
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions({
|
|
|
+ // getServiceTerms: 'home/getServiceTerms'
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-export default class Buy extends Vue {
|
|
|
+export default class BuyReport extends Vue {
|
|
|
+ // protected getServiceTerms!: any
|
|
|
+
|
|
|
tipText = [
|
|
|
'数据报告将以邮件形式发至您的邮箱',
|
|
|
'数据报告一经购买不支持退货、退款',
|
|
@@ -127,12 +134,12 @@ export default class Buy extends Vue {
|
|
|
return !this.iAgreee || !this.allRegPass
|
|
|
}
|
|
|
|
|
|
- // get sendButtonDisabled () {
|
|
|
- // const type = 'email'
|
|
|
- // const reg = this.errorMsgMap[type].reg
|
|
|
- // const email = this.userInfo[type]
|
|
|
- // return !reg.test(email)
|
|
|
- // }
|
|
|
+ get sendButtonDisabled () {
|
|
|
+ const type = 'email'
|
|
|
+ const reg = this.errorMsgMap[type].reg
|
|
|
+ const email = this.userInfo[type]
|
|
|
+ return !reg.test(email)
|
|
|
+ }
|
|
|
|
|
|
toggleStatementState () {
|
|
|
this.iAgreee = !this.iAgreee
|
|
@@ -197,8 +204,9 @@ export default class Buy extends Vue {
|
|
|
return f
|
|
|
}
|
|
|
|
|
|
- serviceTerms () {
|
|
|
- console.log('serviceTerms')
|
|
|
+ toServiceTerms (e) {
|
|
|
+ this.saveBuyState()
|
|
|
+ // location.href = e.target.href
|
|
|
}
|
|
|
|
|
|
sendCode (cb) {
|
|
@@ -210,9 +218,23 @@ export default class Buy extends Vue {
|
|
|
console.log('sendCode')
|
|
|
}
|
|
|
|
|
|
+ verifyCode () {
|
|
|
+ console.log('verifyCode')
|
|
|
+ }
|
|
|
+
|
|
|
onSubmit () {
|
|
|
console.log(JSON.stringify(this.userInfo))
|
|
|
}
|
|
|
+
|
|
|
+ saveBuyState () {
|
|
|
+ const JSON = {
|
|
|
+ orderInfo: this.orderInfo,
|
|
|
+ userInfo: this.userInfo,
|
|
|
+ allRegPass: this.allRegPass,
|
|
|
+ iAgreee: this.iAgreee,
|
|
|
+ errorMsg: this.errorMsg
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|