Commit 20ed76522bb10774c19f920807f4ef2fc321742e

Authored by yvan.ni
1 parent ccd5f100

秒杀,拼团,促销的分享的插入

packageA/pages/activity_share/activity_share.js
... ... @@ -182,9 +182,14 @@ Page({
182 182 th.setData({share_hidden:1,share_good:null});
183 183  
184 184 var ind=3;//秒杀活动分享
185   - if(item.prom_type==6){
186   - ind=4;
187   - }
  185 + if(th.data.currentIndex==0){
  186 + ind=3;//秒杀活动分享
  187 + }else if(th.data.currentIndex==1){
  188 + ind=4;//拼团
  189 + }else if(th.data.currentIndex==2){
  190 + ind=5;//促销
  191 + }
  192 +
188 193 //插入活动
189 194 if(item.prom_type==3){
190 195 var hui_active=this.data.hui_active;
... ... @@ -210,8 +215,12 @@ Page({
210 215 title: title,path:url,
211 216 };
212 217 th.setData({share_hidden:1,share_good:null});
  218 +
  219 + var ind=0;//促销
  220 + if(th.data.currentIndex==2){ ind=5;}
  221 +
213 222 //插入活动
214   - th.insert_act_share(title,hui_active.id);
  223 + th.insert_act_share(title,hui_active.id,ind);
215 224 return ob;
216 225 }
217 226 }
... ... @@ -533,10 +542,15 @@ Page({
533 542 scene+="_"+user_id;
534 543 }
535 544  
  545 + var ind=3;
  546 + if(that.data.currentIndex==1){
  547 + ind=4;
  548 + }
  549 +
536 550 if(th.data.share_good.prom_type==3){
537   - th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id); //插入分享
  551 + th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5); //插入分享
538 552 }else{
539   - th.insert_act_share(th.data.share_good.title,th.data.share_good.id); //插入分享
  553 + th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind); //插入分享
540 554 }
541 555  
542 556  
... ...