Commit c590feba35e0611965a4b791b2c4bd5426a7851f
1 parent
dea91f14
服务卡项拼团的 拼团成功页面的会员不判断登陆
Showing
1 changed file
with
20 additions
and
16 deletions
packageA/pages/serviceCard_pd/team_success/team_success.js
... | ... | @@ -482,6 +482,8 @@ Page({ |
482 | 482 | } else { |
483 | 483 | |
484 | 484 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
485 | + | |
486 | + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:''; | |
485 | 487 | //-- 是自定义海报的情况下 -- |
486 | 488 | if (th.data.poster && parseInt(th.data.poster.style) == 2) { |
487 | 489 | //在线上分享人的情况下 |
... | ... | @@ -494,8 +496,8 @@ Page({ |
494 | 496 | //--昵称--- |
495 | 497 | context.setFontSize(24 * unit) |
496 | 498 | context.setFillStyle("black") |
497 | - context.fillText(app.globalData.userInfo.nickname, x1, y1); | |
498 | - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | |
499 | + context.fillText(nick, x1, y1); | |
500 | + var width = 24 * nick.length * unit + 4 * unit; | |
499 | 501 | //强烈推荐 改许程 |
500 | 502 | var tj_path = "../../../../images/share/q_tj.png"; |
501 | 503 | context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); |
... | ... | @@ -509,8 +511,8 @@ Page({ |
509 | 511 | //--昵称--- |
510 | 512 | context.setFontSize(24 * unit) |
511 | 513 | context.setFillStyle("black") |
512 | - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | |
513 | - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | |
514 | + context.fillText(nick, 152 * unit, 76 * unit); | |
515 | + var width = 24 * nick.length * unit + 2 * unit; | |
514 | 516 | //强烈推荐 |
515 | 517 | var tj_path = "../../../../images/share/q_tj.png"; |
516 | 518 | context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); |
... | ... | @@ -806,9 +808,9 @@ Page({ |
806 | 808 | return false; |
807 | 809 | } |
808 | 810 | //---获取分享图片的本地地址,头像和商品图片---- |
809 | - var path2 = getApp().globalData.userInfo.head_pic; | |
811 | + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:''; | |
810 | 812 | if(path2==""){ |
811 | - ee.data.share_head ="../../../images/share/hui_hear_pic.png"; | |
813 | + ee.data.share_head ="../../../../images/share/hui_hear_pic.png"; | |
812 | 814 | tt(func); |
813 | 815 | }else { |
814 | 816 | path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); |
... | ... | @@ -902,10 +904,10 @@ Page({ |
902 | 904 | }, |
903 | 905 | |
904 | 906 | clickShare() { |
905 | - if(!getApp().globalData.user_id){ | |
906 | - getApp().goto("/packageE/pages/togoin/togoin"); | |
907 | - return false; | |
908 | - } | |
907 | + // if(!getApp().globalData.user_id){ | |
908 | + // getApp().goto("/packageE/pages/togoin/togoin"); | |
909 | + // return false; | |
910 | + // } | |
909 | 911 | this.setData({ |
910 | 912 | share_hidden: true, |
911 | 913 | }); |
... | ... | @@ -1053,12 +1055,14 @@ Page({ |
1053 | 1055 | context.setFillStyle('black'); |
1054 | 1056 | context.fillText(shopName, 277 * unit, 60 * unit); |
1055 | 1057 | |
1056 | - // 3.推荐来源 | |
1057 | - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
1058 | - context.setTextAlign('center'); | |
1059 | - context.setFontSize(22 * unit); | |
1060 | - context.setFillStyle('#96959a'); | |
1061 | - context.fillText(fromText, 277 * unit, 105 * unit); | |
1058 | + if(getApp().globalData.userInfo) { | |
1059 | + // 3.推荐来源 | |
1060 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
1061 | + context.setTextAlign('center'); | |
1062 | + context.setFontSize(22 * unit); | |
1063 | + context.setFillStyle('#96959a'); | |
1064 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
1065 | + } | |
1062 | 1066 | |
1063 | 1067 | // 4.海报背景 |
1064 | 1068 | context.setFillStyle('white'); | ... | ... |