|
@@ -86,7 +86,6 @@ export default {
|
|
|
checked: true,
|
|
|
phoneChecked: true,
|
|
|
btnChecked: true,
|
|
|
- query: '',
|
|
|
tel: '',
|
|
|
setShow: false,
|
|
|
response: {
|
|
@@ -98,17 +97,24 @@ export default {
|
|
|
previewImgId: '',
|
|
|
docSummary: '',
|
|
|
channel: ''
|
|
|
+ },
|
|
|
+ sessioninfor: {
|
|
|
+ query: '',
|
|
|
+ balance: 0,
|
|
|
+ code: '',
|
|
|
+ payTime: '',
|
|
|
+ payWay: ""
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
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.getWordDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
// 文档信息
|
|
|
async getWordDetail () {
|
|
|
- getDetails({ docId: this.query, phone: this.tel }).then((res) => {
|
|
|
+ getDetails({ docId: this.sessioninfor.query, phone: this.tel }).then((res) => {
|
|
|
console.log(res.data.data)
|
|
|
if (res.data.data.error_msg !== '') {
|
|
|
const item = res.data.data.detail
|
|
@@ -136,10 +142,14 @@ export default {
|
|
|
},
|
|
|
// 确定兑换
|
|
|
setExhange () {
|
|
|
- getDocPays({ docId: this.query, phone: this.tel }).then((res) => {
|
|
|
+ getDocPays({ docId: this.sessioninfor.query, phone: this.tel }).then((res) => {
|
|
|
console.log(res)
|
|
|
if (res.data.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.push('/purchasesuccess/' + this.response.price)
|
|
|
}
|
|
|
})
|