From 20ed76522bb10774c19f920807f4ef2fc321742e Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 20 Jan 2021 17:27:47 +0800 Subject: [PATCH] 秒杀,拼团,促销的分享的插入 --- packageA/pages/activity_share/activity_share.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js index 70f5da7..fe8437d 100644 --- a/packageA/pages/activity_share/activity_share.js +++ b/packageA/pages/activity_share/activity_share.js @@ -182,9 +182,14 @@ Page({ th.setData({share_hidden:1,share_good:null}); var ind=3;//秒杀活动分享 - if(item.prom_type==6){ - ind=4; - } + if(th.data.currentIndex==0){ + ind=3;//秒杀活动分享 + }else if(th.data.currentIndex==1){ + ind=4;//拼团 + }else if(th.data.currentIndex==2){ + ind=5;//促销 + } + //插入活动 if(item.prom_type==3){ var hui_active=this.data.hui_active; @@ -210,8 +215,12 @@ Page({ title: title,path:url, }; th.setData({share_hidden:1,share_good:null}); + + var ind=0;//促销 + if(th.data.currentIndex==2){ ind=5;} + //插入活动 - th.insert_act_share(title,hui_active.id); + th.insert_act_share(title,hui_active.id,ind); return ob; } } @@ -533,10 +542,15 @@ Page({ scene+="_"+user_id; } + var ind=3; + if(that.data.currentIndex==1){ + ind=4; + } + if(th.data.share_good.prom_type==3){ - th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id); //插入分享 + th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5); //插入分享 }else{ - th.insert_act_share(th.data.share_good.title,th.data.share_good.id); //插入分享 + th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind); //插入分享 } -- libgit2 0.21.4