|
@@ -41,7 +41,7 @@
|
|
|
</div>
|
|
|
<div class="doc_bindphone">
|
|
|
<div class="phone_label">手机号码</div>
|
|
|
- <input type="text" value="" placeholder="请输入您的手机号码" class="phone_ipt">
|
|
|
+ <input type="text" :value="tel" placeholder="请输入您的手机号码" class="phone_ipt">
|
|
|
</div>
|
|
|
<div class="doc_balance">
|
|
|
<span class="balance_label">剑鱼币余额:</span>
|
|
@@ -77,6 +77,8 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
checked: true,
|
|
|
+ query: '',
|
|
|
+ tel: '',
|
|
|
response: {
|
|
|
docName: '',
|
|
|
price: '',
|
|
@@ -90,15 +92,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
|
|
|
this.getWordDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
// 文档信息
|
|
|
async getWordDetail () {
|
|
|
- getDetails({ docId: '4e9cf3a8-8853-11eb-8699-0050568f51e7', phone: '18439509554' }).then((res) => {
|
|
|
+ getDetails({ docId: this.query, phone: this.tel }).then((res) => {
|
|
|
console.log(res)
|
|
|
- const item = res.data.detail
|
|
|
- if (res.error_code === 0) {
|
|
|
+ if (res.data.data.status === 1) {
|
|
|
+ let item = res.data.data.detail
|
|
|
+ console.log(item)
|
|
|
this.response.docName = item.docName
|
|
|
this.response.price = item.price
|
|
|
this.response.downTimes = item.downTimes
|
|
@@ -117,11 +121,10 @@ export default {
|
|
|
},
|
|
|
// 确定兑换
|
|
|
setExhange () {
|
|
|
- console.log(111)
|
|
|
- getDocPays({ docId: '4f6c00ba-8882-11eb-8699-0050568f51e7', phone: '18439509554' }).then((res) => {
|
|
|
+ getDocPays({ docId: this.query, phone: this.tel }).then((res) => {
|
|
|
console.log(res)
|
|
|
if (res.error_code === 0) {
|
|
|
- sessionStorage.setItem('paydata',JSON.stringify(res.data))
|
|
|
+ sessionStorage.setItem('paydata', JSON.stringify(res.data))
|
|
|
this.$router.push('/purchasesuccess')
|
|
|
}
|
|
|
})
|