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,7 +159,7 @@ Page({ | ||
159 | imageUrl: img, | 159 | imageUrl: img, |
160 | }; | 160 | }; |
161 | th.setData({share_hidden:1}); | 161 | th.setData({share_hidden:1}); |
162 | - th.insert_act_share(title,lbid); | 162 | + th.insert_act_share(title,lbid,6); |
163 | return ob; | 163 | return ob; |
164 | }else{ | 164 | }else{ |
165 | //---秒杀,拼团,促销--- | 165 | //---秒杀,拼团,促销--- |
@@ -180,13 +180,17 @@ Page({ | @@ -180,13 +180,17 @@ Page({ | ||
180 | imageUrl: img, | 180 | imageUrl: img, |
181 | }; | 181 | }; |
182 | th.setData({share_hidden:1,share_good:null}); | 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 | if(item.prom_type==3){ | 189 | if(item.prom_type==3){ |
186 | var hui_active=this.data.hui_active; | 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 | return ob; | 196 | return ob; |
@@ -1111,13 +1115,13 @@ Page({ | @@ -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 | var th = this; | 1119 | var th = this; |
1116 | var url="/api/weshop/sharetypeList/save"; | 1120 | var url="/api/weshop/sharetypeList/save"; |
1117 | var req_data={ | 1121 | var req_data={ |
1118 | shareActId:actid, | 1122 | shareActId:actid, |
1119 | shareActName:title, | 1123 | shareActName:title, |
1120 | - shareType:3, | 1124 | + shareType:ind, |
1121 | shareUserId:th.data.first_leader, | 1125 | shareUserId:th.data.first_leader, |
1122 | shareStaffId:th.data.StaffId, | 1126 | shareStaffId:th.data.StaffId, |
1123 | shareStorageId:th.data.StorageId, | 1127 | shareStorageId:th.data.StorageId, |
packageA/pages/live_share/live_share.js
@@ -202,7 +202,7 @@ Page({ | @@ -202,7 +202,7 @@ Page({ | ||
202 | var req_data={ | 202 | var req_data={ |
203 | shareActId:actid, | 203 | shareActId:actid, |
204 | shareActName:title, | 204 | shareActName:title, |
205 | - shareType:4, | 205 | + shareType:7, |
206 | shareUserId:th.data.first_leader, | 206 | shareUserId:th.data.first_leader, |
207 | shareStaffId:th.data.StaffId, | 207 | shareStaffId:th.data.StaffId, |
208 | shareStorageId:th.data.StorageId, | 208 | shareStorageId:th.data.StorageId, |
packageA/pages/quan_list/quan_list.js
@@ -108,6 +108,10 @@ Page({ | @@ -108,6 +108,10 @@ Page({ | ||
108 | 'store_id': os.stoid, | 108 | 'store_id': os.stoid, |
109 | 'type': 5 | 109 | 'type': 5 |
110 | }; | 110 | }; |
111 | + //-- 导购ID -- | ||
112 | + if(getApp().globalData.guide_id){ | ||
113 | + pdata.guide_id=getApp().globalData.guide_id; | ||
114 | + } | ||
111 | var app = getApp(), | 115 | var app = getApp(), |
112 | th = this; | 116 | th = this; |
113 | app.request.post("/api/weshop/couponList/saveCouponList", { | 117 | app.request.post("/api/weshop/couponList/saveCouponList", { |
packageA/pages/quan_pro/quan_pro.js
@@ -102,6 +102,12 @@ Page({ | @@ -102,6 +102,12 @@ Page({ | ||
102 | 'store_id': os.stoid, | 102 | 'store_id': os.stoid, |
103 | 'type': 5 | 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 | var app = getApp(), | 111 | var app = getApp(), |
106 | th = this; | 112 | th = this; |
107 | app.request.post("/api/weshop/couponList/saveCouponList", { | 113 | app.request.post("/api/weshop/couponList/saveCouponList", { |
pages/giftpack/giftpacklist/giftpacklist.js
@@ -100,6 +100,12 @@ Page({ | @@ -100,6 +100,12 @@ Page({ | ||
100 | "userId": d.user_id, //用户ID | 100 | "userId": d.user_id, //用户ID |
101 | "buyFrom": 2 | 101 | "buyFrom": 2 |
102 | }; | 102 | }; |
103 | + | ||
104 | + //-- 分享导购要记录 -- | ||
105 | + if(getApp().globalData.guide_id){ | ||
106 | + json.guide_id=getApp().globalData.guide_id; | ||
107 | + } | ||
108 | + | ||
103 | var data = JSON.stringify(json); | 109 | var data = JSON.stringify(json); |
104 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | 110 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
105 | 111 |