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,6 +482,8 @@ Page({ | ||
| 482 | } else { | 482 | } else { |
| 483 | 483 | ||
| 484 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | 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 | if (th.data.poster && parseInt(th.data.poster.style) == 2) { | 488 | if (th.data.poster && parseInt(th.data.poster.style) == 2) { |
| 487 | //在线上分享人的情况下 | 489 | //在线上分享人的情况下 |
| @@ -494,8 +496,8 @@ Page({ | @@ -494,8 +496,8 @@ Page({ | ||
| 494 | //--昵称--- | 496 | //--昵称--- |
| 495 | context.setFontSize(24 * unit) | 497 | context.setFontSize(24 * unit) |
| 496 | context.setFillStyle("black") | 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 | var tj_path = "../../../../images/share/q_tj.png"; | 502 | var tj_path = "../../../../images/share/q_tj.png"; |
| 501 | context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | 503 | context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); |
| @@ -509,8 +511,8 @@ Page({ | @@ -509,8 +511,8 @@ Page({ | ||
| 509 | //--昵称--- | 511 | //--昵称--- |
| 510 | context.setFontSize(24 * unit) | 512 | context.setFontSize(24 * unit) |
| 511 | context.setFillStyle("black") | 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 | var tj_path = "../../../../images/share/q_tj.png"; | 517 | var tj_path = "../../../../images/share/q_tj.png"; |
| 516 | context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); | 518 | context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); |
| @@ -806,9 +808,9 @@ Page({ | @@ -806,9 +808,9 @@ Page({ | ||
| 806 | return false; | 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 | if(path2==""){ | 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 | tt(func); | 814 | tt(func); |
| 813 | }else { | 815 | }else { |
| 814 | path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | 816 | path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); |
| @@ -902,10 +904,10 @@ Page({ | @@ -902,10 +904,10 @@ Page({ | ||
| 902 | }, | 904 | }, |
| 903 | 905 | ||
| 904 | clickShare() { | 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 | this.setData({ | 911 | this.setData({ |
| 910 | share_hidden: true, | 912 | share_hidden: true, |
| 911 | }); | 913 | }); |
| @@ -1053,12 +1055,14 @@ Page({ | @@ -1053,12 +1055,14 @@ Page({ | ||
| 1053 | context.setFillStyle('black'); | 1055 | context.setFillStyle('black'); |
| 1054 | context.fillText(shopName, 277 * unit, 60 * unit); | 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 | // 4.海报背景 | 1067 | // 4.海报背景 |
| 1064 | context.setFillStyle('white'); | 1068 | context.setFillStyle('white'); |