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 // #endif
}, },
onHide: function() { onHide: function() {
this.globalData.accountType = ""
} }
} }
</script> </script>

@ -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)
},
}, },

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

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

Loading…
Cancel
Save