Browse Source

Merge branch 'feature/3.0.0-推广员' of http://gogs.1hhd.com/1hjz-3N/1hjz-h5 into feature/3.0.0-推广员

* 'feature/3.0.0-推广员' of http://gogs.1hhd.com/1hjz-3N/1hjz-h5:
  调试分享
  调试分享
  调试分享
feature/3.0.0-推广员
lfs3 6 years ago
parent
commit
350dab025b
2 changed files with 10 additions and 6 deletions
  1. 8
      src/models/wxShare.js
  2. 8
      src/view/home.vue

8
src/models/wxShare.js

@ -7,14 +7,18 @@ import homeApi from "../models/home-model.js";
Vue.prototype.wxShare = function(params) {
var params = params || {};
wxShareModel.getShare(params).then(response => {
if (response.code != 0) {
return;
}
var jsApiSignConfig = response.response.jsApiSignConfig;
var shareConfig = response.response.shareConfig;
alert(shareConfig.title)
alert(shareConfig.desc)
alert(shareConfig.url)
alert(shareConfig.img)
wx.config({
debug: true, // 开启调试模式,开发时可以开启
appId: jsApiSignConfig.appId, // 必填,公众号的唯一标识 由接口返回

8
src/view/home.vue

@ -253,7 +253,7 @@ export default {
merchantNo: merchantNo,
uniqueId:this.uniqueId,
source: 0,
url: encodeURIComponent(location.href)
url: encodeURIComponent(location.href.split('#')[0])
});
},
countExtend() {
@ -264,7 +264,7 @@ export default {
timeStr: this.getTime(Date.now())
};
homeApi.countExtend(params).then(res => {
resolve();
});
});
@ -416,7 +416,7 @@ export default {
// this.getLocation();
this.getData();
let uuniqueId = Qs.parse(location.search.substring(1)).uniqueId
if(uuniqueId !== undefined && uuniqueId !== null && uuniqueId !== ""){
this.countExtend();
uuniqueId = '';
@ -436,7 +436,7 @@ export default {
resolve();
});
});
}
};
</script>

Loading…
Cancel
Save