|
|
@@ -65,36 +65,7 @@
|
|
|
let isWeiXin = isWx();
|
|
|
if (isWeiXin) {
|
|
|
tools.wxInitialize(["chooseWXPay"]);
|
|
|
- }
|
|
|
- // #endif
|
|
|
-
|
|
|
- this.headH = getNavHeight();
|
|
|
- this.headPTop = getPhoneTopHeight();
|
|
|
-
|
|
|
-
|
|
|
- if (data.code !== undefined) {
|
|
|
- this.code = data.code
|
|
|
- this.code_type = data.img_type
|
|
|
- } else {
|
|
|
- uni.reLaunch({
|
|
|
- url: `/pages/error?msg=` + '店铺信息错误,请重新扫码。'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- payImgInfo({
|
|
|
- code: this.code
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- this.shop_id = res.data.id;
|
|
|
- this.shop_name = res.data.shop_name;
|
|
|
- uni.setStorageSync("shopName", this.shop_name)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- onShow() {
|
|
|
- let isWeiXin = isWx()
|
|
|
- if (isWeiXin){
|
|
|
+
|
|
|
if (href.indexOf('?code=') > -1 || href.indexOf('&code=') > -1) {
|
|
|
const urlArr = href.split('?')
|
|
|
const rightUrlArr = urlArr[1].split('#/')
|
|
|
@@ -124,7 +95,33 @@
|
|
|
// 认证失败
|
|
|
tools.wxLogin();
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+ // #endif
|
|
|
+
|
|
|
+ this.headH = getNavHeight();
|
|
|
+ this.headPTop = getPhoneTopHeight();
|
|
|
+
|
|
|
+
|
|
|
+ if (data.code !== undefined) {
|
|
|
+ this.code = data.code
|
|
|
+ this.code_type = data.img_type
|
|
|
+ } else {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: `/pages/error?msg=` + '店铺信息错误,请重新扫码。'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ payImgInfo({
|
|
|
+ code: this.code
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.shop_id = res.data.id;
|
|
|
+ this.shop_name = res.data.shop_name;
|
|
|
+ uni.setStorageSync("shopName", this.shop_name)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
setNum(item) {
|