Commit 446c8c3f5c59b92e5974404b15378d163d1f2483
1 parent
c8efca69
分享的添加俩个字段的优化
Showing
3 changed files
with
29 additions
and
19 deletions
packageA/pages/activity_share/activity_share.js
@@ -159,7 +159,7 @@ Page({ | @@ -159,7 +159,7 @@ Page({ | ||
159 | imageUrl: img, | 159 | imageUrl: img, |
160 | }; | 160 | }; |
161 | th.setData({share_hidden:1}); | 161 | th.setData({share_hidden:1}); |
162 | - th.insert_act_share(title,lbid,6); | 162 | + th.insert_act_share(title,lbid,6,null,th.data.hui_active.payMoney); |
163 | return ob; | 163 | return ob; |
164 | }else{ | 164 | }else{ |
165 | //---秒杀,拼团,促销--- | 165 | //---秒杀,拼团,促销--- |
@@ -193,9 +193,9 @@ Page({ | @@ -193,9 +193,9 @@ Page({ | ||
193 | //插入活动 | 193 | //插入活动 |
194 | if(item.prom_type==3){ | 194 | if(item.prom_type==3){ |
195 | var hui_active=this.data.hui_active; | 195 | var hui_active=this.data.hui_active; |
196 | - th.insert_act_share(hui_active.name,hui_active.id,5); | 196 | + th.insert_act_share(hui_active.name,hui_active.id,5,item.goods_sn,price); |
197 | }else{ | 197 | }else{ |
198 | - th.insert_act_share(item.title,item.id,ind); | 198 | + th.insert_act_share(item.title,item.id,ind,item.goods_sn,price); |
199 | } | 199 | } |
200 | 200 | ||
201 | return ob; | 201 | return ob; |
@@ -220,7 +220,7 @@ Page({ | @@ -220,7 +220,7 @@ Page({ | ||
220 | if(th.data.currentIndex==2){ ind=5;} | 220 | if(th.data.currentIndex==2){ ind=5;} |
221 | 221 | ||
222 | //插入活动 | 222 | //插入活动 |
223 | - th.insert_act_share(title,hui_active.id,ind); | 223 | + th.insert_act_share(title,hui_active.id,ind,null,null); |
224 | return ob; | 224 | return ob; |
225 | } | 225 | } |
226 | } | 226 | } |
@@ -546,14 +546,17 @@ Page({ | @@ -546,14 +546,17 @@ Page({ | ||
546 | if(that.data.currentIndex==1){ | 546 | if(that.data.currentIndex==1){ |
547 | ind=4; | 547 | ind=4; |
548 | } | 548 | } |
549 | - | 549 | + |
550 | + //-- 价格 -- | ||
551 | + var pri0 = th.data.share_good.shop_price; | ||
552 | + if (th.data.share_good.price) | ||
553 | + pri0 = th.data.share_good.price; | ||
550 | if(th.data.share_good.prom_type==3){ | 554 | if(th.data.share_good.prom_type==3){ |
551 | - th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5); //插入分享 | 555 | + th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5,th.data.share_good.goods_sn,pri0); //插入分享 |
552 | }else{ | 556 | }else{ |
553 | - th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind); //插入分享 | 557 | + th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind,th.data.share_good.goods_sn,pri0); //插入分享 |
554 | } | 558 | } |
555 | - | ||
556 | - | 559 | + |
557 | ///二微码 | 560 | ///二微码 |
558 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | 561 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
559 | os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | 562 | os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; |
@@ -624,9 +627,7 @@ Page({ | @@ -624,9 +627,7 @@ Page({ | ||
624 | context.setFillStyle("red") | 627 | context.setFillStyle("red") |
625 | context.fillText("¥", 416 * unit, 185 * unit); | 628 | context.fillText("¥", 416 * unit, 185 * unit); |
626 | context.setFontSize(31 * unit) | 629 | context.setFontSize(31 * unit) |
627 | - var pri0 = th.data.share_good.shop_price; | ||
628 | - if (th.data.share_good.price) | ||
629 | - pri0 = th.data.share_good.price; | 630 | + |
630 | 631 | ||
631 | pri0 = parseFloat(pri0).toFixed(2); | 632 | pri0 = parseFloat(pri0).toFixed(2); |
632 | context.fillText(pri0, 438 * unit, 185 * unit); | 633 | context.fillText(pri0, 438 * unit, 185 * unit); |
@@ -1136,7 +1137,7 @@ Page({ | @@ -1136,7 +1137,7 @@ Page({ | ||
1136 | }, | 1137 | }, |
1137 | 1138 | ||
1138 | //-- 推送活动分享 -- | 1139 | //-- 推送活动分享 -- |
1139 | - insert_act_share:function(title,actid,ind){ | 1140 | + insert_act_share:function(title,actid,ind,ShareActNo,ActMoney){ |
1140 | var th = this; | 1141 | var th = this; |
1141 | var url="/api/weshop/sharetypeList/save"; | 1142 | var url="/api/weshop/sharetypeList/save"; |
1142 | var req_data={ | 1143 | var req_data={ |
@@ -1149,6 +1150,11 @@ Page({ | @@ -1149,6 +1150,11 @@ Page({ | ||
1149 | shareTime:ut.gettimestamp(), | 1150 | shareTime:ut.gettimestamp(), |
1150 | storeId:os.stoid | 1151 | storeId:os.stoid |
1151 | } | 1152 | } |
1153 | + | ||
1154 | + if(!ShareActNo) ShareActNo=actid; //如果没有带编号就带活动id | ||
1155 | + if(ActMoney) req_data.ActMoney=ActMoney; //如果金额就要把参数带入 | ||
1156 | + req_data.ShareActNo=ShareActNo; | ||
1157 | + | ||
1152 | //插入数据 | 1158 | //插入数据 |
1153 | getApp().request.post(url,{ | 1159 | getApp().request.post(url,{ |
1154 | data:req_data, | 1160 | data:req_data, |
@@ -1164,8 +1170,8 @@ Page({ | @@ -1164,8 +1170,8 @@ Page({ | ||
1164 | data:req_data, | 1170 | data:req_data, |
1165 | success:function(){} | 1171 | success:function(){} |
1166 | }) | 1172 | }) |
1167 | - | ||
1168 | - | 1173 | + |
1174 | + | ||
1169 | } | 1175 | } |
1170 | 1176 | ||
1171 | 1177 |
packageA/pages/live_share/live_share.js
@@ -207,7 +207,8 @@ Page({ | @@ -207,7 +207,8 @@ Page({ | ||
207 | shareStaffId:th.data.StaffId, | 207 | shareStaffId:th.data.StaffId, |
208 | shareStorageId:th.data.StorageId, | 208 | shareStorageId:th.data.StorageId, |
209 | shareTime:ut.gettimestamp(), | 209 | shareTime:ut.gettimestamp(), |
210 | - storeId:os.stoid | 210 | + storeId:os.stoid, |
211 | + ShareActNo:actid | ||
211 | } | 212 | } |
212 | //插入数据 | 213 | //插入数据 |
213 | getApp().request.post(url,{ | 214 | getApp().request.post(url,{ |
packageA/pages/quan/quan.js
@@ -87,7 +87,7 @@ Page({ | @@ -87,7 +87,7 @@ Page({ | ||
87 | path:url, | 87 | path:url, |
88 | }; | 88 | }; |
89 | th.setData({share_hidden:1}); | 89 | th.setData({share_hidden:1}); |
90 | - th.insert_quan_share(title,th.data.hui_active.id); | 90 | + th.insert_quan_share(title,th.data.hui_active.id,th.data.hui_active.money); |
91 | 91 | ||
92 | return ob; | 92 | return ob; |
93 | }, | 93 | }, |
@@ -179,7 +179,7 @@ Page({ | @@ -179,7 +179,7 @@ Page({ | ||
179 | }, | 179 | }, |
180 | 180 | ||
181 | //-- 推送活动分享 -- | 181 | //-- 推送活动分享 -- |
182 | - insert_quan_share:function(title,actid){ | 182 | + insert_quan_share:function(title,actid,price){ |
183 | var th = this; | 183 | var th = this; |
184 | var url="/api/weshop/sharetypeList/save"; | 184 | var url="/api/weshop/sharetypeList/save"; |
185 | var req_data={ | 185 | var req_data={ |
@@ -190,8 +190,11 @@ Page({ | @@ -190,8 +190,11 @@ Page({ | ||
190 | shareStaffId:th.data.StaffId, | 190 | shareStaffId:th.data.StaffId, |
191 | shareStorageId:th.data.StorageId, | 191 | shareStorageId:th.data.StorageId, |
192 | shareTime:ut.gettimestamp(), | 192 | shareTime:ut.gettimestamp(), |
193 | - storeId:os.stoid | 193 | + storeId:os.stoid, |
194 | + ShareActNo:actid, | ||
195 | + ActMoney:price | ||
194 | } | 196 | } |
197 | + | ||
195 | //插入数据 | 198 | //插入数据 |
196 | getApp().request.post(url,{ | 199 | getApp().request.post(url,{ |
197 | data:req_data, | 200 | data:req_data, |