Commit 7bf4e75be46dd8d4782faf004975811d995523fc

Authored by yvan.ni
1 parent a1a735e7

商品详情页面的优化

pages/goods/goodsInfo/goodsInfo.js
@@ -285,6 +285,9 @@ Page({ @@ -285,6 +285,9 @@ Page({
285 istop: 0, //是否置顶风格为1 285 istop: 0, //是否置顶风格为1
286 searchbox_transparent: 1, 286 searchbox_transparent: 1,
287 template_id:[],//订阅消息id 287 template_id:[],//订阅消息id
  288 +
  289 + fir_set_sto:1, //最初始的一下,获取门店
  290 + front_pick:null, //在详情页面上显示的门店
288 }, 291 },
289 292
290 //------初始化加载---------- 293 //------初始化加载----------
@@ -3914,21 +3917,23 @@ Page({ @@ -3914,21 +3917,23 @@ Page({
3914 } 3917 }
3915 if(func) func(); 3918 if(func) func();
3916 }else{ 3919 }else{
3917 -  
3918 if(func) func(); 3920 if(func) func();
3919 th.setData({sp_seleing:0}) 3921 th.setData({sp_seleing:0})
3920 wx.hideLoading(); 3922 wx.hideLoading();
  3923 + th.data.fir_set_sto=0;
3921 } 3924 }
3922 } else { 3925 } else {
3923 if(func) func(); 3926 if(func) func();
3924 th.setData({sp_seleing:0}) 3927 th.setData({sp_seleing:0})
3925 wx.hideLoading(); 3928 wx.hideLoading();
  3929 + th.data.fir_set_sto=0;
3926 } 3930 }
3927 },err=>{ 3931 },err=>{
3928 ut.m_toast('网络繁忙,请稍后重试'); 3932 ut.m_toast('网络繁忙,请稍后重试');
3929 if(func) func(); 3933 if(func) func();
3930 th.setData({sp_seleing:0}) 3934 th.setData({sp_seleing:0})
3931 wx.hideLoading(); 3935 wx.hideLoading();
  3936 + th.data.fir_set_sto=0;
3932 }) 3937 })
3933 }, 200) 3938 }, 200)
3934 3939
@@ -4260,6 +4265,16 @@ Page({ @@ -4260,6 +4265,16 @@ Page({
4260 }) 4265 })
4261 } 4266 }
4262 } 4267 }
  4268 +
  4269 + if(this.data.fir_set_sto==1){
  4270 + if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){
  4271 + let cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store));
  4272 + th.setData({
  4273 + front_pick:cp_data
  4274 + })
  4275 + }
  4276 + }
  4277 +
4263 }, 4278 },
4264 4279
4265 //------------处理线下门店库存-------- 4280 //------------处理线下门店库存--------
@@ -4366,6 +4381,7 @@ Page({ @@ -4366,6 +4381,7 @@ Page({
4366 4381
4367 4382
4368 } else { 4383 } else {
  4384 + th.data.fir_set_sto=0;
4369 th.setData({ 4385 th.setData({
4370 all_sto: null, 4386 all_sto: null,
4371 only_pk: null, 4387 only_pk: null,
@@ -4463,7 +4479,8 @@ Page({ @@ -4463,7 +4479,8 @@ Page({
4463 th.deal_pickup(em); 4479 th.deal_pickup(em);
4464 4480
4465 } else { 4481 } else {
4466 - 4482 +
  4483 + th.data.fir_set_sto=0;
4467 th.setData({ 4484 th.setData({
4468 all_sto: null, 4485 all_sto: null,
4469 only_pk: null, 4486 only_pk: null,
@@ -4473,6 +4490,7 @@ Page({ @@ -4473,6 +4490,7 @@ Page({
4473 4490
4474 } else { 4491 } else {
4475 4492
  4493 + th.data.fir_set_sto=0;
4476 th.setData({ 4494 th.setData({
4477 all_sto: null, 4495 all_sto: null,
4478 only_pk: null, 4496 only_pk: null,