Commit d97f6e28cc5849f9d41d512eb9b627b628d3fcbb
1 parent
463e69a3
分享人名称显示
Showing
2 changed files
with
7 additions
and
4 deletions
packageA/pages/liveStream/liveStream.js
... | ... | @@ -46,7 +46,8 @@ Page({ |
46 | 46 | canvasHidden: 1, |
47 | 47 | gid: '', |
48 | 48 | shareImgPath: '', |
49 | - shartitle: "" | |
49 | + shartitle: "", | |
50 | + anchorname:"" | |
50 | 51 | }, |
51 | 52 | // list: [], |
52 | 53 | // live: { |
... | ... | @@ -342,6 +343,7 @@ Page({ |
342 | 343 | clickShare: function (e) { |
343 | 344 | var sharimg = e.currentTarget.dataset.sharimg |
344 | 345 | var shartitle = e.currentTarget.dataset.shartitle |
346 | + var anchorname= e.currentTarget.dataset.anchorname | |
345 | 347 | if (!getApp().globalData.user_id) { |
346 | 348 | getApp().goto("/packageE/pages/togoin/togoin"); |
347 | 349 | return false; |
... | ... | @@ -349,7 +351,8 @@ Page({ |
349 | 351 | this.setData({ |
350 | 352 | showActionSheet: !this.data.showActionSheet, |
351 | 353 | sharimg: sharimg, |
352 | - shartitle: shartitle | |
354 | + shartitle: shartitle, | |
355 | + anchorname:anchorname | |
353 | 356 | }) |
354 | 357 | }, |
355 | 358 | |
... | ... | @@ -526,7 +529,7 @@ Page({ |
526 | 529 | // 绘制昵称 |
527 | 530 | ctx.setFontSize(22); |
528 | 531 | ctx.setFillStyle('#ADADAD'); |
529 | - ctx.fillText(this.data.nickName, 106, 60); | |
532 | + ctx.fillText(app.globalData.userInfo.nickname, 106, 60); | |
530 | 533 | |
531 | 534 | // 绘制主图 |
532 | 535 | ctx.setFillStyle('#f8f8f8'); | ... | ... |
packageA/pages/liveStream/liveStream.wxml
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | {{item['anchor_name']}}</view> |
86 | 86 | </view> |
87 | 87 | <view style="width: 30%;height: 90rpx;align-items: center;justify-items: center;"> |
88 | - <view bindtap="clickShare" data-sharimg="{{item.share_img}}" data-shartitle="{{item.name}}" class="display: flex;" style="width: 70%;border-radius: 25rpx;border: 1rpx solid #fc6247;height: 46rpx;margin-top: 25rpx;margin-left: 30rpx;"> | |
88 | + <view bindtap="clickShare" data-sharimg="{{item.share_img}}" data-shartitle="{{item.name}}" data-anchorname="{{item['anchor_name']}}" class="display: flex;" style="width: 70%;border-radius: 25rpx;border: 1rpx solid #fc6247;height: 46rpx;margin-top: 25rpx;margin-left: 30rpx;"> | |
89 | 89 | <view class="share-image"></view> |
90 | 90 | <view class="fs26" style="color: #fc6247;margin-left: 10rpx;line-height: 46rpx;"> 分享 </view> |
91 | 91 | </view> | ... | ... |