Commit 1d4a54493e83ba0307796a038239dd79be09b398

Authored by WXD-SEASON\season
1 parent 1a1af4af

服务卡项秒杀分享进来参数赋值

packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -254,7 +254,9 @@ Page({
254 254 if (gid == undefined || gid == null || gid == "") {
255 255 var gid_str = decodeURIComponent(t.scene);
256 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 260 if(gid_str.length>1 && gid_str[1] && parseInt(gid_str[1])>0){
259 261 first_leader=gid_str[1];
260 262 }
... ... @@ -262,13 +264,19 @@ Page({
262 264 if(gid_str.length>2 && gid_str[2] && parseInt(gid_str[2])>0) {
263 265 room_id=gid_str[2];
264 266 room_user_share=1;
  267 + that.data.options.room_id=room_id;
  268 +
265 269 };
266 270  
267 271 if(gid_str.length>3 && gid_str[3] && parseInt(gid_str[3])>0) {
268 272 prom_type=gid_str[3];
269 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 //-- 设置顶部高度 --
... ...