|
|
/* eslint-disable no-undef */
|
|
|
import Taro from '@tarojs/taro'
|
|
|
import Taro, { getStorageSync } from '@tarojs/taro'
|
|
|
import event from '../../../utils/event.js'
|
|
|
import {getImgUrl} from '../../../utils';
|
|
|
import {globalData} from '../../../actions/globalData.js';
|
...
|
...
|
@@ -155,7 +155,7 @@ Component({ |
|
|
creatProductDetailSnapShoot() {
|
|
|
var that = this;
|
|
|
const app = getApp() || {};
|
|
|
let userInfo = app.props.globalData.userInfo;
|
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
|
var product = that.properties.shareData;
|
|
|
if(!product){
|
|
|
return
|
...
|
...
|
@@ -200,10 +200,14 @@ Component({ |
|
|
pCtx.setStrokeStyle('#e0e0e0');
|
|
|
|
|
|
/*---------开始新的作画-----------*/
|
|
|
if (userInfo) {
|
|
|
//圆形头像
|
|
|
if (userInfo.avatarUrl) {
|
|
|
let avatarUrl = getImgUrl(userInfo.avatarUrl, logoWidth, logoHeight);
|
|
|
if (avatarUrl) {
|
|
|
userInfo.avatarUrl = avatarUrl;
|
|
|
|
|
|
wx.getImageInfo({
|
|
|
src: userInfo.avatarUrl,
|
|
|
src: avatarUrl,
|
|
|
success:function(res){
|
|
|
pCtx.beginPath();
|
|
|
pCtx.arc(logoLeft+logoWidth/2, logoTop+logoHeight/2, logoWidth/2, 0, 2*Math.PI, false)
|
...
|
...
|
@@ -223,6 +227,7 @@ Component({ |
|
|
pCtx.setFontSize(20*scale)
|
|
|
pCtx.fillText(userInfo.nickName, nameLeft, nameTop)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
pCtx.setFillStyle('#000')
|
|
|
pCtx.setFontSize(12*scale)
|
...
|
...
|
|