Commit d97f6e28cc5849f9d41d512eb9b627b628d3fcbb

Authored by 前端开发-陈颖阳
1 parent 463e69a3

分享人名称显示

packageA/pages/liveStream/liveStream.js
@@ -46,7 +46,8 @@ Page({ @@ -46,7 +46,8 @@ Page({
46 canvasHidden: 1, 46 canvasHidden: 1,
47 gid: '', 47 gid: '',
48 shareImgPath: '', 48 shareImgPath: '',
49 - shartitle: "" 49 + shartitle: "",
  50 + anchorname:""
50 }, 51 },
51 // list: [], 52 // list: [],
52 // live: { 53 // live: {
@@ -342,6 +343,7 @@ Page({ @@ -342,6 +343,7 @@ Page({
342 clickShare: function (e) { 343 clickShare: function (e) {
343 var sharimg = e.currentTarget.dataset.sharimg 344 var sharimg = e.currentTarget.dataset.sharimg
344 var shartitle = e.currentTarget.dataset.shartitle 345 var shartitle = e.currentTarget.dataset.shartitle
  346 + var anchorname= e.currentTarget.dataset.anchorname
345 if (!getApp().globalData.user_id) { 347 if (!getApp().globalData.user_id) {
346 getApp().goto("/packageE/pages/togoin/togoin"); 348 getApp().goto("/packageE/pages/togoin/togoin");
347 return false; 349 return false;
@@ -349,7 +351,8 @@ Page({ @@ -349,7 +351,8 @@ Page({
349 this.setData({ 351 this.setData({
350 showActionSheet: !this.data.showActionSheet, 352 showActionSheet: !this.data.showActionSheet,
351 sharimg: sharimg, 353 sharimg: sharimg,
352 - shartitle: shartitle 354 + shartitle: shartitle,
  355 + anchorname:anchorname
353 }) 356 })
354 }, 357 },
355 358
@@ -526,7 +529,7 @@ Page({ @@ -526,7 +529,7 @@ Page({
526 // 绘制昵称 529 // 绘制昵称
527 ctx.setFontSize(22); 530 ctx.setFontSize(22);
528 ctx.setFillStyle('#ADADAD'); 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 ctx.setFillStyle('#f8f8f8'); 535 ctx.setFillStyle('#f8f8f8');
packageA/pages/liveStream/liveStream.wxml
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 {{item['anchor_name']}}</view> 85 {{item['anchor_name']}}</view>
86 </view> 86 </view>
87 <view style="width: 30%;height: 90rpx;align-items: center;justify-items: center;"> 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 <view class="share-image"></view> 89 <view class="share-image"></view>
90 <view class="fs26" style="color: #fc6247;margin-left: 10rpx;line-height: 46rpx;"> 分享 </view> 90 <view class="fs26" style="color: #fc6247;margin-left: 10rpx;line-height: 46rpx;"> 分享 </view>
91 </view> 91 </view>