Commit cb6a2522fed8cc87d8a8974e111d386c9b5f1ee7
1 parent
d8c18196
多规格的优化
Showing
1 changed file
with
33 additions
and
16 deletions
pages/goods/goodsInfo/goodsInfo.js
| @@ -4044,6 +4044,27 @@ Page({ | @@ -4044,6 +4044,27 @@ Page({ | ||
| 4044 | } | 4044 | } |
| 4045 | }, | 4045 | }, |
| 4046 | 4046 | ||
| 4047 | + | ||
| 4048 | + | ||
| 4049 | + //处理首页的显示门店 | ||
| 4050 | + deal_front_pk(){ | ||
| 4051 | + var th=this; | ||
| 4052 | + if(this.data.fir_set_sto==1){ | ||
| 4053 | + this.data.fir_set_sto=0; | ||
| 4054 | + var cp_data=null | ||
| 4055 | + if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ | ||
| 4056 | + cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); | ||
| 4057 | + } | ||
| 4058 | + th.setData({ | ||
| 4059 | + front_pick:cp_data, | ||
| 4060 | + front_only_pk:th.data.only_pk, | ||
| 4061 | + front_def_pickpu_list:th.data.def_pickpu_list, | ||
| 4062 | + front_pickpu_listt:th.data.pickpu_list, | ||
| 4063 | + front_all_sto:th.data.all_sto, | ||
| 4064 | + }) | ||
| 4065 | + } | ||
| 4066 | + }, | ||
| 4067 | + | ||
| 4047 | //------------处理门店--------------- | 4068 | //------------处理门店--------------- |
| 4048 | deal_pickup(e) { | 4069 | deal_pickup(e) { |
| 4049 | var th = this; | 4070 | var th = this; |
| @@ -4236,6 +4257,11 @@ Page({ | @@ -4236,6 +4257,11 @@ Page({ | ||
| 4236 | }) | 4257 | }) |
| 4237 | } | 4258 | } |
| 4238 | } | 4259 | } |
| 4260 | + | ||
| 4261 | + | ||
| 4262 | + //-- 设置商品详情页面的门店显示情况 --- | ||
| 4263 | + th.deal_front_pk(); | ||
| 4264 | + | ||
| 4239 | } else { | 4265 | } else { |
| 4240 | th.setData({ | 4266 | th.setData({ |
| 4241 | is_show_sto_cat: -1, | 4267 | is_show_sto_cat: -1, |
| @@ -4251,6 +4277,9 @@ Page({ | @@ -4251,6 +4277,9 @@ Page({ | ||
| 4251 | }) | 4277 | }) |
| 4252 | } | 4278 | } |
| 4253 | 4279 | ||
| 4280 | + //-- 设置商品详情页面的门店显示情况 --- | ||
| 4281 | + th.deal_front_pk(); | ||
| 4282 | + | ||
| 4254 | } | 4283 | } |
| 4255 | } | 4284 | } |
| 4256 | }); | 4285 | }); |
| @@ -4268,21 +4297,9 @@ Page({ | @@ -4268,21 +4297,9 @@ Page({ | ||
| 4268 | sto_sele_distr: e.data.data.pageData[0].distr_type | 4297 | sto_sele_distr: e.data.data.pageData[0].distr_type |
| 4269 | }) | 4298 | }) |
| 4270 | } | 4299 | } |
| 4271 | - } | ||
| 4272 | 4300 | ||
| 4273 | - if(this.data.fir_set_sto==1){ | ||
| 4274 | - this.data.fir_set_sto=0; | ||
| 4275 | - var cp_data=null | ||
| 4276 | - if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ | ||
| 4277 | - cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); | ||
| 4278 | - } | ||
| 4279 | - th.setData({ | ||
| 4280 | - front_pick:cp_data, | ||
| 4281 | - front_only_pk:th.data.only_pk, | ||
| 4282 | - front_def_pickpu_list:th.data.def_pickpu_list, | ||
| 4283 | - front_pickpu_listt:th.data.pickpu_list, | ||
| 4284 | - front_all_sto:th.data.all_sto, | ||
| 4285 | - }) | 4301 | + //-- 设置商品详情页面的门店显示情况 --- |
| 4302 | + th.deal_front_pk(); | ||
| 4286 | } | 4303 | } |
| 4287 | 4304 | ||
| 4288 | }, | 4305 | }, |
| @@ -6022,7 +6039,7 @@ Page({ | @@ -6022,7 +6039,7 @@ Page({ | ||
| 6022 | } else { | 6039 | } else { |
| 6023 | console.log(222, goods_id) | 6040 | console.log(222, goods_id) |
| 6024 | wx.navigateTo({ | 6041 | wx.navigateTo({ |
| 6025 | - url: "/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, | 6042 | + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, |
| 6026 | }); | 6043 | }); |
| 6027 | } | 6044 | } |
| 6028 | } | 6045 | } |
| @@ -6030,7 +6047,7 @@ Page({ | @@ -6030,7 +6047,7 @@ Page({ | ||
| 6030 | else { | 6047 | else { |
| 6031 | console.log(1111, th.data.goods_id) | 6048 | console.log(1111, th.data.goods_id) |
| 6032 | wx.navigateTo({ | 6049 | wx.navigateTo({ |
| 6033 | - url: "/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, | 6050 | + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, |
| 6034 | }); | 6051 | }); |
| 6035 | } | 6052 | } |
| 6036 | } | 6053 | } |