页面调整
This commit is contained in:
@@ -96,18 +96,22 @@
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
marketsInfo(this.$Route.query.marketId).then(res =>{
|
||||
this.info = res
|
||||
this.price = res.price
|
||||
this.loding = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
this.getInfo()
|
||||
},
|
||||
methods:{
|
||||
// 获取数据信息
|
||||
getInfo(){
|
||||
marketsInfo(this.$Route.query.marketId).then(res =>{
|
||||
this.info = res
|
||||
this.price = res.price
|
||||
this.loding = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查看锚定产品
|
||||
onGoods(){
|
||||
this.$Router.push({name: 'marketGoods', params: { id: this.info.goods.goods_id }})
|
||||
@@ -151,19 +155,34 @@
|
||||
switch (this.payValue){
|
||||
case 'wechat':
|
||||
let payConfigObj = JSON.parse(res)
|
||||
cashierPay.pay('wxpay', payConfigObj, 'market')
|
||||
cashierPay.pay('wxpay', payConfigObj, 'market').then(() => {
|
||||
this.paySuccess()
|
||||
})
|
||||
break
|
||||
case 'alipay':
|
||||
cashierPay.pay('alipay', res, 'market')
|
||||
cashierPay.pay('alipay', res, 'market').then(() => {
|
||||
this.paySuccess()
|
||||
})
|
||||
break
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 支付结果
|
||||
paySuccess(){
|
||||
this.$refs.payLay.close()
|
||||
uni.showModal({
|
||||
title : '支付成功',
|
||||
content : '购买成功,可在节点中心我的权证中查看',
|
||||
showCancel : false,
|
||||
success : () => {
|
||||
this.$Router.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user