Browse Source

调试分享

feature/3.0.0-推广员
nesxy 6 years ago
parent
commit
9b1bded855
2 changed files with 7 additions and 6 deletions
  1. 5
      src/models/wxShare.js
  2. 8
      src/view/home.vue

5
src/models/wxShare.js

@ -7,14 +7,15 @@ 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;
alter(shareConfig)
wx.config({
debug: true, // 开启调试模式,开发时可以开启
appId: jsApiSignConfig.appId, // 必填,公众号的唯一标识 由接口返回

8
src/view/home.vue

@ -250,7 +250,7 @@ export default {
merchantNo: merchantNo,
uniqueId:this.uniqueId,
source: 0,
url: encodeURIComponent(location.href)
url: encodeURIComponent(location.href.split('#')[0])
});
},
countExtend() {
@ -261,7 +261,7 @@ export default {
timeStr: this.getTime(Date.now())
};
homeApi.countExtend(params).then(res => {
resolve();
});
});
@ -413,7 +413,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 = '';
@ -433,7 +433,7 @@ export default {
resolve();
});
});
}
};
</script>

Loading…
Cancel
Save