|
@@ -100,7 +100,6 @@ export default class extends Vue {
|
|
btnChecked = false
|
|
btnChecked = false
|
|
tel = ''
|
|
tel = ''
|
|
regPhoneExg = /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/
|
|
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
|
|
$router: any
|
|
$env: any
|
|
$env: any
|
|
response = {
|
|
response = {
|
|
@@ -113,8 +112,16 @@ export default class extends Vue {
|
|
balance: ''
|
|
balance: ''
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ sessioninfor = {
|
|
|
|
+ query: '',
|
|
|
|
+ balance: 0,
|
|
|
|
+ code: '',
|
|
|
|
+ payTime: '',
|
|
|
|
+ payWay: ''
|
|
|
|
+ }
|
|
|
|
+
|
|
created () {
|
|
created () {
|
|
- this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
|
|
|
|
|
|
+ this.sessioninfor.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
|
|
this.getWordInfor()
|
|
this.getWordInfor()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -150,7 +157,7 @@ export default class extends Vue {
|
|
|
|
|
|
// 文档信息
|
|
// 文档信息
|
|
async getWordInfor () {
|
|
async getWordInfor () {
|
|
- this.getDetails({ docId: this.query }).then((res: any) => {
|
|
|
|
|
|
+ this.getDetails({ docId: this.sessioninfor.query }).then((res: any) => {
|
|
console.log(res)
|
|
console.log(res)
|
|
const item = res.data.detail
|
|
const item = res.data.detail
|
|
if (res.error_code === 0) {
|
|
if (res.error_code === 0) {
|
|
@@ -180,10 +187,14 @@ export default class extends Vue {
|
|
|
|
|
|
// 确定兑换
|
|
// 确定兑换
|
|
exchange () {
|
|
exchange () {
|
|
- this.getDocPay({ docId: this.query, phone: this.tel }).then((res: any) => {
|
|
|
|
|
|
+ this.getDocPay({ docId: this.sessioninfor.query, phone: this.tel }).then((res: any) => {
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res.error_code === 0) {
|
|
if (res.error_code === 0) {
|
|
- sessionStorage.setItem('paydata', JSON.stringify(res.data))
|
|
|
|
|
|
+ this.sessioninfor.balance = res.data.balance
|
|
|
|
+ this.sessioninfor.code = res.data.code
|
|
|
|
+ this.sessioninfor.payTime = res.data.payTime
|
|
|
|
+ this.sessioninfor.payWay = res.data.payWay
|
|
|
|
+ sessionStorage.setItem('paydata', JSON.stringify(this.sessioninfor))
|
|
this.$router.replace('/purchasesuccess/' + this.response.price)
|
|
this.$router.replace('/purchasesuccess/' + this.response.price)
|
|
}
|
|
}
|
|
})
|
|
})
|