|
|
@@ -56,7 +56,7 @@
|
|
|
zfbUrl: '',
|
|
|
|
|
|
code_type: 1,
|
|
|
- code: '',
|
|
|
+ shop_code: '',
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -64,8 +64,9 @@
|
|
|
// #ifdef H5
|
|
|
let isWeiXin = isWx();
|
|
|
if (isWeiXin) {
|
|
|
- tools.wxInitialize(["chooseWXPay"]);
|
|
|
+ const href = window.location.href
|
|
|
|
|
|
+ console.log(href);
|
|
|
if (href.indexOf('?code=') > -1 || href.indexOf('&code=') > -1) {
|
|
|
const urlArr = href.split('?')
|
|
|
const rightUrlArr = urlArr[1].split('#/')
|
|
|
@@ -97,14 +98,18 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ if(isWeiXin){
|
|
|
+ tools.wxInitialize(["chooseWXPay"]);
|
|
|
+ }
|
|
|
// #endif
|
|
|
|
|
|
this.headH = getNavHeight();
|
|
|
this.headPTop = getPhoneTopHeight();
|
|
|
|
|
|
|
|
|
- if (data.code !== undefined) {
|
|
|
- this.code = data.code
|
|
|
+ if (data.shop_code !== undefined) {
|
|
|
+ this.shop_code = data.shop_code
|
|
|
this.code_type = data.img_type
|
|
|
} else {
|
|
|
uni.reLaunch({
|
|
|
@@ -114,7 +119,7 @@
|
|
|
}
|
|
|
|
|
|
payImgInfo({
|
|
|
- code: this.code
|
|
|
+ code: this.shop_code
|
|
|
}).then((res) => {
|
|
|
if (res.code === 1) {
|
|
|
this.shop_id = res.data.id;
|
|
|
@@ -161,7 +166,7 @@
|
|
|
this.code_type = 1 //烟草码
|
|
|
}
|
|
|
payPay({
|
|
|
- code: this.code,
|
|
|
+ code: this.shop_code,
|
|
|
pay_money: this.totalNum,
|
|
|
pay_code_source: this.code_type,
|
|
|
pay_type: pay_type,
|
|
|
@@ -170,10 +175,7 @@
|
|
|
}).then((res) => {
|
|
|
|
|
|
if (res.code === 1) {
|
|
|
-
|
|
|
- console.log(res);
|
|
|
- return
|
|
|
-
|
|
|
+
|
|
|
this.order_id = res.data.order_id
|
|
|
|
|
|
if (res.data.is_bank == 0 && res.data.is_yee == 1) {
|