Commit 4acbf2112417a50afac9010e226a888d25480e5c
1 parent
a19b7498
分享的优化,已经会员再参与的时候,要带入导购ID
Showing
5 changed files
with
28 additions
and
8 deletions
packageA/pages/activity_share/activity_share.js
... | ... | @@ -159,7 +159,7 @@ Page({ |
159 | 159 | imageUrl: img, |
160 | 160 | }; |
161 | 161 | th.setData({share_hidden:1}); |
162 | - th.insert_act_share(title,lbid); | |
162 | + th.insert_act_share(title,lbid,6); | |
163 | 163 | return ob; |
164 | 164 | }else{ |
165 | 165 | //---秒杀,拼团,促销--- |
... | ... | @@ -180,13 +180,17 @@ Page({ |
180 | 180 | imageUrl: img, |
181 | 181 | }; |
182 | 182 | th.setData({share_hidden:1,share_good:null}); |
183 | - | |
183 | + | |
184 | + var ind=3;//秒杀活动分享 | |
185 | + if(item.prom_type==6){ | |
186 | + ind=4; | |
187 | + } | |
184 | 188 | //插入活动 |
185 | 189 | if(item.prom_type==3){ |
186 | 190 | var hui_active=this.data.hui_active; |
187 | - th.insert_act_share(hui_active.name,hui_active.id); | |
188 | - }else{ | |
189 | - th.insert_act_share(item.title,item.id); | |
191 | + th.insert_act_share(hui_active.name,hui_active.id,5); | |
192 | + }else{ | |
193 | + th.insert_act_share(item.title,item.id,ind); | |
190 | 194 | } |
191 | 195 | |
192 | 196 | return ob; |
... | ... | @@ -1111,13 +1115,13 @@ Page({ |
1111 | 1115 | }, |
1112 | 1116 | |
1113 | 1117 | //-- 推送活动分享 -- |
1114 | - insert_act_share:function(title,actid){ | |
1118 | + insert_act_share:function(title,actid,ind){ | |
1115 | 1119 | var th = this; |
1116 | 1120 | var url="/api/weshop/sharetypeList/save"; |
1117 | 1121 | var req_data={ |
1118 | 1122 | shareActId:actid, |
1119 | 1123 | shareActName:title, |
1120 | - shareType:3, | |
1124 | + shareType:ind, | |
1121 | 1125 | shareUserId:th.data.first_leader, |
1122 | 1126 | shareStaffId:th.data.StaffId, |
1123 | 1127 | shareStorageId:th.data.StorageId, | ... | ... |
packageA/pages/live_share/live_share.js
packageA/pages/quan_list/quan_list.js
... | ... | @@ -108,6 +108,10 @@ Page({ |
108 | 108 | 'store_id': os.stoid, |
109 | 109 | 'type': 5 |
110 | 110 | }; |
111 | + //-- 导购ID -- | |
112 | + if(getApp().globalData.guide_id){ | |
113 | + pdata.guide_id=getApp().globalData.guide_id; | |
114 | + } | |
111 | 115 | var app = getApp(), |
112 | 116 | th = this; |
113 | 117 | app.request.post("/api/weshop/couponList/saveCouponList", { | ... | ... |
packageA/pages/quan_pro/quan_pro.js
... | ... | @@ -102,6 +102,12 @@ Page({ |
102 | 102 | 'store_id': os.stoid, |
103 | 103 | 'type': 5 |
104 | 104 | }; |
105 | + | |
106 | + //-- 分享导购ID -- | |
107 | + if(getApp().globalData.guide_id){ | |
108 | + pdata.guide_id=getApp().globalData.guide_id; | |
109 | + } | |
110 | + | |
105 | 111 | var app = getApp(), |
106 | 112 | th = this; |
107 | 113 | app.request.post("/api/weshop/couponList/saveCouponList", { | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -100,6 +100,12 @@ Page({ |
100 | 100 | "userId": d.user_id, //用户ID |
101 | 101 | "buyFrom": 2 |
102 | 102 | }; |
103 | + | |
104 | + //-- 分享导购要记录 -- | |
105 | + if(getApp().globalData.guide_id){ | |
106 | + json.guide_id=getApp().globalData.guide_id; | |
107 | + } | |
108 | + | |
103 | 109 | var data = JSON.stringify(json); |
104 | 110 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
105 | 111 | ... | ... |