Commit 1d4a54493e83ba0307796a038239dd79be09b398
1 parent
1a1af4af
服务卡项秒杀分享进来参数赋值
Showing
1 changed file
with
9 additions
and
1 deletions
packageA/pages/goodsInfo/goodsInfo.js
@@ -254,7 +254,9 @@ Page({ | @@ -254,7 +254,9 @@ Page({ | ||
254 | if (gid == undefined || gid == null || gid == "") { | 254 | if (gid == undefined || gid == null || gid == "") { |
255 | var gid_str = decodeURIComponent(t.scene); | 255 | var gid_str = decodeURIComponent(t.scene); |
256 | gid_str=gid_str.split("_"); | 256 | gid_str=gid_str.split("_"); |
257 | - gid=gid_str[0]; | 257 | + gid = parseInt(gid_str[0]); |
258 | + that.data.options.goods_id=gid; | ||
259 | + | ||
258 | if(gid_str.length>1 && gid_str[1] && parseInt(gid_str[1])>0){ | 260 | if(gid_str.length>1 && gid_str[1] && parseInt(gid_str[1])>0){ |
259 | first_leader=gid_str[1]; | 261 | first_leader=gid_str[1]; |
260 | } | 262 | } |
@@ -262,13 +264,19 @@ Page({ | @@ -262,13 +264,19 @@ Page({ | ||
262 | if(gid_str.length>2 && gid_str[2] && parseInt(gid_str[2])>0) { | 264 | if(gid_str.length>2 && gid_str[2] && parseInt(gid_str[2])>0) { |
263 | room_id=gid_str[2]; | 265 | room_id=gid_str[2]; |
264 | room_user_share=1; | 266 | room_user_share=1; |
267 | + that.data.options.room_id=room_id; | ||
268 | + | ||
265 | }; | 269 | }; |
266 | 270 | ||
267 | if(gid_str.length>3 && gid_str[3] && parseInt(gid_str[3])>0) { | 271 | if(gid_str.length>3 && gid_str[3] && parseInt(gid_str[3])>0) { |
268 | prom_type=gid_str[3]; | 272 | prom_type=gid_str[3]; |
269 | prom_id=gid_str[4]; | 273 | prom_id=gid_str[4]; |
274 | + that.data.options.prom_type= parseInt(gid_str[3]); | ||
275 | + that.data.options.prom_id=parseInt(gid_str[4]); | ||
270 | } | 276 | } |
271 | 277 | ||
278 | + this.setData({options: that.data.options}); | ||
279 | + | ||
272 | }; | 280 | }; |
273 | 281 | ||
274 | //-- 设置顶部高度 -- | 282 | //-- 设置顶部高度 -- |