|
@@ -59,7 +59,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="readly">
|
|
|
- <van-checkbox v-model="checked" checked-color="#2ABED1" @click="checkBtn()">我已阅读并同意<a href="javascript:;" class="clause" @click="clause()">《剑鱼文库线上购买及服务条款》</a><a href="javascript:;" class="clause" @click="clause2()">《剑鱼标讯产品与服务线上购买服务条款》</a></van-checkbox>
|
|
|
+ <van-checkbox v-model="checked" checked-color="#2ABED1" @click="checkBtn()">我已阅读并同意<a href="javascript:;" class="clause" @click.stop="clause()">《剑鱼文库线上购买及服务条款》</a><a href="javascript:;" class="clause" @click.stop="clause2()">《剑鱼标讯产品与服务线上购买服务条款》</a></van-checkbox>
|
|
|
</div>
|
|
|
<div class="apply_footer">
|
|
|
<button class="apply_button" :disabled="!this.btnChecked" @click="exchange()">确定兑换</button>
|
|
@@ -72,7 +72,7 @@
|
|
|
import { Component, Vue } from 'vue-property-decorator'
|
|
|
import { Checkbox, CheckboxGroup, Field, CellGroup, Form } from 'vant'
|
|
|
import { mapActions } from 'vuex'
|
|
|
-import { isWeiXinBrowser, formatSize } from '../../utils/globalFunctions'
|
|
|
+import { formatSize } from '../../utils/globalFunctions'
|
|
|
@Component({
|
|
|
name: 'purchase-page',
|
|
|
components: {
|
|
@@ -102,6 +102,7 @@ export default class extends Vue {
|
|
|
regPhoneExg = /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/
|
|
|
query: any
|
|
|
$router: any
|
|
|
+ $env: any
|
|
|
response = {
|
|
|
docName: '',
|
|
|
price: '',
|
|
@@ -115,7 +116,6 @@ export default class extends Vue {
|
|
|
created () {
|
|
|
this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
|
|
|
this.getWordInfor()
|
|
|
- this.getBindPhone()
|
|
|
}
|
|
|
|
|
|
validator (val: any) {
|
|
@@ -148,14 +148,6 @@ export default class extends Vue {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 获取绑定的手机号
|
|
|
- getBindPhone () {
|
|
|
- this.getAccountInfo().then((res: any) => {
|
|
|
- console.log(res)
|
|
|
- this.tel = res.data.phone
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
// 文档信息
|
|
|
async getWordInfor () {
|
|
|
this.getDetails({ docId: this.query }).then((res: any) => {
|
|
@@ -178,6 +170,12 @@ export default class extends Vue {
|
|
|
this.response.balance = res.data.points.balance
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ // 获取绑定的手机号
|
|
|
+ this.getAccountInfo().then((res: any) => {
|
|
|
+ console.log(res)
|
|
|
+ this.tel = res.data.phone
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 确定兑换
|
|
@@ -186,7 +184,7 @@ export default class extends Vue {
|
|
|
console.log(res)
|
|
|
if (res.error_code === 0) {
|
|
|
sessionStorage.setItem('paydata', JSON.stringify(res.data))
|
|
|
- this.$router.push('/purchasesuccess/' + this.response.price)
|
|
|
+ this.$router.replace('/purchasesuccess/' + this.response.price)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -198,10 +196,10 @@ export default class extends Vue {
|
|
|
|
|
|
// 剑鱼标讯产品与服务线上购买服务条款
|
|
|
clause2 () {
|
|
|
- if (!isWeiXinBrowser) {
|
|
|
- location.href = '/front/staticPage/wx-serviceterms.html'
|
|
|
- } else {
|
|
|
+ if (this.$env.platform === 'app') {
|
|
|
location.href = '/jyapp/front/staticPage/dataExport_serviceterms.html'
|
|
|
+ } else {
|
|
|
+ location.href = '/front/staticPage/wx-serviceterms.html'
|
|
|
}
|
|
|
}
|
|
|
}
|