Commit 841f5d16137d8092fe75275248dadd2f549b8c2c
Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa
Showing
7 changed files
with
38 additions
and
8 deletions
packageA/pages/activity_share/activity_share.js
packageA/pages/goods_share/goods_share.js
packageA/pages/live_share/live_share.js
packageA/pages/quan/quan.js
packageA/pages/service_share/service_share.js
| ... | ... | @@ -97,10 +97,11 @@ Page({ |
| 97 | 97 | |
| 98 | 98 | /*** 生命周期函数--监听页面显示***/ |
| 99 | 99 | onShow: function () { |
| 100 | - getApp().check_can_share(); | |
| 100 | + //getApp().check_can_share(); | |
| 101 | + ut.close_menu(); | |
| 101 | 102 | |
| 102 | - var th=this; | |
| 103 | - getApp().getConfig2(function(rs){ | |
| 103 | + var th=this; | |
| 104 | + getApp().getConfig2(function(rs){ | |
| 104 | 105 | //计算等级价相关 |
| 105 | 106 | var swithc_list=rs.switch_list; |
| 106 | 107 | var sw_arr=JSON.parse(swithc_list); | ... | ... |
pages/template/index.js
| ... | ... | @@ -346,6 +346,7 @@ Page({ |
| 346 | 346 | }, |
| 347 | 347 | //---加载更多是靠这个函数---- |
| 348 | 348 | onReachBottom: function () { |
| 349 | + var th=this; | |
| 349 | 350 | if (getApp().globalData.func_list) { |
| 350 | 351 | for (let i in getApp().globalData.func_list) { |
| 351 | 352 | let item = getApp().globalData.func_list[i]; |
| ... | ... | @@ -357,7 +358,8 @@ Page({ |
| 357 | 358 | let goodsGroupArr = this.data.goodsGroupArr |
| 358 | 359 | if (this.data.isTemplate && goodsGroupArr.length > 0) { |
| 359 | 360 | goodsGroupArr.map(item => { |
| 360 | - this[item].automore() | |
| 361 | + if(th[item]) | |
| 362 | + th[item].automore() | |
| 361 | 363 | }) |
| 362 | 364 | } |
| 363 | 365 | }, | ... | ... |
utils/util.js
| ... | ... | @@ -1042,5 +1042,24 @@ module.exports = { |
| 1042 | 1042 | paramObj[key] = value; |
| 1043 | 1043 | } |
| 1044 | 1044 | return paramObj; |
| 1045 | + }, | |
| 1046 | + close_menu(){ | |
| 1047 | + wx.hideShareMenu(); | |
| 1048 | + try{ | |
| 1049 | + wx.offCopyUrl() | |
| 1050 | + //替换掉复制链接 | |
| 1051 | + wx.onCopyUrl(() => { | |
| 1052 | + setTimeout(()=>{ | |
| 1053 | + wx.setClipboardData({ | |
| 1054 | + data: '暂不支持分享', | |
| 1055 | + success (res) { } | |
| 1056 | + }) | |
| 1057 | + },500) | |
| 1058 | + return { query: 'a=1&b=2' } | |
| 1059 | + }) | |
| 1060 | + | |
| 1061 | + }catch(err){ | |
| 1062 | + | |
| 1063 | + } | |
| 1045 | 1064 | } |
| 1046 | 1065 | }; | ... | ... |