|
|
@ -28,7 +28,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
let that = this;
|
|
|
|
let that = this;
|
|
|
|
that.localPath = window.location.href; |
|
|
|
that.localPath = window.location.href; |
|
|
|
that.shareLink = app.globalData.h5url + '?accountId=0000016&key=&code=' + that.localPath.split('#')[1]; |
|
|
|
// that.shareLink = app.globalData.h5url + '?accountId=0000016&key=&code=' + that.localPath.split('#')[1];
|
|
|
|
|
|
|
|
|
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
url: that.localPath.split('#')[0] |
|
|
|
url: that.localPath.split('#')[0] |
|
|
@ -36,7 +36,7 @@ export default { |
|
|
|
/* https://hsg.dctpay.com/hsgH5/index.html?code=081Zb4ml2gamsb4L3nnl2UArrO1Zb4mc&state=1#/physical-merchants/classify/goods-search/goods-search?goodsLabel=%E9%9B%B6%E5%85%83%E8%B4%AD */ |
|
|
|
/* https://hsg.dctpay.com/hsgH5/index.html?code=081Zb4ml2gamsb4L3nnl2UArrO1Zb4mc&state=1#/physical-merchants/classify/goods-search/goods-search?goodsLabel=%E9%9B%B6%E5%85%83%E8%B4%AD */ |
|
|
|
let api = require('../Utils/Api'); |
|
|
|
let api = require('../Utils/Api'); |
|
|
|
that.resVerifyWx = await api.verifyWx(datas); |
|
|
|
that.resVerifyWx = await api.verifyWx(datas); |
|
|
|
console.log(that.resVerifyWx,"doshare"); |
|
|
|
// console.log(that.resVerifyWx,"doshare");
|
|
|
|
that.h5ShareMethod(); |
|
|
|
that.h5ShareMethod(); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
@ -53,10 +53,16 @@ export default { |
|
|
|
if(!that.resVerifyWx){ |
|
|
|
if(!that.resVerifyWx){ |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
that.$set(this.shareH5,"link",that.shareLink) |
|
|
|
|
|
|
|
|
|
|
|
if(this.isGoHome()){ |
|
|
|
|
|
|
|
that.shareLink = app.globalData.h5url + '?accountId=0000016&key=&code=/pages/tabBar/home/home' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
that.shareLink = app.globalData.h5url + '?accountId=0000016&key=&code=' + that.localPath.split('#')[1]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
that.$set(this.shareH5,"link",that.shareLink); |
|
|
|
console.log(that.shareLink,"that.shareLink"); |
|
|
|
console.log(that.shareLink,"that.shareLink"); |
|
|
|
let wx = require('weixin-js-sdk'); |
|
|
|
let wx = require('weixin-js-sdk'); |
|
|
|
// console.log(that.resVerifyWx,"h5ShareMethod");
|
|
|
|
|
|
|
|
if (that.resVerifyWx.return_code == '000000') { |
|
|
|
if (that.resVerifyWx.return_code == '000000') { |
|
|
|
wx.config({ |
|
|
|
wx.config({ |
|
|
|
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
|
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
@ -85,7 +91,17 @@ export default { |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
isGoHome(){ |
|
|
|
|
|
|
|
let arr =[ |
|
|
|
|
|
|
|
"/physical-merchants/settleAccounts/settleAccounts",//订单确认
|
|
|
|
|
|
|
|
"/physical-merchants/classify/order/pay",//收银台页
|
|
|
|
|
|
|
|
"/physical-merchants/classify/order/paymentResult",//支付结果
|
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
let str = this.localPath.split('#')[1]; |
|
|
|
|
|
|
|
str = str.split("?")[0]; |
|
|
|
|
|
|
|
return arr.includes(str) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|