Commit d321ab604cc0d320610accb00acdece9894ecf20

Authored by 前端开发-陈颖阳
1 parent 78f3c759

直播分享图片头像问题修改

packageA/pages/liveStream/liveStream.js
@@ -427,14 +427,31 @@ Page({ @@ -427,14 +427,31 @@ Page({
427 } 427 }
428 428
429 if(!this.data.avatarUrl) { 429 if(!this.data.avatarUrl) {
  430 + var path2 = getApp().globalData.userInfo.head_pic;
  431 + if (path2 == "") {
  432 + path2 = "../../../images/share/hui_hear_pic.png";
  433 + } else {
  434 + getApp().request.promiseGet("/api/weshop/marketing/help/help/imgbase64/get", {
  435 + data: {
  436 + imgurl:path2
  437 + }
  438 + }).then(res => {
  439 + if (res.data.code == 0) {
  440 + console.log(9999)
  441 + path2 = 'data:image/jpg;base64,' + res.data.data
  442 + that.setData({
  443 + avatarUrl: path2
  444 + });
  445 +
  446 + }
  447 + })
  448 +
  449 +
  450 +
  451 + }
430 452
431 // 请求头像 453 // 请求头像
432 - await that.getImageInfo(app.globalData.userInfo['head_pic']).then(res => {  
433 - that.setData({  
434 - avatarUrl: res.path  
435 - });  
436 - console.log('头像加载成功~')  
437 - }); 454 +
438 } 455 }
439 456
440 // 请求二维码 457 // 请求二维码