|
@@ -51,7 +51,6 @@ import { openId, wechatPay, detail, options } from "@/api/pay"
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- openId: '',
|
|
|
|
// 流量信息
|
|
// 流量信息
|
|
info: {},
|
|
info: {},
|
|
rateplan: {},
|
|
rateplan: {},
|
|
@@ -79,7 +78,7 @@ export default {
|
|
getOpenId(e) {
|
|
getOpenId(e) {
|
|
openId(e.code).then(res => {
|
|
openId(e.code).then(res => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- this.openId = res.data.openid
|
|
|
|
|
|
+ uni.setStorageSync('openId', res.data.openid)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -113,7 +112,7 @@ export default {
|
|
// 下单
|
|
// 下单
|
|
getWechatPay() {
|
|
getWechatPay() {
|
|
wechatPay({
|
|
wechatPay({
|
|
- openId: this.openId,
|
|
|
|
|
|
+ openId: uni.getStorageSync('openId'),
|
|
goodType: 18,
|
|
goodType: 18,
|
|
goodsId: this.goodsId,
|
|
goodsId: this.goodsId,
|
|
ptype: 1,
|
|
ptype: 1,
|
|
@@ -141,7 +140,7 @@ export default {
|
|
WeixinJSBridge.invoke('getBrandWCPayRequest', this.form, function (res) {
|
|
WeixinJSBridge.invoke('getBrandWCPayRequest', this.form, function (res) {
|
|
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
// 支付成功刷新页面
|
|
// 支付成功刷新页面
|
|
- this.getDetail()
|
|
|
|
|
|
+ location.reload();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -299,7 +298,9 @@ export default {
|
|
button {
|
|
button {
|
|
width: calc(100% - 64rpx);
|
|
width: calc(100% - 64rpx);
|
|
height: 92rpx;
|
|
height: 92rpx;
|
|
- line-height: 92rpx;
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
background: linear-gradient(90deg, #F3CF97 0%, #F6E5C4 100%);
|
|
background: linear-gradient(90deg, #F3CF97 0%, #F6E5C4 100%);
|
|
border-radius: 23px;
|
|
border-radius: 23px;
|
|
color: #7C541A;
|
|
color: #7C541A;
|