share-12:54

youmengting-dev
游梦婷 1 year ago
parent b530d80471
commit da427ad29d
  1. 1
      App.vue
  2. 26
      common/share.js
  3. 42
      pages.json
  4. 6
      pages/welcome/welcome.vue

@ -239,7 +239,6 @@
// #endif
},
onHide: function() {
this.globalData.accountType = ""
}
}
</script>

@ -28,7 +28,7 @@ export default {
let that = this;
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 = {
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 */
let api = require('../Utils/Api');
that.resVerifyWx = await api.verifyWx(datas);
console.log(that.resVerifyWx,"doshare");
// console.log(that.resVerifyWx,"doshare");
that.h5ShareMethod();
},
@ -53,10 +53,16 @@ export default {
if(!that.resVerifyWx){
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");
let wx = require('weixin-js-sdk');
// console.log(that.resVerifyWx,"h5ShareMethod");
if (that.resVerifyWx.return_code == '000000') {
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
@ -85,7 +91,17 @@ export default {
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)
},
},

@ -1108,13 +1108,13 @@
}
},
{
"path": "classify/goods-comment/goods-comment",
"style": {
"navigationBarTitleText": "查看评论",
"enablePullDownRefresh": false
}
},
// {
// "path": "classify/goods-comment/goods-comment",
// "style": {
// "navigationBarTitleText": "查看评论",
// "enablePullDownRefresh": false
// }
// },
{
"path": "address/address",
"style": {
@ -1140,13 +1140,13 @@
"softinputMode": "adjustResize"
}
},
{
"path": "classify/order/order",
"style": {
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false
}
},
// {
// "path": "classify/order/order",
// "style": {
// "navigationBarTitleText": "订单列表",
// "enablePullDownRefresh": false
// }
// },
{
"path": "classify/order/orderDetail",
"style": {
@ -1157,13 +1157,13 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "classify/order/editOrder",
"style": {
"navigationBarTitleText": "修改订单",
"enablePullDownRefresh": false
}
},
// {
// "path": "classify/order/editOrder",
// "style": {
// "navigationBarTitleText": "修改订单",
// "enablePullDownRefresh": false
// }
// },
{
"path": "classify/order/pay",

@ -163,9 +163,9 @@
}
if (app.globalData.h5code) {
that.getH5AccessToken();
}
// if (app.globalData.h5code) {
// that.getH5AccessToken();
// }
// #endif
},
methods: {

Loading…
Cancel
Save