Commit c2846e865f6d1031f4f8b85125b3dc369093c7ec
1 parent
ede6219e
直播间分享的优化
Showing
2 changed files
with
20 additions
and
10 deletions
packageA/pages/liveStreamDetails/liveStreamDetails.js
@@ -34,7 +34,8 @@ Page({ | @@ -34,7 +34,8 @@ Page({ | ||
34 | screenWidth: 0, | 34 | screenWidth: 0, |
35 | canvasHidden: 1, | 35 | canvasHidden: 1, |
36 | gid: '', | 36 | gid: '', |
37 | - shareImgPath: '' | 37 | + shareImgPath: '', |
38 | + id:'' | ||
38 | }, | 39 | }, |
39 | 40 | ||
40 | // 点击商品 | 41 | // 点击商品 |
@@ -55,10 +56,10 @@ Page({ | @@ -55,10 +56,10 @@ Page({ | ||
55 | // 分享操作表 | 56 | // 分享操作表 |
56 | clickShare: function () { | 57 | clickShare: function () { |
57 | 58 | ||
58 | - if(!getApp().globalData.user_id){ | ||
59 | - getApp().goto("/packageE/pages/togoin/togoin"); | ||
60 | - return false; | ||
61 | - } | 59 | + // if(!getApp().globalData.user_id){ |
60 | + // getApp().goto("/packageE/pages/togoin/togoin"); | ||
61 | + // return false; | ||
62 | + // } | ||
62 | this.setData({ | 63 | this.setData({ |
63 | showActionSheet: !this.data.showActionSheet | 64 | showActionSheet: !this.data.showActionSheet |
64 | }) | 65 | }) |
@@ -172,9 +173,10 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | @@ -172,9 +173,10 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
172 | }); | 173 | }); |
173 | 174 | ||
174 | 175 | ||
175 | - var path2 = getApp().globalData.userInfo.head_pic; | 176 | + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:''; |
176 | if (path2 == "") { | 177 | if (path2 == "") { |
177 | path2 = "../../../images/share/hui_hear_pic.png"; | 178 | path2 = "../../../images/share/hui_hear_pic.png"; |
179 | + that.data.avatarUrl=path2; | ||
178 | } else { | 180 | } else { |
179 | getApp().request.promiseGet("/api/weshop/marketing/help/help/imgbase64/get", { | 181 | getApp().request.promiseGet("/api/weshop/marketing/help/help/imgbase64/get", { |
180 | data: { | 182 | data: { |
@@ -216,7 +218,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | @@ -216,7 +218,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
216 | 218 | ||
217 | // 请求二维码 | 219 | // 请求二维码 |
218 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | 220 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
219 | - os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | 221 | + os.stoid + "?sceneValue="+this.data.id + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails"; |
220 | 222 | ||
221 | if(!this.data.ewm) { | 223 | if(!this.data.ewm) { |
222 | 224 | ||
@@ -236,8 +238,8 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | @@ -236,8 +238,8 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
236 | 238 | ||
237 | // console.log('----------------v', headImg); | 239 | // console.log('----------------v', headImg); |
238 | 240 | ||
239 | - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | ||
240 | - os.stoid + "?sceneValue=1012" + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails"; | 241 | + //var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
242 | + //os.stoid + "?sceneValue=1012" + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails"; | ||
241 | 243 | ||
242 | // 以iPhone6为例,375/750 = 0.5 | 244 | // 以iPhone6为例,375/750 = 0.5 |
243 | // let scale = this.data.windowWidth / 375; | 245 | // let scale = this.data.windowWidth / 375; |
@@ -515,6 +517,14 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | @@ -515,6 +517,14 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
515 | var staffId=options.staffId; | 517 | var staffId=options.staffId; |
516 | var storageId=options.storageId; | 518 | var storageId=options.storageId; |
517 | 519 | ||
520 | + if(!options.id){ | ||
521 | + var id = decodeURIComponent(t.scene); | ||
522 | + if(id){ | ||
523 | + options.id=id; | ||
524 | + } | ||
525 | + } | ||
526 | + this.data.id=options.id; | ||
527 | + | ||
518 | if(first_leader){ | 528 | if(first_leader){ |
519 | //-- user_id代过来免登录 -- | 529 | //-- user_id代过来免登录 -- |
520 | getApp().globalData.first_leader=first_leader; | 530 | getApp().globalData.first_leader=first_leader; |
packageA/pages/liveStreamDetails/liveStreamDetails.wxml
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | 50 | ||
51 | <!-- 分享 --> | 51 | <!-- 分享 --> |
52 | <view class="share-container"> | 52 | <view class="share-container"> |
53 | - <image wx:if="{{isLogin}}" src="/packageA/images/liveStreamDetails/share.jpg" bindtap="clickShare"></image> | 53 | + <image src="/packageA/images/liveStreamDetails/share.jpg" bindtap="clickShare"></image> |
54 | <image src="/packageA/images/liveStreamDetails/home.jpg" bindtap="backHome"></image> | 54 | <image src="/packageA/images/liveStreamDetails/home.jpg" bindtap="backHome"></image> |
55 | </view> | 55 | </view> |
56 | 56 |