Commit b391c2c13f0ff2216e9f3581849077b3ab502a69

Authored by WXD-SEASON\season
1 parent b45d9a0b

撤捎问题

... ... @@ -51,7 +51,7 @@ App({
51 51 config: null, //门店参数
52 52 config2: null, //门店配置
53 53 code: null,
54   - user_id:null,//6520390,//6520352
  54 + user_id:null,//10153869,//6520352,// 10153869,// 6520352,// qa-6519858,//
55 55 // user_id:6520314,// qa-6519858,//
56 56 // user_id:14148118,// qa-6519858,//
57 57 buy_now: null,
... ... @@ -511,60 +511,47 @@ App({
511 511 get_user_store: function (func) {
512 512 var th = this;
513 513 this.getConfig2(function (conf) {
514   -
515   - var is_pricing_open_store=0;
516   - var is_regstores=0;
517   - var is_guide_storage=0;
518   - if (conf.switch_list) {
519   - var t_swi = JSON.parse(conf.switch_list);
520   - //--购买门店是否默认登记门店--
521   - is_regstores=t_swi.is_regstores;
522   - is_pricing_open_store=t_swi.is_pricing_open_store;
523   - is_guide_storage=t_swi.is_guide_storage;
524   - }
525   -
526 514 //---空会员的情况---
527 515 if (!th.globalData.userInfo) {
528   - //没有导购门店 和 没有开启默认导购
529   - if(!th.globalData.guide_pick_id || !is_guide_storage) {
530   - return func(null);
531   - }
  516 + return func(null);
532 517 }
533 518 if (!th.globalData.pk_store) {
534 519 var pick_id = 0;
535 520  
536   - //-- 如果有导购的时候,后台有默认门店只能是导购的门店的时候 --
537   - if(th.globalData.guide_pick_id && is_guide_storage){
538   - pick_id = th.globalData.guide_pick_id
539   - }else {
  521 + var is_pricing_open_store=0;
  522 + var is_regstores=0;
  523 + if (conf.switch_list) {
  524 + var t_swi = JSON.parse(conf.switch_list);
  525 + //--购买门店是否默认登记门店--
  526 + is_regstores=t_swi.is_regstores;
  527 + is_pricing_open_store=t_swi.is_pricing_open_store;
  528 + }
540 529  
541   - //-- 如果是区域价格提现,现在注册门店是默认 --
542   - if (is_pricing_open_store) {
  530 + //-- 如果是区域价格提现,现在注册门店是默认 --
  531 + if(is_pricing_open_store){
543 532  
544   - //查找会员的注册的地址
545   - if (th.globalData.userInfo.pickup_id) {
546   - pick_id = th.globalData.userInfo.pickup_id;
547   - th.globalData.is_dj_pk = 1;
548   - }
549   - //先找一个会员是否有设置默认的地址
550   - else if (th.globalData.userInfo.def_pickup_id) {
551   - pick_id = th.globalData.userInfo.def_pickup_id
552   - }
  533 + //查找会员的注册的地址
  534 + if (th.globalData.userInfo.pickup_id) {
  535 + pick_id = th.globalData.userInfo.pickup_id;
  536 + th.globalData.is_dj_pk=1;
  537 + }
  538 + //先找一个会员是否有设置默认的地址
  539 + else if (th.globalData.userInfo.def_pickup_id) {
  540 + pick_id = th.globalData.userInfo.def_pickup_id
  541 + }
553 542  
554   - } else {
555   - //先找一个会员是否有设置默认的地址
556   - if (th.globalData.userInfo.def_pickup_id) {
557   - pick_id = th.globalData.userInfo.def_pickup_id
558   - }
559   - //查找会员的注册的地址
560   - else if (th.globalData.userInfo.pickup_id && is_regstores) {
561   - pick_id = th.globalData.userInfo.pickup_id
562   - }
  543 + }else{
  544 + //先找一个会员是否有设置默认的地址
  545 + if (th.globalData.userInfo.def_pickup_id) {
  546 + pick_id = th.globalData.userInfo.def_pickup_id
  547 + }
  548 + //查找会员的注册的地址
  549 + else if (th.globalData.userInfo.pickup_id && is_regstores) {
  550 + pick_id = th.globalData.userInfo.pickup_id
563 551 }
564 552 }
565 553  
566 554  
567   -
568 555 //---如果会员没有设置默认门店,同时也没有再注册的时候选择门店--
569 556 if (pick_id == 0) return func(null);
570 557  
... ... @@ -717,7 +704,6 @@ App({
717 704 }
718 705 },
719 706  
720   -
721 707 //清空登录时候缓存的值
722 708 onHide: function () {
723 709 var th = this;
... ... @@ -739,7 +725,6 @@ App({
739 725 th.globalData.dis_buy_obj = null; //等级卡的购买记录
740 726 th.globalData.storeFooter = null; //底部的导航
741 727 th.globalData.full_screen = null; //全屏
742   - th.globalData.guide_pick_id = null; //分享导购门店的优化
743 728 } else {
744 729 th.globalData.no_clear = 0;
745 730 }
... ...
components/diy_store_select/diy_store_select.js
... ... @@ -54,8 +54,7 @@ Component({
54 54 fail: function(res) {
55 55 if(res.errCode == 2) {
56 56 getApp().confirmBox("请开启GPS定位", null, 25000, !1);
57   - }
58   - th.set_fir_store_to_def();
  57 + }
59 58 }
60 59 })
61 60  
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -231,9 +231,7 @@ Page({
231 231 that = ee,
232 232 th = ee,
233 233 gid = t.goods_id,
234   - first_leader=t.first_leader,
235   - room_id = t.room_id,
236   - room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
  234 + first_leader=t.first_leader;
237 235  
238 236 //检查测肤
239 237 getApp().check_skin_face(t,1,gid);
... ... @@ -261,154 +259,212 @@ Page({
261 259 //调用接口判断是不是会员
262 260 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
263 261 if(res.data.code==0) {
264   - getApp().globalData.guide_id=res.data.data.id;
265   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
  262 + getApp().globalData.guide_id=res.data.data.id;
266 263 }
267 264 })
268 265 }
269   -
270   - //-- 如果有房间号 --
271   - if (room_id) {
272   - getApp().globalData.room_id = room_id;
273   - getApp().globalData.room_goods_id = gid;
274   - //如果是会员分享过来的要记录
275   - if (room_user_share)
276   - getApp().globalData.room_user_share = room_user_share;
277   -
278   - if (share_openid) {
279   - this.get_room_share_guide(share_openid);
280   - }
281   - }
282   -
283   -
284   - var c_guide_id=t.c_guide_id;
285   - if(c_guide_id){
286   - th.data.c_guide_id=c_guide_id;
287   - }
  266 +
  267 + var c_guide_id=t.c_guide_id;
  268 + if(c_guide_id){
  269 + th.data.c_guide_id=c_guide_id;
  270 + }
288 271  
289 272 getApp().getConfig(function(e) {
290 273 ee.setData({sto_sele_name_1:e.store_name})
291 274 })
292 275  
293   - //----获取系统参数-----
294   - getApp().getConfig2(function (e) {
295   - ee.setData({
296   - bconfig: e,
297   - sales_rules: e.sales_rules,
298   - });
  276 + //----获取系统参数-----
  277 + getApp().getConfig2(function (e) {
  278 + ee.setData({
  279 + bconfig: e,
  280 + sales_rules: e.sales_rules,
  281 + });
  282 +
  283 + if (e.categoryset.indexOf("," + 1 + ",") != -1) {
  284 + ee.setData({
  285 + is_show_pl: 1
  286 + });
  287 + }
  288 + if (e.categoryset.indexOf("," + 3 + ",") != -1) {
  289 + ee.setData({
  290 + is_show_pp: 1
  291 + });
  292 + }
  293 + if (e.categoryset.indexOf("," + 2 + ",") != -1) {
  294 + ee.setData({
  295 + is_show_gb: 1
  296 + });
  297 + }
  298 + // console.log(e);
  299 + var json_d = JSON.parse(e.switch_list);
  300 + ee.setData({
  301 + store_config: e,
  302 + sys_switch: json_d,
  303 + is_closecoupon: json_d.is_closecoupon,
  304 + is_newsales_rules: json_d.is_newsales_rules
  305 + });
  306 + ee.init(gid);
  307 +
  308 + //------几人评价-------
  309 + //n.init(th, "", "comments");
  310 +
  311 + th.requestCardNum(), wx.pageScrollTo && th.setData({
  312 + supportPageScroll: !0
  313 + });
  314 +
  315 + //计算等级价相关
  316 + // var swithc_list = e.switch_list;
  317 + // var sw_arr = JSON.parse(swithc_list);
  318 + // //---如果后台又开等级卡的开关---
  319 + // if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
  320 + // th.setData({ rank_switch: true });
  321 + // //---回调卡的列表---
  322 + // th.getPlusCardType(function (ob) {
  323 + // th.setData({ card_list: ob.card_list });
  324 + // var ti = setInterval(function () {
  325 + // var user = getApp().globalData.userInfo;
  326 + // if (!user) return false;
  327 + // clearInterval(ti);
  328 + // if (user.card_field && user['card_expiredate']) {
  329 + // var str = user['card_expiredate'].replace(/-/g, '/');
  330 + // var end = new Date(str);
  331 + // end = Date.parse(end) / 1000;
  332 + // var now = ut.gettimestamp();
  333 + // //--- 判断是等级会员,且在有效期范围内 ---
  334 + // if (user.card_field && now < end) {
  335 + // var card_name = ob.name_map.get(user.card_field);
  336 + // //if(card_name.length>6) card_name=card_name.substring(0,6);
  337 +
  338 + // var is_near_date = 0;
  339 + // if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天
  340 + // th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list, is_near_date: is_near_date });
  341 + // }
  342 + // }
  343 + // }, 500)
  344 + // })
  345 + // }
  346 +
  347 + }, 1);
299 348  
300   - if (e.categoryset.indexOf("," + 1 + ",") != -1) {
301   - ee.setData({
302   - is_show_pl: 1
303   - });
304   - }
305   - if (e.categoryset.indexOf("," + 3 + ",") != -1) {
306   - ee.setData({
307   - is_show_pp: 1
308   - });
309   - }
310   - if (e.categoryset.indexOf("," + 2 + ",") != -1) {
311   - ee.setData({
312   - is_show_gb: 1
313   - });
314   - }
315   - // console.log(e);
316   - var json_d = JSON.parse(e.switch_list);
317   - ee.setData({
318   - store_config: e,
319   - sys_switch: json_d,
320   - is_closecoupon: json_d.is_closecoupon,
321   - is_newsales_rules: json_d.is_newsales_rules
322   - });
323   - ee.init(gid);
  349 + //获取用户设备信息,屏幕宽度
  350 + wx.getSystemInfo({
  351 + success: res => {
  352 + that.setData({
  353 + screenWidth: res.screenWidth
  354 + })
  355 + }
  356 + });
  357 +
  358 + //获取用户的默认门店
  359 + getApp().get_user_store(function(e) {
  360 + console.log('get_user_store');
  361 + console.log("999999999");
324 362  
325   - //------几人评价-------
326   - //n.init(th, "", "comments");
327 363  
328   - th.requestCardNum(), wx.pageScrollTo && th.setData({
329   - supportPageScroll: !0
330   - });
  364 + if(!e) {
  365 + th.data.fir_def_store={}; //赋值空对象
  366 + return false;
  367 + }
331 368  
332   - //计算等级价相关
333   - // var swithc_list = e.switch_list;
334   - // var sw_arr = JSON.parse(swithc_list);
335   - // //---如果后台又开等级卡的开关---
336   - // if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
337   - // th.setData({ rank_switch: true });
338   - // //---回调卡的列表---
339   - // th.getPlusCardType(function (ob) {
340   - // th.setData({ card_list: ob.card_list });
341   - // var ti = setInterval(function () {
342   - // var user = getApp().globalData.userInfo;
343   - // if (!user) return false;
344   - // clearInterval(ti);
345   - // if (user.card_field && user['card_expiredate']) {
346   - // var str = user['card_expiredate'].replace(/-/g, '/');
347   - // var end = new Date(str);
348   - // end = Date.parse(end) / 1000;
349   - // var now = ut.gettimestamp();
350   - // //--- 判断是等级会员,且在有效期范围内 ---
351   - // if (user.card_field && now < end) {
352   - // var card_name = ob.name_map.get(user.card_field);
353   - // //if(card_name.length>6) card_name=card_name.substring(0,6);
354   -
355   - // var is_near_date = 0;
356   - // if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天
357   - // th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list, is_near_date: is_near_date });
358   - // }
359   - // }
360   - // }, 500)
361   - // })
362   - // }
363   -
364   - }, 1);
365   -
366   - //获取用户设备信息,屏幕宽度
367   - wx.getSystemInfo({
368   - success: res => {
369   - that.setData({
370   - screenWidth: res.screenWidth
371   - })
372   - }
373   - });
  369 + console.log("000000");
374 370  
375   - },
  371 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
376 372  
377   - //-- 获取直播的分享人的导购信息 --
378   - async get_room_share_guide(share_openid) {
  373 + var ee=JSON.parse(JSON.stringify(e));
379 374  
380   - var url = "/api/weshop/users/page";
381   - var first_leader = 0;
382 375  
383   - //调用接口判断是不是会员
384   - await getApp().request.promiseGet(url, {
385   - data: {
386   - stoid: os.stoid,
387   - weapp_openid: share_openid
388   - }
389   - }).then(res => {
390   - if (ut.ajax_ok(res)) {
391   - first_leader = res.data.data.pageData[0].user_id;
392   - getApp().globalData.guide_id = res.data.data.id;
393   - }
394   - })
  376 + console.log(e);
395 377  
396   - if (!first_leader) return false;
  378 + //--定时器推迟一下--
  379 + setTimeout(function () {
  380 + if(!th.data.data){
  381 + return false;
  382 + }
  383 + var ser_card=th.data.data;
  384 + //--如果默认门店不在等级卡的默认们店以内
  385 + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){
  386 + ee.is_no_dis=1;
  387 + }
397 388  
398   - getApp().globalData.first_leader = first_leader;
  389 + var appd=getApp().globalData;
  390 + var w_time = setInterval(function() {
  391 + if (that.data.is_get_local_ok == 0) return false;
  392 + clearInterval(w_time);
  393 + var distance = null;
  394 + var e=JSON.parse(JSON.stringify(ee));
  395 +
  396 + //如果有开启近距离的话,同时距离优不一样了
  397 + if (that.data.lat != null) {
  398 + //如果经纬度有变化的话
  399 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  400 + that.data.fir_def_store=e;
  401 + that.setData({
  402 + def_pick_store: e,
  403 + sto_sele_name: e.pickup_name,
  404 + sto_sele_id: e.pickup_id,
  405 + sto_sele_distr: e.distr_type,
  406 + sto_sele_keyid:e.keyid,
  407 + })
  408 + }else{
  409 + //要用接口是获取距离,js的计算不准
  410 + getApp().request.promiseGet("/api/weshop/pickup/list",{
  411 + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1},
  412 + }).then(res=>{
  413 + if(ut.ajax_ok(res)){
  414 + e=res.data.data.pageData[0];
  415 + if (e){
  416 + e.is_no_dis=ee.is_no_dis;
  417 + appd.pk_store=e;
  418 + that.data.fir_def_store=e;
  419 +
  420 + console.log('get_user_store--2');
  421 + console.log(e);
  422 +
  423 + that.setData({
  424 + def_pick_store: e,
  425 + sto_sele_name: e.pickup_name,
  426 + sto_sele_id: e.pickup_id,
  427 + sto_sele_distr: e.distr_type,
  428 + sto_sele_keyid:e.keyid,
  429 + })
  430 + }
399 431  
400   - //调用接口判断是不是会员
401   - await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
402   - if (res.data.code == 0) {
403   - getApp().globalData.guide_id = res.data.data.id;
404   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
  432 + }
  433 + })
405 434 }
406   - })
407 435  
408   - },
  436 + //e.distance = distance;
  437 + appd.lat=that.data.lat;
  438 + appd.lon=that.data.lon;
  439 +
  440 + } else {
  441 + if (e) {
  442 +
409 443  
  444 + console.log('get_user_store3---');
  445 + console.log(e);
  446 +
  447 + e.distance = null;
  448 + that.data.fir_def_store=e;
  449 + that.setData({
  450 + def_pick_store: e,
  451 + sto_sele_name: e.pickup_name,
  452 + sto_sele_id: e.pickup_id,
  453 + sto_sele_distr: e.distr_type,
  454 + sto_sele_keyid:e.keyid,
  455 + })
  456 + }
  457 + }
  458 + }, 500)
  459 + },1500)
410 460  
411   - onReady() {
  461 + });
  462 +
  463 +
  464 + },
  465 +
  466 +
  467 + onReady() {
412 468 // 用于控制保障服务折叠图标的显示
413 469 setTimeout(() => {
414 470 wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => {
... ... @@ -615,150 +671,19 @@ Page({
615 671  
616 672 },
617 673  
618   - //检测有没有导购分享的门店
619   - check_guide(func){
620   - var first_leader=getApp().globalData.first_leader;
621   - if(!first_leader){
622   - func();
623   - return false;
624   - }
625   - if(this.data.is_geted_guide_pick){
626   - func();
627   - return false;
628   - }
629   -
630   - if(getApp().globalData.guide_pick_id){
631   - func();
632   - return false;
633   - }
634   - var th=this;
635   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
636   - if (res.data.code == 0) {
637   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
638   - }
639   - th.data.is_geted_guide_pick=1;
640   - func();
641   - })
642   - },
643   -
644 674 //---展示---
645 675 // gid 在onload阶段已经保存在this.data中
646 676 onShow: function() {
647 677  
648 678 getApp().check_can_share();
649 679  
650   - var that=this;var th=this;
  680 + var that=this;
651 681 var ee = this,gid = this.data.gid, i = getApp().request;
652 682 this.data.is_timer = 1;
653   -
654   - //获取用户的默认门店
655   - th.check_guide(()=>{
656   - getApp().get_user_store(function(e) {
657   - console.log('get_user_store');
658   - console.log("999999999");
659   -
660   -
661   - if(!e) {
662   - th.data.fir_def_store={}; //赋值空对象
663   - return false;
664   - }
665   -
666   - console.log("000000");
667   -
668   - if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
669   -
670   - var ee=JSON.parse(JSON.stringify(e));
671   -
672   -
673   - console.log(e);
674   -
675   - //--定时器推迟一下--
676   - setTimeout(function () {
677   - if(!th.data.data){
678   - return false;
679   - }
680   - var ser_card=th.data.data;
681   - //--如果默认门店不在等级卡的默认们店以内
682   - if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){
683   - ee.is_no_dis=1;
684   - }
685   -
686   - var appd=getApp().globalData;
687   - var w_time = setInterval(function() {
688   - if (that.data.is_get_local_ok == 0) return false;
689   - clearInterval(w_time);
690   - var distance = null;
691   - var e=JSON.parse(JSON.stringify(ee));
692   -
693   - //如果有开启近距离的话,同时距离优不一样了
694   - if (that.data.lat != null) {
695   - //如果经纬度有变化的话
696   - if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
697   - that.data.fir_def_store=e;
698   - that.setData({
699   - def_pick_store: e,
700   - sto_sele_name: e.pickup_name,
701   - sto_sele_id: e.pickup_id,
702   - sto_sele_distr: e.distr_type,
703   - sto_sele_keyid:e.keyid,
704   - })
705   - }else{
706   - //要用接口是获取距离,js的计算不准
707   - getApp().request.promiseGet("/api/weshop/pickup/list",{
708   - data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1},
709   - }).then(res=>{
710   - if(ut.ajax_ok(res)){
711   - e=res.data.data.pageData[0];
712   - if (e){
713   - e.is_no_dis=ee.is_no_dis;
714   - appd.pk_store=e;
715   - that.data.fir_def_store=e;
716   -
717   - console.log('get_user_store--2');
718   - console.log(e);
719   -
720   - that.setData({
721   - def_pick_store: e,
722   - sto_sele_name: e.pickup_name,
723   - sto_sele_id: e.pickup_id,
724   - sto_sele_distr: e.distr_type,
725   - sto_sele_keyid:e.keyid,
726   - })
727   - }
728   -
729   - }
730   - })
731   - }
732   -
733   - //e.distance = distance;
734   - appd.lat=that.data.lat;
735   - appd.lon=that.data.lon;
736   -
737   - } else {
738   - if (e) {
739   -
740   -
741   - console.log('get_user_store3---');
742   - console.log(e);
743   -
744   - e.distance = null;
745   - that.data.fir_def_store=e;
746   - that.setData({
747   - def_pick_store: e,
748   - sto_sele_name: e.pickup_name,
749   - sto_sele_id: e.pickup_id,
750   - sto_sele_distr: e.distr_type,
751   - sto_sele_keyid:e.keyid,
752   - })
753   - }
754   - }
755   - }, 500)
756   - },1500)
757   -
758   - });
759   - })
760   -
761 683 this.wait_for_store_config();
  684 +
  685 +
  686 +
762 687  
763 688 i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
764 689 failRollback: !0,
... ... @@ -2580,15 +2505,6 @@ Page({
2580 2505 var ind=ee.currentTarget.dataset.ind;
2581 2506 var bconfig = th.data.bconfig;
2582 2507  
2583   - //--先判断会员状态--
2584   - var user_info = getApp().globalData.userInfo;
2585   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
2586   - wx.navigateTo({
2587   - url: '/packageE/pages/togoin/togoin',
2588   - })
2589   - return false;
2590   - }
2591   -
2592 2508  
2593 2509 //如果开启了,则不在选择门店
2594 2510 if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){
... ...
packageA/pages/liveStreamDetails/liveStreamDetails.js
... ... @@ -523,8 +523,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
523 523 if(res.data.code==0){
524 524 getApp().globalData.guide_id=res.data.data.id;
525 525 getApp().globalData.staffId=staffId;
526   - getApp().globalData.storageId=storageId;
527   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
  526 + getApp().globalData.storageId=storageId;
528 527 }
529 528 })
530 529 }
... ...
packageA/pages/my_service/appment_main.js
... ... @@ -344,16 +344,6 @@ Page({
344 344 },
345 345 //确认选择门店
346 346 choice_store: function() {
347   -
348   - //--先判断会员状态--
349   - var user_info = getApp().globalData.userInfo;
350   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
351   - wx.navigateTo({
352   - url: '/packageE/pages/togoin/togoin',
353   - })
354   - return false;
355   - }
356   -
357 347 var th = this;
358 348 var index = th.data.fir_pick_index;
359 349 var store_name = th.data.store_list[index].StorageName;
... ... @@ -585,7 +575,6 @@ Page({
585 575 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+a.stoid+"/"+options.firstleader,{}).then(res=>{
586 576         if(res.data.code==0){
587 577           getApp().globalData.guide_id=res.data.data.id;
588   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
589 578  
590 579 getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
591 580 data: {
... ...
packageA/pages/prom_list/prom_list.js
... ... @@ -63,7 +63,6 @@ Page({
63 63 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
64 64 if(res.data.code==0){
65 65 getApp().globalData.guide_id=res.data.data.id;
66   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
67 66 }
68 67 })
69 68 }
... ... @@ -90,128 +89,91 @@ Page({
90 89 }
91 90 });
92 91  
  92 + //获取用户的默认门店
  93 + getApp().get_user_store(function(ee) {
  94 + if(!ee) {
  95 + th.data.fir_def_store={}; //赋值空对象
  96 + return false;
  97 + }
93 98  
94   -
95   - },
96   -
97   - //检测有没有导购分享的门店
98   - check_guide(func){
99   - var first_leader=getApp().globalData.first_leader;
100   - if(!first_leader){
101   - func();
102   - return false;
103   - }
104   - if(this.data.is_geted_guide_pick){
105   - func();
106   - return false;
107   - }
108   -
109   - if(getApp().globalData.guide_pick_id){
110   - func();
111   - return false;
112   - }
113   - var th=this;
114   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
115   - if (res.data.code == 0) {
116   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
117   - }
118   - th.data.is_geted_guide_pick=1;
119   - func();
120   - })
121   - },
122   -
123   - //---展示---
124   - onShow: function() {
125   -
126   - getApp().check_can_share();
127   - var ee=this,th=ee,that=ee;
128   -
129   - //先获取一下导购的门店
130   - this.check_guide(()=> {
131   - //获取用户的默认门店
132   - getApp().get_user_store(function (ee) {
133   - if (!ee) {
134   - th.data.fir_def_store = {}; //赋值空对象
135   - return false;
  99 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
  100 +
  101 + var appd=getApp().globalData;
  102 + var w_time = setInterval(function() {
  103 + if (that.data.is_get_local_ok == 0) return false;
  104 + if (!that.data.data) return false;
  105 + clearInterval(w_time);
  106 + var distance = null;
  107 + var e=JSON.parse(JSON.stringify(ee));
  108 +
  109 + if(th.data.data) var g_distr_type=th.data.data.distr_type;
  110 + e.is_no_dis=0;
  111 + if(e.distr_type!=0 && g_distr_type!=0 && e.distr_type!=g_distr_type ){
  112 + e.is_no_dis=1;
136 113 }
137 114  
138   - if (getApp().globalData.is_dj_pk) th.setData({has_def: 1})
139   -
140   - var appd = getApp().globalData;
141   - var w_time = setInterval(function () {
142   - if (that.data.is_get_local_ok == 0) return false;
143   - if (!that.data.data) return false;
144   - clearInterval(w_time);
145   - var distance = null;
146   - var e = JSON.parse(JSON.stringify(ee));
  115 + //如果有开启近距离的话,同时距离优不一样了
  116 + if (that.data.lat != null) {
  117 + //如果经纬度有变化的话
  118 + if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  119 + that.data.fir_def_store=e;
  120 + that.setData({
  121 + def_pick_store: e,
  122 + sto_sele_name: e.pickup_name,
  123 + sto_sele_id: e.pickup_id,
  124 + sto_sele_distr: e.distr_type
  125 + })
  126 + }else{
  127 + //要用接口是获取距离,js的计算不准
  128 + getApp().request.promiseGet("/api/weshop/pickup/list",{
  129 + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon,is_pos: 1},
  130 + }).then(res=>{
  131 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length){
  132 + e=res.data.data.pageData[0];
  133 + if (e){
  134 + appd.pk_store=e;
  135 + that.data.fir_def_store=e;
  136 + that.setData({
  137 + def_pick_store: e,
  138 + sto_sele_name: e.pickup_name,
  139 + sto_sele_id: e.pickup_id,
  140 + sto_sele_distr: e.distr_type
  141 + })
  142 + }
147 143  
148   - if (th.data.data) var g_distr_type = th.data.data.distr_type;
149   - e.is_no_dis = 0;
150   - if (e.distr_type != 0 && g_distr_type != 0 && e.distr_type != g_distr_type) {
151   - e.is_no_dis = 1;
  144 + }
  145 + })
152 146 }
153 147  
154   - //如果有开启近距离的话,同时距离优不一样了
155   - if (that.data.lat != null) {
156   - //如果经纬度有变化的话
157   - if (appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
158   - that.data.fir_def_store = e;
159   - that.setData({
160   - def_pick_store: e,
161   - sto_sele_name: e.pickup_name,
162   - sto_sele_id: e.pickup_id,
163   - sto_sele_distr: e.distr_type
164   - })
165   - } else {
166   - //要用接口是获取距离,js的计算不准
167   - getApp().request.promiseGet("/api/weshop/pickup/list", {
168   - data: {
169   - store_id: os.stoid,
170   - pickup_id: e.pickup_id,
171   - lat: th.data.lat,
172   - lon: th.data.lon,
173   - is_pos: 1
174   - },
175   - }).then(res => {
176   - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
177   - e = res.data.data.pageData[0];
178   - if (e) {
179   - appd.pk_store = e;
180   - that.data.fir_def_store = e;
181   - that.setData({
182   - def_pick_store: e,
183   - sto_sele_name: e.pickup_name,
184   - sto_sele_id: e.pickup_id,
185   - sto_sele_distr: e.distr_type
186   - })
187   - }
  148 + //e.distance = distance;
  149 + appd.lat=that.data.lat;
  150 + appd.lon=that.data.lon;
188 151  
189   - }
190   - })
191   - }
  152 + }else{
  153 + if (e) {
  154 + e.distance = null;
  155 + that.data.fir_def_store=e;
  156 + that.setData({
  157 + def_pick_store: e,
  158 + sto_sele_name: e.pickup_name,
  159 + sto_sele_id: e.pickup_id,
  160 + sto_sele_distr: e.distr_type
  161 + })
  162 + }
  163 + }
192 164  
193   - //e.distance = distance;
194   - appd.lat = that.data.lat;
195   - appd.lon = that.data.lon;
  165 + }, 500)
  166 + });
  167 +
  168 + },
196 169  
197   - } else {
198   - if (e) {
199   - e.distance = null;
200   - that.data.fir_def_store = e;
201   - that.setData({
202   - def_pick_store: e,
203   - sto_sele_name: e.pickup_name,
204   - sto_sele_id: e.pickup_id,
205   - sto_sele_distr: e.distr_type
206   - })
207   - }
208   - }
  170 + //---展示---
  171 + onShow: function() {
209 172  
210   - }, 500)
211   - });
212   - })
  173 + getApp().check_can_share();
213 174  
214   - var gid = this.data.gid,i = getApp().request;
  175 + var ee=this,th=ee,that=ee;
  176 + var gid = this.data.gid,i = getApp().request;
215 177 ee.data.g_buy_num = new Map();
216 178 this.wait_for_store_config();
217 179 clearTimeout(ot);
... ... @@ -1456,16 +1418,6 @@ Page({
1456 1418  
1457 1419 // 选择门店
1458 1420 choice_store: function(ee) {
1459   -
1460   - //--先判断会员状态--
1461   - var user_info = getApp().globalData.userInfo;
1462   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
1463   - wx.navigateTo({
1464   - url: '/packageE/pages/togoin/togoin',
1465   - })
1466   - return false;
1467   - }
1468   -
1469 1421 var th = this;
1470 1422 var ind=ee.currentTarget.dataset.ind;
1471 1423 var bconfig = th.data.bconfig;
... ...
packageA/pages/quan_list/quan_list.js
... ... @@ -24,20 +24,6 @@ Page({
24 24 //------初始化加载----------
25 25 onLoad: function (t) {
26 26 var th = this;
27   -
28   - var first_leader=t.first_leader;
29   - if(first_leader){
30   - //-- user_id代过来免登录 --
31   - getApp().globalData.first_leader=first_leader;
32   - //调用接口判断是不是会员
33   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
34   - if(res.data.code==0){
35   - getApp().globalData.guide_id=res.data.data.id;
36   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
37   - }
38   - })
39   - }
40   -
41 27 getApp().getConfig2(function (conf) {
42 28 if (conf.couponset) conf.couponset = conf.couponset.replace(/\<img/g, '<img style="width:100%;height:auto;display:block"');
43 29 th.setData({ config2: conf });
... ...
packageA/pages/quan_pro/quan_pro.js
... ... @@ -29,7 +29,6 @@ Page({
29 29 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
30 30 if(res.data.code==0){
31 31 getApp().globalData.guide_id=res.data.data.id;
32   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
33 32 }
34 33 })
35 34 }
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -153,39 +153,11 @@ Page({
153 153 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
154 154 if (res.data.code == 0) {
155 155 getApp().globalData.guide_id = res.data.data.id;
156   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
157 156 }
158 157 })
159 158 }
160 159 },
161 160  
162   - //检测有没有导购分享的门店
163   - check_guide(func){
164   - var first_leader=getApp().globalData.first_leader;
165   - if(!first_leader){
166   - func();
167   - return false;
168   - }
169   - if(this.data.is_geted_guide_pick){
170   - func();
171   - return false;
172   - }
173   -
174   - if(getApp().globalData.guide_pick_id){
175   - func();
176   - return false;
177   - }
178   - var th=this;
179   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
180   - if (res.data.code == 0) {
181   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
182   - }
183   - th.data.is_geted_guide_pick=1;
184   - func();
185   - })
186   - },
187   -
188   -
189 161 /**
190 162 * 生命周期函数--监听页面显示
191 163 */
... ... @@ -287,61 +259,59 @@ Page({
287 259 })
288 260 })
289 261  
290   - th.check_guide(()=>{
291   - //获取用户的默认门店
292   - getApp().get_user_store(function (e) {
293   - if (!e) {
294   - th.data.fir_def_store = {}; //赋值空对象
295   - return false;
296   - }
297   - if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
298   -
299   - var ee = JSON.parse(JSON.stringify(e));
300   - var appd = getApp().globalData;
301   - //-- 等待定位系统的开启 --
302   - th.waitfor2(15, 'is_get_local_ok', function () {
  262 + //获取用户的默认门店
  263 + getApp().get_user_store(function (e) {
  264 + if (!e) {
  265 + th.data.fir_def_store = {}; //赋值空对象
  266 + return false;
  267 + }
  268 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
303 269  
304   - if (!th.data.is_get_local_ok) return false;
  270 + var ee = JSON.parse(JSON.stringify(e));
  271 + var appd = getApp().globalData;
  272 + //-- 等待定位系统的开启 --
  273 + th.waitfor2(15, 'is_get_local_ok', function () {
305 274  
306   - var e = JSON.parse(JSON.stringify(ee));
307   - //如果有开启近距离的话,同时距离优不一样了
308   - if (that.data.lat != null) {
309   - //如果经纬度有变化的话
310   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
311   - that.set_def_storage(e);
312   - } else {
313   - //要用接口是获取距离,js的计算不准
314   - getApp().request.promiseGet("/api/weshop/pickup/list", {
315   - data: {
316   - store_id: os.stoid,
317   - pickup_id: e.pickup_id,
318   - is_pos: 1,
319   - lat: th.data.lat,
320   - lon: th.data.lon
321   - },
322   - }).then(res => {
323   - if (res.data.code == 0) {
324   - e = res.data.data.pageData[0];
325   - if (e) {
326   - e.is_no_dis = ee.is_no_dis;
327   - appd.pk_store = e;
328   - that.set_def_storage(e);
329   - }
  275 + if (!th.data.is_get_local_ok) return false;
330 276  
331   - }
332   - })
333   - }
334   - appd.lat = that.data.lat;
335   - appd.lon = that.data.lon;
  277 + var e = JSON.parse(JSON.stringify(ee));
  278 + //如果有开启近距离的话,同时距离优不一样了
  279 + if (that.data.lat != null) {
  280 + //如果经纬度有变化的话
  281 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  282 + that.set_def_storage(e);
336 283 } else {
337   - if (e) {
338   - e.distance = null;
339   - that.set_def_storage(e);
340   - }
  284 + //要用接口是获取距离,js的计算不准
  285 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  286 + data: {
  287 + store_id: os.stoid,
  288 + pickup_id: e.pickup_id,
  289 + is_pos: 1,
  290 + lat: th.data.lat,
  291 + lon: th.data.lon
  292 + },
  293 + }).then(res => {
  294 + if (res.data.code == 0) {
  295 + e = res.data.data.pageData[0];
  296 + if (e) {
  297 + e.is_no_dis = ee.is_no_dis;
  298 + appd.pk_store = e;
  299 + that.set_def_storage(e);
  300 + }
  301 +
  302 + }
  303 + })
341 304 }
342   - })
343   - });
344   - })
  305 + appd.lat = that.data.lat;
  306 + appd.lon = that.data.lon;
  307 + } else {
  308 + if (e) {
  309 + e.distance = null;
  310 + that.set_def_storage(e);
  311 + }
  312 + }
  313 + })
  314 + });
345 315  
346 316 //----获取系统参数-----
347 317 getApp().getConfig2(function (e) {
... ...
packageB/pages/zuhegou/list/list.js
... ... @@ -36,7 +36,6 @@ Page({
36 36 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
37 37 if (res.data.code == 0) {
38 38 getApp().globalData.guide_id = res.data.data.id;
39   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
40 39 }
41 40 })
42 41 }
... ...
packageB/pages/zuhegou/preindex/index.js
... ... @@ -150,39 +150,11 @@ Page({
150 150 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
151 151 if (res.data.code == 0) {
152 152 getApp().globalData.guide_id = res.data.data.id;
153   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
154 153 }
155 154 })
156 155 }
157 156 },
158 157  
159   -
160   - //检测有没有导购分享的门店
161   - check_guide(func){
162   - var first_leader=getApp().globalData.first_leader;
163   - if(!first_leader){
164   - func();
165   - return false;
166   - }
167   - if(this.data.is_geted_guide_pick){
168   - func();
169   - return false;
170   - }
171   -
172   - if(getApp().globalData.guide_pick_id){
173   - func();
174   - return false;
175   - }
176   - var th=this;
177   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
178   - if (res.data.code == 0) {
179   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
180   - }
181   - th.data.is_geted_guide_pick=1;
182   - func();
183   - })
184   - },
185   -
186 158 /**
187 159 * 生命周期函数--监听页面显示
188 160 */
... ... @@ -281,63 +253,60 @@ Page({
281 253 })
282 254 })
283 255  
284   - //先获取一下导购的门店
285   - th.check_guide(()=> {
286   - //获取用户的默认门店
287   - getApp().get_user_store(function (e) {
288   - if (!e) {
289   - th.data.fir_def_store = {}; //赋值空对象
290   - return false;
291   - }
292   -
293   - if (getApp().globalData.is_dj_pk) th.setData({has_def: 1})
  256 + //获取用户的默认门店
  257 + getApp().get_user_store(function (e) {
  258 + if (!e) {
  259 + th.data.fir_def_store = {}; //赋值空对象
  260 + return false;
  261 + }
294 262  
295   - var ee = JSON.parse(JSON.stringify(e));
296   - var appd = getApp().globalData;
297   - //-- 等待定位系统的开启 --
298   - th.waitfor2(15, 'is_get_local_ok', function () {
  263 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
299 264  
300   - if (!th.data.is_get_local_ok) return false;
  265 + var ee = JSON.parse(JSON.stringify(e));
  266 + var appd = getApp().globalData;
  267 + //-- 等待定位系统的开启 --
  268 + th.waitfor2(15, 'is_get_local_ok', function () {
301 269  
302   - var e = JSON.parse(JSON.stringify(ee));
303   - //如果有开启近距离的话,同时距离优不一样了
304   - if (that.data.lat != null) {
305   - //如果经纬度有变化的话
306   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
307   - that.set_def_storage(e);
308   - } else {
309   - //要用接口是获取距离,js的计算不准
310   - getApp().request.promiseGet("/api/weshop/pickup/list", {
311   - data: {
312   - store_id: os.stoid,
313   - pickup_id: e.pickup_id,
314   - is_pos: 1,
315   - lat: th.data.lat,
316   - lon: th.data.lon
317   - },
318   - }).then(res => {
319   - if (res.data.code == 0) {
320   - e = res.data.data.pageData[0];
321   - if (e) {
322   - e.is_no_dis = ee.is_no_dis;
323   - appd.pk_store = e;
324   - that.set_def_storage(e);
325   - }
  270 + if (!th.data.is_get_local_ok) return false;
326 271  
327   - }
328   - })
329   - }
330   - appd.lat = that.data.lat;
331   - appd.lon = that.data.lon;
  272 + var e = JSON.parse(JSON.stringify(ee));
  273 + //如果有开启近距离的话,同时距离优不一样了
  274 + if (that.data.lat != null) {
  275 + //如果经纬度有变化的话
  276 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  277 + that.set_def_storage(e);
332 278 } else {
333   - if (e) {
334   - e.distance = null;
335   - that.set_def_storage(e);
336   - }
  279 + //要用接口是获取距离,js的计算不准
  280 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  281 + data: {
  282 + store_id: os.stoid,
  283 + pickup_id: e.pickup_id,
  284 + is_pos: 1,
  285 + lat: th.data.lat,
  286 + lon: th.data.lon
  287 + },
  288 + }).then(res => {
  289 + if (res.data.code == 0) {
  290 + e = res.data.data.pageData[0];
  291 + if (e) {
  292 + e.is_no_dis = ee.is_no_dis;
  293 + appd.pk_store = e;
  294 + that.set_def_storage(e);
  295 + }
  296 +
  297 + }
  298 + })
337 299 }
338   - })
339   - });
340   - })
  300 + appd.lat = that.data.lat;
  301 + appd.lon = that.data.lon;
  302 + } else {
  303 + if (e) {
  304 + e.distance = null;
  305 + that.set_def_storage(e);
  306 + }
  307 + }
  308 + })
  309 + });
341 310  
342 311 //----获取系统参数-----
343 312 getApp().getConfig2(function (e) {
... ...
packageC/pages/goods/goodsList/goodsList.js
... ... @@ -38,7 +38,6 @@ Page({
38 38 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {
39 39 if (res.data.code == 0) {
40 40 getApp().globalData.guide_id = res.data.data.id;
41   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
42 41 }
43 42 })
44 43 }
... ...
packageC/pages/goods/search/search.js
... ... @@ -46,7 +46,6 @@ Page({
46 46 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {
47 47 if (res.data.code == 0) {
48 48 getApp().globalData.guide_id = res.data.data.id;
49   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
50 49 }
51 50 })
52 51 }
... ...
packageC/pages/group_list/group_list.js
... ... @@ -26,6 +26,7 @@ Page({
26 26 * 生命周期函数--监听页面加载
27 27 */
28 28 onLoad: function (options) {
  29 +<<<<<<< HEAD
29 30  
30 31 self = this;
31 32 //群id
... ... @@ -45,6 +46,9 @@ Page({
45 46 }
46 47 })
47 48 }
  49 +=======
  50 + self = this;
  51 +>>>>>>> parent of 0a8ba509... 分享的时候,要取导购的门店的优化
48 52  
49 53 app.isLogin().then(function(data) {//进入页面前已经授权登录成功
50 54 self.setData({
... ... @@ -171,6 +175,7 @@ Page({
171 175 /**
172 176 * 用户点击右上角分享
173 177 */
  178 +<<<<<<< HEAD
174 179 onShareAppMessage: function () {
175 180 getApp().globalData.no_clear=1;
176 181 var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:'';
... ... @@ -231,6 +236,9 @@ Page({
231 236  
232 237 },
233 238  
  239 +=======
  240 + onShareAppMessage: function () { getApp().globalData.no_clear=1; },
  241 +>>>>>>> parent of 0a8ba509... 分享的时候,要取导购的门店的优化
234 242  
235 243  
236 244 /**
... ...
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
... ... @@ -23,12 +23,11 @@ Page({
23 23 if(first_leader) {
24 24 app.globalData.first_leader = first_leader;
25 25 //调用接口判断是不是会员
26   - app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid + "/" + first_leader, {}).then(res => {
27   - if (res.data.code == 0) {
28   - getApp().globalData.guide_id = res.data.data.id;
29   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
30   - }
31   - })
  26 + // app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid + "/" + first_leader, {}).then(res => {
  27 + // if (res.data.code == 0) {
  28 + // getApp().globalData.guide_id = res.data.data.id;
  29 + // }
  30 + // })
32 31 };
33 32  
34 33 app.isLogin().then(function(data) {
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -283,8 +283,7 @@ Page({
283 283 canBuy: false,
284 284 btnHidden: false,
285 285  
286   - hiddenCS: true,
287   - is_get_guide:0,
  286 + hiddenCS: true,
288 287 },
289 288  
290 289 //------初始化加载----------
... ... @@ -310,8 +309,6 @@ Page({
310 309 prom_type = t.prom_type,
311 310 prom_id = t.group_id; //活动ID
312 311  
313   - var share_openid = t.share_openid;
314   -
315 312 if (prom_type) {
316 313 // this.data.prom_type = prom_type;
317 314 // this.data.prom_id = prom_id;
... ... @@ -400,7 +397,6 @@ Page({
400 397 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
401 398 if (res.data.code == 0) {
402 399 getApp().globalData.guide_id = res.data.data.id;
403   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
404 400 }
405 401 })
406 402 }
... ... @@ -412,10 +408,6 @@ Page({
412 408 //如果是会员分享过来的要记录
413 409 if (room_user_share)
414 410 getApp().globalData.room_user_share = room_user_share;
415   -
416   - if (share_openid) {
417   - this.get_room_share_guide(share_openid);
418   - }
419 411 }
420 412  
421 413 var c_guide_id = t.c_guide_id;
... ... @@ -514,7 +506,64 @@ Page({
514 506 }
515 507 });
516 508  
  509 + //获取用户的默认门店
  510 + getApp().get_user_store(function (e) {
  511 + if (!e) {
  512 + th.data.fir_def_store = {}; //赋值空对象
  513 + return false;
  514 + }
  515 +
  516 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
  517 + var ee = JSON.parse(JSON.stringify(e));
  518 + //--定时器推迟一下--
  519 + setTimeout(function () {
  520 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  521 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  522 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  523 + ee.is_no_dis = 1;
  524 + }
  525 +
  526 + var appd = getApp().globalData;
  527 + var w_time = setInterval(function () {
  528 + if (that.data.is_get_local_ok == 0) return false;
  529 + clearInterval(w_time);
  530 + var distance = null;
  531 + var e = JSON.parse(JSON.stringify(ee));
  532 +
  533 + //如果有开启近距离的话,同时距离优不一样了
  534 + if (that.data.lat != null) {
  535 + //如果经纬度有变化的话
  536 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  537 + that.set_def_storage(e);
  538 + } else {
  539 + //要用接口是获取距离,js的计算不准
  540 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  541 + data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon, is_pos: 1 },
  542 + }).then(res => {
  543 + if (res.data.code == 0) {
  544 + e = res.data.data.pageData[0];
  545 + if (e) {
  546 + e.is_no_dis = ee.is_no_dis;
  547 + appd.pk_store = e;
  548 + that.set_def_storage(e);
  549 + }
  550 +
  551 + }
  552 + })
  553 + }
  554 + //e.distance = distance;
  555 + appd.lat = that.data.lat;
  556 + appd.lon = that.data.lon;
517 557  
  558 + } else {
  559 + if (e) {
  560 + e.distance = null;
  561 + that.set_def_storage(e);
  562 + }
  563 + }
  564 + }, 500)
  565 + }, 700)
  566 + });
518 567  
519 568 //更新点击量
520 569 //noinspection JSUnresolvedFunction
... ... @@ -536,39 +585,6 @@ Page({
536 585 }
537 586 },
538 587  
539   - //-- 获取直播的分享人的导购信息 --
540   - async get_room_share_guide(share_openid) {
541   -
542   - var url = "/api/weshop/users/page";
543   - var first_leader = 0;
544   -
545   - //调用接口判断是不是会员
546   - await getApp().request.promiseGet(url, {
547   - data: {
548   - stoid: os.stoid,
549   - weapp_openid: share_openid
550   - }
551   - }).then(res => {
552   - if (ut.ajax_ok(res)) {
553   - first_leader = res.data.data.pageData[0].user_id;
554   - getApp().globalData.guide_id = res.data.data.id;
555   - }
556   - })
557   -
558   - if (!first_leader) return false;
559   -
560   - getApp().globalData.first_leader = first_leader;
561   -
562   - //调用接口判断是不是会员
563   - await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
564   - if (res.data.code == 0) {
565   - getApp().globalData.guide_id = res.data.data.id;
566   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
567   - }
568   - })
569   -
570   - },
571   -
572 588  
573 589 //--- 设置一下默认库存的数量 ----
574 590 set_def_storage(ee) {
... ... @@ -789,6 +805,15 @@ Page({
789 805 })
790 806  
791 807  
  808 +
  809 +
  810 +
  811 +
  812 +
  813 +
  814 +
  815 +
  816 +
792 817 ee.setData({
793 818 gallery: gallery,
794 819 is_collect: is_collect,
... ... @@ -802,99 +827,10 @@ Page({
802 827  
803 828 },
804 829  
805   - //检测有没有导购分享的门店
806   - check_guide(func){
807   - var first_leader=getApp().globalData.first_leader;
808   - if(!first_leader){
809   - func();
810   - return false;
811   - }
812   - if(this.data.is_geted_guide_pick){
813   - func();
814   - return false;
815   - }
816   -
817   - if(getApp().globalData.guide_pick_id){
818   - func();
819   - return false;
820   - }
821   - var th=this;
822   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
823   - if (res.data.code == 0) {
824   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
825   - }
826   - th.data.is_geted_guide_pick=1;
827   - func();
828   - })
829   - },
830   -
831   -
832   - get_user_sto(){
833   - var th=this;var that=this;
834   - //获取用户的默认门店
835   - getApp().get_user_store(function (e) {
836   - if (!e) {
837   - th.data.fir_def_store = {}; //赋值空对象
838   - return false;
839   - }
840   -
841   - if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
842   - var ee = JSON.parse(JSON.stringify(e));
843   - //--定时器推迟一下--
844   - setTimeout(function () {
845   - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
846   - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
847   - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
848   - ee.is_no_dis = 1;
849   - }
850   -
851   - var appd = getApp().globalData;
852   - var w_time = setInterval(function () {
853   - if (that.data.is_get_local_ok == 0) return false;
854   - clearInterval(w_time);
855   - var distance = null;
856   - var e = JSON.parse(JSON.stringify(ee));
857   -
858   - //如果有开启近距离的话,同时距离优不一样了
859   - if (that.data.lat != null) {
860   - //如果经纬度有变化的话
861   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
862   - that.set_def_storage(e);
863   - } else {
864   - //要用接口是获取距离,js的计算不准
865   - getApp().request.promiseGet("/api/weshop/pickup/list", {
866   - data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon, is_pos: 1 },
867   - }).then(res => {
868   - if (res.data.code == 0) {
869   - e = res.data.data.pageData[0];
870   - if (e) {
871   - e.is_no_dis = ee.is_no_dis;
872   - appd.pk_store = e;
873   - that.set_def_storage(e);
874   - }
875   -
876   - }
877   - })
878   - }
879   - //e.distance = distance;
880   - appd.lat = that.data.lat;
881   - appd.lon = that.data.lon;
882   -
883   - } else {
884   - if (e) {
885   - e.distance = null;
886   - that.set_def_storage(e);
887   - }
888   - }
889   - }, 500)
890   - }, 700)
891   - });
892   - },
893   -
894 830 //---展示---
895 831 onShow: async function () {
896 832  
897   - getApp().check_can_share();
  833 + getApp().check_can_share();
898 834 // console.log('onshow');
899 835 var goods_list = null, th = this, that = this;
900 836 var show_prew_img = this.data.show_prew_img
... ... @@ -903,16 +839,6 @@ Page({
903 839 return false;
904 840 }
905 841  
906   - if (this.data.show_video) {
907   - this.data.show_video = 0;
908   - return false;
909   - }
910   -
911   - //先获取一下导购的门店
912   - th.check_guide(()=> {
913   - th.get_user_sto();
914   - })
915   -
916 842 // 判断活动是否暂停
917 843 //获取单个活动成团信息
918 844 await getApp().request.promiseGet('/api/weshop/prom/luckyActivity/page', {
... ... @@ -5547,16 +5473,6 @@ Page({
5547 5473  
5548 5474 // 选择门店
5549 5475 choice_store: function (ee) {
5550   -
5551   - //--先判断会员状态--
5552   - var user_info = getApp().globalData.userInfo;
5553   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
5554   - wx.navigateTo({
5555   - url: '/packageE/pages/togoin/togoin',
5556   - })
5557   - return false;
5558   - }
5559   -
5560 5476 var th = this;
5561 5477 var ind = ee.currentTarget.dataset.ind;
5562 5478 var bconfig = th.data.bconfig;
... ... @@ -6266,14 +6182,6 @@ Page({
6266 6182 getApp().pre_img(this.data.sele_g.original_img);
6267 6183 },
6268 6184  
6269   - screenChange: function (e) {
6270   - let fullScreen = e.detail.fullScreen //值true为进入全屏,false为退出全屏
6271   - if (fullScreen) { //退出全屏
6272   - getApp().globalData.no_clear = 1;
6273   - this.data.show_video = 1;
6274   - }
6275   - },
6276   -
6277 6185 is_show_more_buy: function () {
6278 6186 var prom_goods = this.data.prom_goods;
6279 6187 var per_price = this.data.sele_g.shop_price
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... ... @@ -47,7 +47,7 @@
47 47 </image>
48 48 </view>
49 49 <view wx:else>
50   - <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
  50 + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
51 51 </view>
52 52 </swiper-item>
53 53 <swiper-item wx:for="{{gallery}}" wx:key="gallery">
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -267,9 +267,6 @@ Page({
267 267 first_leader = t.first_leader,
268 268 room_id = t.room_id,
269 269 room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
270   -
271   - var share_openid = t.share_openid;
272   -
273 270 //检查测肤
274 271 getApp().check_skin_face(t, 0, gid);
275 272 //群id
... ... @@ -335,7 +332,6 @@ Page({
335 332 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
336 333 if (res.data.code == 0) {
337 334 getApp().globalData.guide_id = res.data.data.id;
338   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
339 335 }
340 336 })
341 337 }
... ... @@ -347,11 +343,6 @@ Page({
347 343 //如果是会员分享过来的要记录
348 344 if (room_user_share)
349 345 getApp().globalData.room_user_share = room_user_share;
350   -
351   - if (share_openid) {
352   - this.get_room_share_guide(share_openid);
353   - }
354   -
355 346 }
356 347  
357 348 var c_guide_id = t.c_guide_id;
... ... @@ -452,38 +443,6 @@ Page({
452 443 })
453 444 },
454 445  
455   - async get_room_share_guide(share_openid) {
456   -
457   - var url = "/api/weshop/users/page";
458   - var first_leader = 0;
459   -
460   - //调用接口判断是不是会员
461   - await getApp().request.promiseGet(url, {
462   - data: {
463   - stoid: os.stoid,
464   - weapp_openid: share_openid
465   - }
466   - }).then(res => {
467   - if (ut.ajax_ok(res)) {
468   - first_leader = res.data.data.pageData[0].user_id;
469   - getApp().globalData.guide_id = res.data.data.id;
470   - }
471   - })
472   -
473   - if (!first_leader) return false;
474   -
475   - getApp().globalData.first_leader = first_leader;
476   -
477   - //调用接口判断是不是会员
478   - await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
479   - if (res.data.code == 0) {
480   - getApp().globalData.guide_id = res.data.data.id;
481   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
482   - }
483   - })
484   -
485   - },
486   -
487 446 //--- 设置一下默认库存的数量 ----
488 447 set_def_storage(ee) {
489 448 var that = this, th = this;
... ... @@ -668,32 +627,6 @@ Page({
668 627  
669 628 },
670 629  
671   - //检验导购门店
672   - check_guide(func){
673   - var first_leader=getApp().globalData.first_leader;
674   - if(!first_leader){
675   - func();
676   - return false;
677   - }
678   - if(this.data.is_geted_guide_pick){
679   - func();
680   - return false;
681   - }
682   -
683   - if(getApp().globalData.guide_pick_id){
684   - func();
685   - return false;
686   - }
687   - var th=this;
688   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
689   - if (res.data.code == 0) {
690   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
691   - }
692   - th.data.is_geted_guide_pick=1;
693   - func();
694   - })
695   - },
696   -
697 630 //---展示---
698 631 onShow: function () {
699 632 getApp().check_can_share();
... ... @@ -774,70 +707,68 @@ Page({
774 707 ee.data.sele_g_id = t.data.data.goods_id;
775 708 ee.data.sele_g = t.data.data;
776 709  
777   - //检测一下分享导购的门店
778   - ee.check_guide(() => {
779   - //获取用户的默认门店
780   - getApp().get_user_store(function (e) {
781   - if (!e) {
782   - th.data.fir_def_store = {}; //赋值空对象
783   - return false;
784   - }
785   - if (getApp().globalData.is_dj_pk) th.setData({has_def: 1})
  710 + //获取用户的默认门店
  711 + getApp().get_user_store(function (e) {
  712 + if (!e) {
  713 + th.data.fir_def_store = {}; //赋值空对象
  714 + return false;
  715 + }
  716 + if (getApp().globalData.is_dj_pk) th.setData({ has_def: 1 })
786 717  
787   - var ee = JSON.parse(JSON.stringify(e));
  718 + var ee = JSON.parse(JSON.stringify(e));
788 719  
789   - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
790   - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
791   - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
792   - ee.is_no_dis = 1;
793   - }
  720 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  721 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  722 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  723 + ee.is_no_dis = 1;
  724 + }
794 725  
795   - var appd = getApp().globalData;
796   - var w_time = setInterval(function () {
797   - if (that.data.is_get_local_ok == 0) return false;
798   - clearInterval(w_time);
799   - var e = JSON.parse(JSON.stringify(ee));
  726 + var appd = getApp().globalData;
  727 + var w_time = setInterval(function () {
  728 + if (that.data.is_get_local_ok == 0) return false;
  729 + clearInterval(w_time);
  730 + var e = JSON.parse(JSON.stringify(ee));
800 731  
801   - //如果有开启近距离的话,同时距离优不一样了
802   - if (that.data.lat != null) {
803   - //如果经纬度有变化的话
804   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
805   - that.set_def_storage(e);
806   -
807   - } else {
808   - //要用接口是获取距离,js的计算不准
809   - getApp().request.promiseGet("/api/weshop/pickup/list", {
810   - data: {
811   - store_id: os.stoid,
812   - pickup_id: e.pickup_id,
813   - is_pos: 1,
814   - lat: th.data.lat,
815   - lon: th.data.lon
816   - },
817   - }).then(res => {
818   - if (res.data.code == 0) {
819   - e = res.data.data.pageData[0];
820   - if (e) {
821   - e.is_no_dis = ee.is_no_dis;
822   - appd.pk_store = e;
823   - that.set_def_storage(e);
824   - }
  732 + //如果有开启近距离的话,同时距离优不一样了
  733 + if (that.data.lat != null) {
  734 + //如果经纬度有变化的话
  735 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  736 + that.set_def_storage(e);
825 737  
  738 + } else {
  739 + //要用接口是获取距离,js的计算不准
  740 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  741 + data: {
  742 + store_id: os.stoid,
  743 + pickup_id: e.pickup_id,
  744 + is_pos: 1,
  745 + lat: th.data.lat,
  746 + lon: th.data.lon
  747 + },
  748 + }).then(res => {
  749 + if (res.data.code == 0) {
  750 + e = res.data.data.pageData[0];
  751 + if (e) {
  752 + e.is_no_dis = ee.is_no_dis;
  753 + appd.pk_store = e;
  754 + that.set_def_storage(e);
826 755 }
827   - })
828   - }
829   - appd.lat = that.data.lat;
830   - appd.lon = that.data.lon;
831 756  
832   - } else {
833   - if (e) {
834   - e.distance = null;
835   - that.set_def_storage(e);
836   - }
  757 + }
  758 + })
837 759 }
838   - }, 500)
839   - });
840   - })
  760 + appd.lat = that.data.lat;
  761 + appd.lon = that.data.lon;
  762 +
  763 + } else {
  764 + if (e) {
  765 + e.distance = null;
  766 + that.set_def_storage(e);
  767 + }
  768 + }
  769 + }, 500)
  770 + });
  771 +
841 772  
842 773  
843 774 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
... ... @@ -3633,16 +3564,6 @@ Page({
3633 3564 },
3634 3565 // 选择门店
3635 3566 choice_store: function (ee) {
3636   -
3637   - //--先判断会员状态--
3638   - var user_info = getApp().globalData.userInfo;
3639   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
3640   - wx.navigateTo({
3641   - url: '/packageE/pages/togoin/togoin',
3642   - })
3643   - return false;
3644   - }
3645   -
3646 3567 var th = this;
3647 3568 var ind = ee.currentTarget.dataset.ind;
3648 3569 var bconfig = th.data.bconfig;
... ...
packageC/pages/presell/list/list.js
... ... @@ -30,7 +30,6 @@ Page({
30 30 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
31 31 if (res.data.code == 0) {
32 32 getApp().globalData.guide_id = res.data.data.id;
33   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
34 33 }
35 34 })
36 35 }
... ...
packageC/pages/presell/pregoodsInfo/goodsInfo.js
... ... @@ -263,7 +263,6 @@ Page({
263 263 room_id = t.room_id,
264 264 room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
265 265  
266   - var share_openid = t.share_openid;
267 266 //-- 自定义海报 --
268 267 getApp().request.promiseGet("/api/weshop/goods/poster/page", {
269 268 data: { store_id: os.stoid, type: 1, is_use: 1 }
... ... @@ -317,14 +316,11 @@ Page({
317 316 if (first_leader) {
318 317 console.log("log---".first_leader);
319 318 getApp().globalData.first_leader = first_leader;
320   -
321 319 //调用接口判断是不是会员
322 320 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
323 321 if (res.data.code == 0) {
324 322 getApp().globalData.guide_id = res.data.data.id;
325   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
326 323 }
327   -
328 324 })
329 325 }
330 326  
... ... @@ -335,10 +331,6 @@ Page({
335 331 //如果是会员分享过来的要记录
336 332 if (room_user_share)
337 333 getApp().globalData.room_user_share = room_user_share;
338   -
339   - if (share_openid) {
340   - this.get_room_share_guide(share_openid);
341   - }
342 334 }
343 335  
344 336 var c_guide_id = t.c_guide_id;
... ... @@ -437,38 +429,6 @@ Page({
437 429 })
438 430 },
439 431  
440   - async get_room_share_guide(share_openid) {
441   -
442   - var url = "/api/weshop/users/page";
443   - var first_leader = 0;
444   -
445   - //调用接口判断是不是会员
446   - await getApp().request.promiseGet(url, {
447   - data: {
448   - stoid: os.stoid,
449   - weapp_openid: share_openid
450   - }
451   - }).then(res => {
452   - if (ut.ajax_ok(res)) {
453   - first_leader = res.data.data.pageData[0].user_id;
454   - getApp().globalData.guide_id = res.data.data.id;
455   - }
456   - })
457   -
458   - if (!first_leader) return false;
459   -
460   - getApp().globalData.first_leader = first_leader;
461   -
462   - //调用接口判断是不是会员
463   - await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
464   - if (res.data.code == 0) {
465   - getApp().globalData.guide_id = res.data.data.id;
466   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
467   - }
468   - })
469   -
470   - },
471   -
472 432  
473 433 //--- 设置一下默认库存的数量 ----
474 434 set_def_storage(ee) {
... ... @@ -646,30 +606,6 @@ Page({
646 606  
647 607 },
648 608  
649   - check_guide(func){
650   - var first_leader=getApp().globalData.first_leader;
651   - if(!first_leader){
652   - func();
653   - return false;
654   - }
655   - if(this.data.is_geted_guide_pick){
656   - func();
657   - return false;
658   - }
659   -
660   - if(getApp().globalData.guide_pick_id){
661   - func();
662   - return false;
663   - }
664   - var th=this;
665   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
666   - if (res.data.code == 0) {
667   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
668   - }
669   - th.data.is_geted_guide_pick=1;
670   - func();
671   - })
672   - },
673 609 //---展示---
674 610 onShow: function () {
675 611  
... ... @@ -751,71 +687,70 @@ Page({
751 687 ee.data.sele_g_id=t.data.data.goods_id;
752 688 ee.data.sele_g=t.data.data;
753 689  
754   - //检测一下分享导购的门店
755   - ee.check_guide(() => {
756   - //获取用户的默认门店
757   - getApp().get_user_store(function (e) {
758   - if (!e) {
759   - th.data.fir_def_store = {}; //赋值空对象
760   - return false;
761   - }
  690 + //获取用户的默认门店
  691 + getApp().get_user_store(function (e) {
  692 + if (!e) {
  693 + th.data.fir_def_store = {}; //赋值空对象
  694 + return false;
  695 + }
762 696  
763   - if (getApp().globalData.is_dj_pk) th.setData({has_def: 1})
  697 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
764 698  
765   - var ee = JSON.parse(JSON.stringify(e));
  699 + var ee = JSON.parse(JSON.stringify(e));
766 700  
767   - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
768   - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
769   - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
770   - ee.is_no_dis = 1;
771   - }
  701 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  702 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  703 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  704 + ee.is_no_dis = 1;
  705 + }
772 706  
773   - var appd = getApp().globalData;
774   - var w_time = setInterval(function () {
775   - if (that.data.is_get_local_ok == 0) return false;
776   - clearInterval(w_time);
777   - var e = JSON.parse(JSON.stringify(ee));
778   -
779   - //如果有开启近距离的话,同时距离优不一样了
780   - if (that.data.lat != null) {
781   - //如果经纬度有变化的话
782   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
783   - that.set_def_storage(e);
784   -
785   - } else {
786   - //要用接口是获取距离,js的计算不准
787   - getApp().request.promiseGet("/api/weshop/pickup/list", {
788   - data: {
789   - store_id: os.stoid,
790   - pickup_id: e.pickup_id,
791   - is_pos: 1,
792   - lat: th.data.lat,
793   - lon: th.data.lon
794   - },
795   - }).then(res => {
796   - if (res.data.code == 0) {
797   - e = res.data.data.pageData[0];
798   - if (e) {
799   - e.is_no_dis = ee.is_no_dis;
800   - appd.pk_store = e;
801   - that.set_def_storage(e);
802   - }
  707 + var appd = getApp().globalData;
  708 + var w_time = setInterval(function () {
  709 + if (that.data.is_get_local_ok == 0) return false;
  710 + clearInterval(w_time);
  711 + var e = JSON.parse(JSON.stringify(ee));
803 712  
804   - }
805   - })
806   - }
807   - appd.lat = that.data.lat;
808   - appd.lon = that.data.lon;
  713 + //如果有开启近距离的话,同时距离优不一样了
  714 + if (that.data.lat != null) {
  715 + //如果经纬度有变化的话
  716 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  717 + that.set_def_storage(e);
809 718  
810 719 } else {
811   - if (e) {
812   - e.distance = null;
813   - that.set_def_storage(e);
814   - }
  720 + //要用接口是获取距离,js的计算不准
  721 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  722 + data: {
  723 + store_id: os.stoid,
  724 + pickup_id: e.pickup_id,
  725 + is_pos: 1,
  726 + lat: th.data.lat,
  727 + lon: th.data.lon
  728 + },
  729 + }).then(res => {
  730 + if (res.data.code == 0) {
  731 + e = res.data.data.pageData[0];
  732 + if (e) {
  733 + e.is_no_dis = ee.is_no_dis;
  734 + appd.pk_store = e;
  735 + that.set_def_storage(e);
  736 + }
  737 +
  738 + }
  739 + })
815 740 }
816   - }, 500)
817   - });
818   - })
  741 + appd.lat = that.data.lat;
  742 + appd.lon = that.data.lon;
  743 +
  744 + } else {
  745 + if (e) {
  746 + e.distance = null;
  747 + that.set_def_storage(e);
  748 + }
  749 + }
  750 + }, 500)
  751 + });
  752 +
  753 +
819 754  
820 755 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
821 756  
... ... @@ -3273,16 +3208,6 @@ Page({
3273 3208 },
3274 3209 // 选择门店
3275 3210 choice_store: function (ee) {
3276   -
3277   - //--先判断会员状态--
3278   - var user_info = getApp().globalData.userInfo;
3279   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
3280   - wx.navigateTo({
3281   - url: '/packageE/pages/togoin/togoin',
3282   - })
3283   - return false;
3284   - }
3285   -
3286 3211 var th = this;
3287 3212 var ind = ee.currentTarget.dataset.ind;
3288 3213 var bconfig = th.data.bconfig;
... ...
packageD/pages/AI-test-skin/success_result/success_result.js
... ... @@ -107,7 +107,6 @@ Page({
107 107 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + setting.stoid + "/" + first_leader, {}).then(res => {
108 108 if (res.data.code == 0) {
109 109 getApp().globalData.guide_id = res.data.data.id;
110   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
111 110 }
112 111 })
113 112 }
... ...
packageE/pages/togoin/togoin.js
... ... @@ -134,7 +134,6 @@ Page({
134 134 app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => {
135 135 if (res.data.code == 0) {
136 136 getApp().globalData.guide_id = res.data.data.id;
137   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
138 137 }
139 138 })
140 139  
... ... @@ -298,7 +297,6 @@ Page({
298 297 app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => {
299 298 if (res.data.code == 0) {
300 299 getApp().globalData.guide_id = res.data.data.id;
301   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
302 300 }
303 301 })
304 302  
... ... @@ -369,7 +367,6 @@ Page({
369 367 app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => {
370 368 if (res.data.code == 0) {
371 369 getApp().globalData.guide_id = res.data.data.id;
372   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
373 370 }
374 371 })
375 372  
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -50,7 +50,6 @@ Page({
50 50 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
51 51 if (res.data.code == 0) {
52 52 getApp().globalData.guide_id = res.data.data.id;
53   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
54 53 }
55 54 })
56 55 }
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -58,7 +58,6 @@ Page({
58 58 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
59 59 if (res.data.code == 0) {
60 60 getApp().globalData.guide_id = res.data.data.id;
61   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
62 61 }
63 62 })
64 63 }
... ... @@ -250,7 +249,7 @@ Page({
250 249  
251 250 //---------分享配置--------
252 251 onShareAppMessage: function (e) {
253   - getApp().globalData.no_clear=1;
  252 + getApp().globalData.no_clear=1;
254 253 var curPage = this;
255 254 var pagePath = curPage.route; //当前页面url
256 255 if (pagePath.indexOf('/') != 0) {
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -64,9 +64,7 @@ Page({
64 64 default_store: {}, //创建添加默认门店地址的对象
65 65  
66 66 store:0,
67   - openSpecModal:0,
68   -
69   - is_get_guide:0,
  67 + openSpecModal:0
70 68  
71 69 },
72 70 onLoad: function (options) {
... ... @@ -98,8 +96,6 @@ Page({
98 96 //-- 获取分享人的ID --
99 97 var first_leader = options.first_leader || getApp().globalData.first_leader;
100 98 if (first_leader) {
101   -
102   - this.data.is_get_guide=1;
103 99 this.setData({
104 100 first_leader,
105 101 })
... ... @@ -108,16 +104,10 @@ Page({
108 104 //调用接口判断是不是会员
109 105 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
110 106 if (res.data.code == 0) {
111   - getApp().globalData.guide_id = res.data.data.id;
112   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
  107 + getApp().globalData.guide_id = res.data.data.id;
113 108 }
114   -
115   - com.wait_for_store_config(th);
116   - com.set_user_mo_store(th,os);
117   -
118 109 })
119 110 }
120   -
121 111 getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, {
122 112 data: {
123 113 enabled: 1
... ... @@ -148,12 +138,8 @@ Page({
148 138 getApp().goto('/packageE/pages/togoin/togoin');
149 139 return false;
150 140 }
151   -
152   - if(!th.data.is_get_guide) {
153   - com.wait_for_store_config(th);
154   - com.set_user_mo_store(th, os);
155   - }
156   - th.data.is_get_guide=0;
  141 + com.wait_for_store_config(th);
  142 + com.set_user_mo_store(th,os);
157 143  
158 144 })
159 145 this.init();
... ... @@ -382,15 +368,6 @@ Page({
382 368 },
383 369 // 选择门店
384 370 choice_store: function (ee) {
385   - //--先判断会员状态--
386   - var user_info = getApp().globalData.userInfo;
387   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
388   - wx.navigateTo({
389   - url: '/packageE/pages/togoin/togoin',
390   - })
391   - return false;
392   - }
393   -
394 371 var th = this;
395 372 var ind = ee.currentTarget.dataset.ind;
396 373 var bconfig = th.data.bconfig;
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -144,7 +144,6 @@ Page({
144 144 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
145 145 if (res.data.code == 0) {
146 146 getApp().globalData.guide_id = res.data.data.id;
147   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
148 147 }
149 148 })
150 149 }
... ... @@ -339,31 +338,6 @@ Page({
339 338 });
340 339  
341 340 },
342   -
343   - check_guide(func){
344   - var first_leader=this.data.first_leader;
345   - if(!first_leader){
346   - func();
347   - return false;
348   - }
349   - if(this.data.is_geted_guide_pick){
350   - func();
351   - return false;
352   - }
353   - if(getApp().globalData.guide_pick_id){
354   - func();
355   - return false;
356   - }
357   - var th=this;
358   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
359   - if (res.data.code == 0) {
360   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
361   - }
362   - th.data.is_geted_guide_pick=1;
363   - func();
364   - })
365   - },
366   -
367 341 GetBuyGiftList: function () {
368 342 var _this2 = this;
369 343 var th = this.data;
... ... @@ -419,16 +393,14 @@ Page({
419 393 //需不需要门店,不需要门店返回
420 394 if (!sele_g.is_pickup) return false;
421 395  
422   - //-- 检测一下有没有门店 --
423   - _this2.check_guide(function (){
424   - com.wait_for_store_config(_this2);
425   - com.set_user_mo_store(_this2, os, function () {
426   - if (sele_g.pickup_list && _this2.data.def_pick_store) {
427   - com.check_def_pk(_this2);
428   - }
429   - });
430   - com.get_sto(_this2, os);
431   - })
  396 + com.wait_for_store_config(_this2);
  397 + com.set_user_mo_store(_this2, os, function () {
  398 + if (sele_g.pickup_list && _this2.data.def_pick_store) {
  399 + com.check_def_pk(_this2);
  400 + }
  401 + });
  402 + com.get_sto(_this2, os);
  403 +
432 404  
433 405 } else {
434 406 getApp().my_warnning(res.data.msg, 0, _this2);
... ... @@ -681,16 +653,6 @@ Page({
681 653 },
682 654 // 选择门店
683 655 choice_store: function (ee) {
684   -
685   - //--先判断会员状态--
686   - var user_info = getApp().globalData.userInfo;
687   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
688   - wx.navigateTo({
689   - url: '/packageE/pages/togoin/togoin',
690   - })
691   - return false;
692   - }
693   -
694 656 var th = this;
695 657 var ind = ee.currentTarget.dataset.ind;
696 658 var bconfig = th.data.bconfig;
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -55,7 +55,6 @@ Page({
55 55 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
56 56 if (res.data.code == 0) {
57 57 getApp().globalData.guide_id = res.data.data.id;
58   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
59 58 }
60 59 })
61 60 }
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -382,14 +382,11 @@ Page({
382 382 if (first_leader) {
383 383 console.log("gd onload--3");
384 384 console.log("log---" + first_leader);
385   -
386 385 getApp().globalData.first_leader = first_leader;
387 386 //调用接口判断是不是会员
388 387 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
389 388 if (res.data.code == 0) {
390 389 getApp().globalData.guide_id = res.data.data.id;
391   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
392   -
393 390 }
394 391 })
395 392  
... ... @@ -500,6 +497,74 @@ Page({
500 497 }
501 498 });
502 499  
  500 + //获取用户的默认门店
  501 + getApp().get_user_store(function (e) {
  502 + if (!e) {
  503 + th.data.fir_def_store = {}; //赋值空对象
  504 + return false;
  505 + }
  506 + if (getApp().globalData.is_dj_pk) th.setData({
  507 + has_def: 1
  508 + });
  509 +
  510 + var ee = JSON.parse(JSON.stringify(e));
  511 + //--定时器推迟一下--
  512 + setTimeout(function () {
  513 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  514 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  515 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  516 + ee.is_no_dis = 1;
  517 + }
  518 +
  519 + var appd = getApp().globalData;
  520 + var w_time = setInterval(function () {
  521 + if (that.data.is_get_local_ok == 0) return false;
  522 + clearInterval(w_time);
  523 + var distance = null;
  524 + var e = JSON.parse(JSON.stringify(ee));
  525 +
  526 + //如果有开启近距离的话,同时距离优不一样了
  527 + if (that.data.lat != null) {
  528 + //如果经纬度有变化的话
  529 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  530 + that.set_def_storage(e);
  531 + } else {
  532 + //要用接口是获取距离,js的计算不准
  533 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  534 + data: {
  535 + store_id: os.stoid,
  536 + pickup_id: e.pickup_id,
  537 + lat: th.data.lat,
  538 + lon: th.data.lon,
  539 + isstop: 0,
  540 + is_pos: 1
  541 + },
  542 + }).then(res => {
  543 + if (res.data.code == 0) {
  544 + e = res.data.data.pageData[0];
  545 + if (e) {
  546 + e.is_no_dis = ee.is_no_dis;
  547 + appd.pk_store = e;
  548 + that.set_def_storage(e);
  549 + }
  550 +
  551 + }
  552 + })
  553 + }
  554 + //e.distance = distance;
  555 + appd.lat = that.data.lat;
  556 + appd.lon = that.data.lon;
  557 +
  558 + } else {
  559 + if (e) {
  560 + e.distance = null;
  561 + that.set_def_storage(e);
  562 + }
  563 + }
  564 + }, 500)
  565 + }, 700)
  566 + });
  567 +
503 568 //更新点击量
504 569 //noinspection JSUnresolvedFunction
505 570 getApp().request.put("/api/weshop/goods/updateClick", {
... ... @@ -540,7 +605,6 @@ Page({
540 605 await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
541 606 if (res.data.code == 0) {
542 607 getApp().globalData.guide_id = res.data.data.id;
543   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
544 608 }
545 609 })
546 610  
... ... @@ -798,102 +862,6 @@ Page({
798 862  
799 863 },
800 864  
801   - check_guide(func){
802   - var first_leader=getApp().globalData.first_leader;
803   - if(!first_leader){
804   - func();
805   - return false;
806   - }
807   - if(this.data.is_geted_guide_pick){
808   - func();
809   - return false;
810   - }
811   -
812   - if(getApp().globalData.guide_pick_id){
813   - func();
814   - return false;
815   - }
816   - var th=this;
817   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
818   - if (res.data.code == 0) {
819   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
820   - }
821   - th.data.is_geted_guide_pick=1;
822   - func();
823   - })
824   - },
825   -
826   - get_user_store(){
827   - var th=this; var that=this;
828   - //--获取用户的默认门店
829   - getApp().get_user_store(function (e) {
830   - if (!e) {
831   - th.data.fir_def_store = {}; //赋值空对象
832   - return false;
833   - }
834   - if (getApp().globalData.is_dj_pk) th.setData({
835   - has_def: 1
836   - });
837   -
838   - var ee = JSON.parse(JSON.stringify(e));
839   - //--定时器推迟一下--
840   - setTimeout(function () {
841   - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
842   - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
843   - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
844   - ee.is_no_dis = 1;
845   - }
846   -
847   - var appd = getApp().globalData;
848   - var w_time = setInterval(function () {
849   - if (that.data.is_get_local_ok == 0) return false;
850   - clearInterval(w_time);
851   - var distance = null;
852   - var e = JSON.parse(JSON.stringify(ee));
853   -
854   - //如果有开启近距离的话,同时距离优不一样了
855   - if (that.data.lat != null) {
856   - //如果经纬度有变化的话
857   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
858   - that.set_def_storage(e);
859   - } else {
860   - //要用接口是获取距离,js的计算不准
861   - getApp().request.promiseGet("/api/weshop/pickup/list", {
862   - data: {
863   - store_id: os.stoid,
864   - pickup_id: e.pickup_id,
865   - lat: th.data.lat,
866   - lon: th.data.lon,
867   - isstop: 0,
868   - is_pos: 1
869   - },
870   - }).then(res => {
871   - if (res.data.code == 0) {
872   - e = res.data.data.pageData[0];
873   - if (e) {
874   - e.is_no_dis = ee.is_no_dis;
875   - appd.pk_store = e;
876   - that.set_def_storage(e);
877   - }
878   -
879   - }
880   - })
881   - }
882   - //e.distance = distance;
883   - appd.lat = that.data.lat;
884   - appd.lon = that.data.lon;
885   -
886   - } else {
887   - if (e) {
888   - e.distance = null;
889   - that.set_def_storage(e);
890   - }
891   - }
892   - }, 500)
893   - }, 700)
894   - });
895   - },
896   -
897 865 //---展示---
898 866 onShow: function () {
899 867  
... ... @@ -913,11 +881,6 @@ Page({
913 881 return false;
914 882 }
915 883  
916   - //先获取一下导购的门店
917   - th.check_guide(()=>{
918   - th.get_user_store();
919   - })
920   -
921 884 //优惠券要实时更新
922 885 getApp().getConfig2(function (e) {
923 886 var json_d = JSON.parse(e.switch_list);
... ... @@ -1196,9 +1159,6 @@ Page({
1196 1159  
1197 1160  
1198 1161  
1199   -
1200   -
1201   -
1202 1162 },
1203 1163  
1204 1164 onReady() {
... ... @@ -6652,15 +6612,6 @@ Page({
6652 6612 var ind = ee.currentTarget.dataset.ind;
6653 6613 var bconfig = th.data.bconfig;
6654 6614  
6655   - //--先判断会员状态--
6656   - var user_info = getApp().globalData.userInfo;
6657   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
6658   - wx.navigateTo({
6659   - url: '/packageE/pages/togoin/togoin',
6660   - })
6661   - return false;
6662   - }
6663   -
6664 6615  
6665 6616 //如果开启了,则不在选择门店
6666 6617 if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
... ...
pages/goods/goodsList/goodsList.js
... ... @@ -55,7 +55,6 @@ Page({
55 55 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{
56 56 if(res.data.code==0){
57 57 getApp().globalData.guide_id=res.data.data.id;
58   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
59 58 }
60 59 })
61 60 if(!getApp().globalData.user_id){
... ...
pages/goods/search/search.js
... ... @@ -80,7 +80,6 @@ Page({
80 80 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {
81 81 if (res.data.code == 0) {
82 82 getApp().globalData.guide_id = res.data.data.id;
83   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
84 83 }
85 84 })
86 85 }
... ...
pages/index/index/index.js
... ... @@ -196,7 +196,6 @@ Page({
196 196 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
197 197 if (res.data.code == 0) {
198 198 getApp().globalData.guide_id = res.data.data.id;
199   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
200 199 }
201 200 })
202 201  
... ... @@ -270,17 +269,18 @@ Page({
270 269 }).then(res => {
271 270 if (ut.ajax_ok(res)) {
272 271 first_leader=res.data.data.pageData[0].user_id;
273   - // getApp().globalData.guide_id = res.data.data.id;
  272 + getApp().globalData.guide_id = res.data.data.id;
274 273 }
275 274 })
  275 +
276 276 if(!first_leader) return false;
277 277  
278 278 getApp().globalData.first_leader = first_leader;
  279 +
279 280 //调用接口判断是不是会员
280 281 await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
281 282 if (res.data.code == 0) {
282 283 getApp().globalData.guide_id = res.data.data.id;
283   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
284 284 }
285 285 })
286 286  
... ...
pages/team/team_show/team_show.js
... ... @@ -126,7 +126,6 @@ Page({
126 126 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
127 127 if(res.data.code==0){
128 128 getApp().globalData.guide_id=res.data.data.id;
129   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
130 129 }
131 130 })
132 131 }
... ... @@ -608,7 +607,7 @@ Page({
608 607 });
609 608  
610 609 //-- 获取用户的默认门店 --
611   - getApp().get_user_store(function(ee) {
  610 + getApp().get_user_store(function(ee) {
612 611 if(!ee) {
613 612 th.data.fir_def_store={}; //赋值空对象
614 613 return false;
... ... @@ -625,14 +624,14 @@ Page({
625 624 //return false;
626 625 ee.is_no_dis=1;
627 626 }
628   -
  627 +
629 628 var appd=getApp().globalData;
630 629 var w_time = setInterval(function() {
631 630 if (that.data.is_get_local_ok == 0) return false;
632 631 clearInterval(w_time);
633 632 var distance = null;
634 633 var e=JSON.parse(JSON.stringify(ee));
635   -
  634 +
636 635 //如果有开启近距离的话,同时距离优不一样了
637 636 if (that.data.lat != null) {
638 637 //如果经纬度有变化的话
... ... @@ -661,15 +660,15 @@ Page({
661 660 sto_sele_distr: e.distr_type
662 661 })
663 662 }
664   -
  663 +
665 664 }
666 665 })
667 666 }
668   -
  667 +
669 668 //e.distance = distance;
670 669 appd.lat=that.data.lat;
671 670 appd.lon=that.data.lon;
672   -
  671 +
673 672 }else{
674 673 if (e) {
675 674 e.distance = null;
... ... @@ -682,11 +681,11 @@ Page({
682 681 })
683 682 }
684 683 }
685   -
  684 +
686 685 }, 500)
687   - },1000)
  686 + },1000)
688 687 });
689   -
  688 +
690 689 //获取下redis长度,如果团已经弄完,或者拼单已经卖完
691 690 //设置值
692 691 ee.setData({
... ... @@ -1009,15 +1008,6 @@ Page({
1009 1008  
1010 1009 //-- 选择门店。此时的门店选择与门店有关系 --
1011 1010 choice_store: function(ee) {
1012   -
1013   - //--先判断会员状态--
1014   - var user_info = getApp().globalData.userInfo;
1015   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
1016   - wx.navigateTo({
1017   - url: '/packageE/pages/togoin/togoin',
1018   - })
1019   - return false;
1020   - }
1021 1011  
1022 1012 var th = this;
1023 1013 var bconfig = th.data.bconfig;
... ...
pages/template/index.js
... ... @@ -30,7 +30,6 @@ Page({
30 30 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
31 31 if (res.data.code == 0) {
32 32 getApp().globalData.guide_id = res.data.data.id;
33   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
34 33 }
35 34 })
36 35 }
... ...
pages/user/index/index.js
... ... @@ -95,7 +95,6 @@ Page({
95 95 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
96 96 if (res.data.code == 0) {
97 97 getApp().globalData.guide_id = res.data.data.id;
98   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
99 98 }
100 99 })
101 100  
... ...
pages/user/plus/plus.js
... ... @@ -81,7 +81,6 @@ Page({
81 81 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + fir_leader, {}).then(res => {
82 82 if (res.data.code == 0) {
83 83 getApp().globalData.guide_id = res.data.data.id;
84   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
85 84 }
86 85 })
87 86 }
... ...