Commit 5f84310dd6c38f56d1e00aa59b8681c3d9d8c480
1 parent
74373928
拼团分享的优化
Showing
1 changed file
with
26 additions
and
1 deletions
pages/team/team_success/team_success.js
@@ -969,6 +969,10 @@ Page({ | @@ -969,6 +969,10 @@ Page({ | ||
969 | 969 | ||
970 | if (type == 2) { // 阶梯团 | 970 | if (type == 2) { // 阶梯团 |
971 | let list = self.data.prom_act.ct_rylist; | 971 | let list = self.data.prom_act.ct_rylist; |
972 | + if(ut.isString(list)){ | ||
973 | + list=JSON.parse(list); | ||
974 | + } | ||
975 | + | ||
972 | for (let i = 0; i < list.length; i++) { | 976 | for (let i = 0; i < list.length; i++) { |
973 | let item = list[i]; | 977 | let item = list[i]; |
974 | let wi = i * 90 * unit; | 978 | let wi = i * 90 * unit; |
@@ -989,7 +993,7 @@ Page({ | @@ -989,7 +993,7 @@ Page({ | ||
989 | 993 | ||
990 | var wp= 52 * unit; | 994 | var wp= 52 * unit; |
991 | var hp=755 * unit | 995 | var hp=755 * unit |
992 | - self.draw_pos_price(context,wp,hp,self.data.data.market_price,unit); | 996 | + self.draw_pos_price(context,wp,hp,self.data.goods.market_price,unit); |
993 | } | 997 | } |
994 | 998 | ||
995 | 999 | ||
@@ -1011,6 +1015,27 @@ Page({ | @@ -1011,6 +1015,27 @@ Page({ | ||
1011 | }, | 1015 | }, |
1012 | 1016 | ||
1013 | 1017 | ||
1018 | + //---市场价划掉--- | ||
1019 | + draw_pos_price(context, w, h, market_price, unit) { | ||
1020 | + | ||
1021 | + if (!this.data.sys_switch) return false; | ||
1022 | + if (!this.data.sys_switch.is_retail_price) return false; | ||
1023 | + | ||
1024 | + context.setFillStyle("gray") | ||
1025 | + context.setFontSize(22 * unit) | ||
1026 | + var pri0 = "¥" + market_price.toFixed(2); | ||
1027 | + context.fillText(pri0, w, h); | ||
1028 | + | ||
1029 | + var c_h = h - 6; | ||
1030 | + context.setStrokeStyle('gray'); | ||
1031 | + context.setLineWidth(1 * unit); | ||
1032 | + context.moveTo(w - 5, c_h); | ||
1033 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | ||
1034 | + context.stroke(); | ||
1035 | + | ||
1036 | + }, | ||
1037 | + | ||
1038 | + | ||
1014 | 1039 | ||
1015 | 1040 | ||
1016 | 1041 |