Commit 8b4dccf4be1e5c61882e9b6def47caeeff9557d9

Authored by WXD-SEASON\season
2 parents aba52904 c1146c44

合并解决冲突

@@ -1455,10 +1455,78 @@ App({ @@ -1455,10 +1455,78 @@ App({
1455 }) 1455 })
1456 } 1456 }
1457 return cx_arr; 1457 return cx_arr;
1458 - }, 1458 + },
  1459 +
  1460 + //-- 获取判断注册成功后,是跳转等级卡,还是新人有礼 --
  1461 + async go_to_page(func){
  1462 +
  1463 + //新判断新人有礼
  1464 + var res= await getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", {
  1465 + data: {
  1466 + storeId: os.stoid,
  1467 + userId: this.globalData.user_id
  1468 + }
  1469 + });
  1470 +
  1471 + if (res.data.code == 0) {
  1472 + var actid = res.data.data.id; //活动id
  1473 + var giftBagId = res.data.data.giftBagId; //礼包id
  1474 + var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
  1475 + this.goto(new_nav);
  1476 + return false;
  1477 + }
1459 1478
  1479 + //如果已经是等级卡了就跳过
  1480 + if(this.globalData.userInfo.card_field){
  1481 + //没有等级卡和新人有礼的时候
  1482 + if(func) func();
  1483 + return false;
  1484 + }
1460 1485
  1486 + var dj_buy=await getApp().promiseGet("/store/storemoduleendtime/page?store_id=" + this.globalData.setting.stoid+ "&type=3", {});
  1487 + var ob = { isout: 0, isbuy: 0 };
  1488 + if (dj_buy.data.code == 0) {
  1489 + var arr = dj_buy.data.data.pageData;
  1490 + //----如果数组不为空----
  1491 + if (arr.length > 0) {
  1492 + arr.forEach(function (val, ind) {
  1493 + if (val.is_sy == 0 || val.is_sy == 1) {
  1494 + ob.isbuy = 1;
  1495 + var now = ut.gettimestamp();
  1496 + if (now > val.end_time) ob.isout = 1;
  1497 + return false;
  1498 + }
  1499 + })
  1500 + }
  1501 + }
  1502 +
  1503 + //-- 获取等级卡,直接去买等级卡 --
  1504 + if(ob.isbuy && !ob.isout){
  1505 + //-- 获取等级卡购买的数量 --
  1506 + var conf=await getApp().promiseGet("/api/weshop/storeconfig/get/" + this.globalData.setting.stoid, {});
  1507 + //-- 获取等级卡的会员已经购买的数量 ---
  1508 + var dj=await getApp().promiseGet("/api/weshop/users/getUserCard/" + this.globalData.setting.stoid, {});
  1509 + var dj_num=0;
  1510 + if(dj.data.code==0){
  1511 + dj_num=dj.data.data?dj.data.data:0;
  1512 + }
  1513 +
  1514 + var sw_list= conf.data.data.switch_list;
  1515 + if(sw_list){
  1516 + sw_list=JSON.parse(sw_list);
  1517 + }
  1518 +
  1519 +
  1520 + if (sw_list && sw_list.rank_switch==2 && conf.data.code == 0 && conf.data.data.dj_num>0 && conf.data.data.dj_num>dj_num) {
  1521 + var nav = "/pages/user/plus/plus";
  1522 + this.goto(nav);
  1523 + return false;
  1524 + }
  1525 + }
  1526 + //没有等级卡和新人有礼的时候
  1527 + if(func) func();
  1528 + }
1461 1529
1462 - }); 1530 +});
1463 1531
1464 1532
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -605,7 +605,7 @@ Page({ @@ -605,7 +605,7 @@ Page({
605 let order_sn = this.data.details.order_sn; 605 let order_sn = this.data.details.order_sn;
606 let order_id = this.data.details.order_id; 606 let order_id = this.data.details.order_id;
607 let store_id = app.globalData.setting.stoid; 607 let store_id = app.globalData.setting.stoid;
608 - let user_id = os.user_id; 608 + let user_id = getApp().globalData.user_id;
609 609
610 let flag = true; 610 let flag = true;
611 // 如果是普通购买或单独购买,不用判断 611 // 如果是普通购买或单独购买,不用判断
@@ -648,7 +648,7 @@ Page({ @@ -648,7 +648,7 @@ Page({
648 648
649 649
650 var t_now = ut.gettimestamp(); 650 var t_now = ut.gettimestamp();
651 - if (act_details.is_end == 0 && act_details.start_time < t_now && act_details.end_time > t_now) { 651 + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) {
652 wx.showModal({ 652 wx.showModal({
653 title: '提示', 653 title: '提示',
654 content: '活动发生了变化,无法支付,请取消订单,重新购买!', 654 content: '活动发生了变化,无法支付,请取消订单,重新购买!',
@@ -658,10 +658,23 @@ Page({ @@ -658,10 +658,23 @@ Page({
658 return false; 658 return false;
659 } 659 }
660 660
  661 + //指定门店的控制
  662 + if (act_details.pick_up_lists) {
  663 + var idx0=act_details.pick_up_lists.findIndex(function (e){
  664 + return e.pickup_id==it.pickup_id;
  665 + })
  666 + if(idx0<0){
  667 + getApp().confirmBox(it.service_name + "秒杀活动的门店不可售");
  668 + th.setData({ paying: 0 });
  669 + flag = false;
  670 + return false;
  671 + }
  672 + }
  673 +
661 }; 674 };
662 }); 675 });
663 676
664 - if(act_details.buy_limit>0 && flag){ 677 + if(act_details && act_details.buy_limit>0 && flag){
665 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { 678 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
666 data: { 679 data: {
667 store_id: store_id, 680 store_id: store_id,
packageA/pages/goodsInfo/goodsInfo.js
@@ -625,26 +625,20 @@ Page({ @@ -625,26 +625,20 @@ Page({
625 //获取用户的默认门店 625 //获取用户的默认门店
626 th.check_guide(()=>{ 626 th.check_guide(()=>{
627 getApp().get_user_store(function(e) { 627 getApp().get_user_store(function(e) {
628 - console.log('get_user_store');  
629 - console.log("999999999");  
630 -  
631 -  
632 if(!e) { 628 if(!e) {
633 th.data.fir_def_store={}; //赋值空对象 629 th.data.fir_def_store={}; //赋值空对象
634 return false; 630 return false;
635 } 631 }
636 632
637 - console.log("000000");  
638 -  
639 if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) 633 if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
640 634
641 var ee=JSON.parse(JSON.stringify(e)); 635 var ee=JSON.parse(JSON.stringify(e));
642 -  
643 -  
644 console.log(e); 636 console.log(e);
645 637
646 //--定时器推迟一下-- 638 //--定时器推迟一下--
647 - setTimeout(function () { 639 + var appd=getApp().globalData;
  640 + var w_time = setInterval(function() {
  641 + if (that.data.is_get_local_ok == 0) return false;
648 if(!th.data.data){ 642 if(!th.data.data){
649 return false; 643 return false;
650 } 644 }
@@ -654,77 +648,74 @@ Page({ @@ -654,77 +648,74 @@ Page({
654 ee.is_no_dis=1; 648 ee.is_no_dis=1;
655 } 649 }
656 650
657 - var appd=getApp().globalData;  
658 - var w_time = setInterval(function() {  
659 - if (that.data.is_get_local_ok == 0) return false;  
660 - clearInterval(w_time);  
661 - var distance = null;  
662 - var e=JSON.parse(JSON.stringify(ee));  
663 -  
664 - //如果有开启近距离的话,同时距离优不一样了  
665 - if (that.data.lat != null) {  
666 - //如果经纬度有变化的话  
667 - if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){  
668 - that.data.fir_def_store=e;  
669 - that.setData({  
670 - def_pick_store: e,  
671 - sto_sele_name: e.pickup_name,  
672 - sto_sele_id: e.pickup_id,  
673 - sto_sele_distr: e.distr_type,  
674 - sto_sele_keyid:e.keyid,  
675 - })  
676 - }else{  
677 - //要用接口是获取距离,js的计算不准  
678 - getApp().request.promiseGet("/api/weshop/pickup/list",{  
679 - data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1},  
680 - }).then(res=>{  
681 - if(ut.ajax_ok(res)){  
682 - e=res.data.data.pageData[0];  
683 - if (e){  
684 - e.is_no_dis=ee.is_no_dis;  
685 - appd.pk_store=e;  
686 - that.data.fir_def_store=e;  
687 -  
688 - console.log('get_user_store--2');  
689 - console.log(e);  
690 -  
691 - that.setData({  
692 - def_pick_store: e,  
693 - sto_sele_name: e.pickup_name,  
694 - sto_sele_id: e.pickup_id,  
695 - sto_sele_distr: e.distr_type,  
696 - sto_sele_keyid:e.keyid,  
697 - })  
698 - }  
699 651
  652 + clearInterval(w_time);
  653 + var distance = null;
  654 + var e=JSON.parse(JSON.stringify(ee));
  655 +
  656 + //如果有开启近距离的话,同时距离优不一样了
  657 + if (that.data.lat != null) {
  658 + //如果经纬度有变化的话
  659 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  660 + that.data.fir_def_store=e;
  661 + that.setData({
  662 + def_pick_store: e,
  663 + sto_sele_name: e.pickup_name,
  664 + sto_sele_id: e.pickup_id,
  665 + sto_sele_distr: e.distr_type,
  666 + sto_sele_keyid:e.keyid,
  667 + })
  668 + }else{
  669 + //要用接口是获取距离,js的计算不准
  670 + getApp().request.promiseGet("/api/weshop/pickup/list",{
  671 + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1},
  672 + }).then(res=>{
  673 + if(ut.ajax_ok(res)){
  674 + e=res.data.data.pageData[0];
  675 + if (e){
  676 + e.is_no_dis=ee.is_no_dis;
  677 + appd.pk_store=e;
  678 + that.data.fir_def_store=e;
  679 +
  680 + console.log('get_user_store--2');
  681 + console.log(e);
  682 +
  683 + that.setData({
  684 + def_pick_store: e,
  685 + sto_sele_name: e.pickup_name,
  686 + sto_sele_id: e.pickup_id,
  687 + sto_sele_distr: e.distr_type,
  688 + sto_sele_keyid:e.keyid,
  689 + })
700 } 690 }
701 - })  
702 - }  
703 691
704 - //e.distance = distance;  
705 - appd.lat=that.data.lat;  
706 - appd.lon=that.data.lon; 692 + }
  693 + })
  694 + }
707 695
708 - } else {  
709 - if (e) {  
710 -  
711 -  
712 - console.log('get_user_store3---');  
713 - console.log(e);  
714 -  
715 - e.distance = null;  
716 - that.data.fir_def_store=e;  
717 - that.setData({  
718 - def_pick_store: e,  
719 - sto_sele_name: e.pickup_name,  
720 - sto_sele_id: e.pickup_id,  
721 - sto_sele_distr: e.distr_type,  
722 - sto_sele_keyid:e.keyid,  
723 - })  
724 - } 696 + //e.distance = distance;
  697 + appd.lat=that.data.lat;
  698 + appd.lon=that.data.lon;
  699 +
  700 + } else {
  701 + if (e) {
  702 +
  703 + console.log('get_user_store3---');
  704 + console.log(e);
  705 +
  706 + e.distance = null;
  707 + that.data.fir_def_store=e;
  708 + that.setData({
  709 + def_pick_store: e,
  710 + sto_sele_name: e.pickup_name,
  711 + sto_sele_id: e.pickup_id,
  712 + sto_sele_distr: e.distr_type,
  713 + sto_sele_keyid:e.keyid,
  714 + })
725 } 715 }
726 - }, 500)  
727 - },1500) 716 + }
  717 + }, 200)
  718 +
728 719
729 }); 720 });
730 }) 721 })
@@ -808,7 +799,8 @@ Page({ @@ -808,7 +799,8 @@ Page({
808 }); 799 });
809 800
810 th.data.enterAddressPage && (this.data.enterAddressPage = !1); 801 th.data.enterAddressPage && (this.data.enterAddressPage = !1);
811 - th.get_sto(); 802 + //没有互动,就调用默认的门店
  803 + if(!th.data.prom_type) th.get_sto();
812 }) 804 })
813 805
814 806
@@ -1642,6 +1634,7 @@ Page({ @@ -1642,6 +1634,7 @@ Page({
1642 var th = this,that=this; 1634 var th = this,that=this;
1643 var timer_get = setInterval(function() { 1635 var timer_get = setInterval(function() {
1644 if (th.data.is_get_local_ok == 0) return false; 1636 if (th.data.is_get_local_ok == 0) return false;
  1637 + if (!th.data.fir_def_store) return false;
1645 var i = getApp().request; 1638 var i = getApp().request;
1646 if (!th.data.data) return false; 1639 if (!th.data.data) return false;
1647 var dd= { 1640 var dd= {
@@ -1694,31 +1687,69 @@ Page({ @@ -1694,31 +1687,69 @@ Page({
1694 } 1687 }
1695 } 1688 }
1696 1689
1697 - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店  
1698 - if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){  
1699 - th.setData({  
1700 - def_pick_store:e.data.data.pageData[0],  
1701 - sto_sele_name: e.data.data.pageData[0].pickup_name,  
1702 - sto_sele_id: e.data.data.pageData[0].pickup_id,  
1703 - sto_sele_distr: e.data.data.pageData[0].distr_type,  
1704 - sto_sele_keyid: e.data.data.pageData[0].keyid,  
1705 - });  
1706 - th.data.fir_def_store=e.data.data.pageData[0];  
1707 - } 1690 + //如果有秒杀的指定门店
  1691 + if(th.data.prom_type==1 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length){
  1692 + var pick_up_lists=th.data.prom_act.pick_up_lists;
  1693 + for (var kq = 0; kq < e.data.data.pageData.length; kq++) {
  1694 + var it0=e.data.data.pageData[kq];
  1695 + var idx0=pick_up_lists.findIndex(function (e){
  1696 + return e.pickup_id==it0.pickup_id;
  1697 + })
  1698 + if (idx0<0) {
  1699 + //删除
  1700 + e.data.data.pageData.splice(kq--, 1);
  1701 + }
  1702 + }
  1703 +
  1704 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){
  1705 + //-- 查找一下门店有没有在 --
  1706 + var idx1=pick_up_lists.findIndex(function (e){
  1707 + return e.pickup_id==th.data.def_pick_store.pickup_id;
  1708 + })
  1709 + if(idx1<0){
  1710 + //如果是秒杀的指定门店,就要设置秒杀的
  1711 + th.data.def_pick_store.is_no_dis_act=1;
  1712 + that.setData({
  1713 + def_pick_store: th.data.def_pick_store
  1714 + })
  1715 + }
  1716 + }
  1717 +
  1718 + }
  1719 +
  1720 + //-- 如果门店过滤后,还会是数量 --
  1721 + if(e.data.data.pageData.length){
  1722 + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
  1723 + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){
  1724 + th.setData({
  1725 + def_pick_store:e.data.data.pageData[0],
  1726 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1727 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1728 + sto_sele_distr: e.data.data.pageData[0].distr_type,
  1729 + sto_sele_keyid: e.data.data.pageData[0].keyid,
  1730 + });
  1731 + th.data.fir_def_store=e.data.data.pageData[0];
  1732 + }
  1733 +
  1734 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
  1735 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){
  1736 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  1737 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  1738 + e.data.data.pageData.splice(k, 1); //删除
  1739 + break;
  1740 + }
  1741 + }
  1742 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  1743 + }
  1744 +
  1745 + th.setData({all_pick_list:e.data.data.pageData});
  1746 + th.deal_pickup(e);
  1747 + }
  1748 + else{
  1749 + wx.hideLoading();
  1750 + }
  1751 +
1708 1752
1709 - //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --  
1710 - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){  
1711 - for (var k = 0; k < e.data.data.pageData.length; k++) {  
1712 - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {  
1713 - e.data.data.pageData.splice(k, 1); //删除  
1714 - break;  
1715 - }  
1716 - }  
1717 - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加  
1718 - }  
1719 -  
1720 - th.setData({all_pick_list:e.data.data.pageData});  
1721 - th.deal_pickup(e);  
1722 },800) 1753 },800)
1723 1754
1724 } 1755 }
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -172,6 +172,7 @@ @@ -172,6 +172,7 @@
172 <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(未找到门店)</view> 172 <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(未找到门店)</view>
173 <block wx:else> 173 <block wx:else>
174 <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view> 174 <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view>
  175 + <text wx:elif="{{def_pick_store.is_no_dis_act}}" class="no_store">(该店不可售)</text>
175 <block wx:else> 176 <block wx:else>
176 <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> 177 <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view>
177 </block> 178 </block>
@@ -686,6 +687,7 @@ @@ -686,6 +687,7 @@
686 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> 687 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
687 <block wx:else> 688 <block wx:else>
688 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> 689 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  690 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view>
689 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view> 691 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view>
690 </block> 692 </block>
691 </block> 693 </block>
@@ -709,6 +711,7 @@ @@ -709,6 +711,7 @@
709 711
710 <view class="spec-cart-btns"> 712 <view class="spec-cart-btns">
711 <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> 713 <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view>
  714 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view>
712 <block wx:else> 715 <block wx:else>
713 716
714 <!-- 根本就找不到门店 --> 717 <!-- 根本就找不到门店 -->
@@ -831,9 +834,10 @@ @@ -831,9 +834,10 @@
831 <view class="flex-vertical-between butttem5"> 834 <view class="flex-vertical-between butttem5">
832 <view class="flex xc-ash"> 835 <view class="flex xc-ash">
833 <view class="fs30 xc-black3 address_name">{{item.pickup_name}} 836 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
834 - <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> 837 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
835 <text class="no_store">(配送不匹配)</text> 838 <text class="no_store">(配送不匹配)</text>
836 </block> 839 </block>
  840 + <text wx:elif="{{item.is_no_dis_act}}" class="no_store">(该店不可售)</text>
837 841
838 </view> 842 </view>
839 </view> 843 </view>
@@ -862,9 +866,10 @@ @@ -862,9 +866,10 @@
862 <view class="flex-vertical-between "> 866 <view class="flex-vertical-between ">
863 <view class="flex xc-ash"> 867 <view class="flex xc-ash">
864 <view class="fs30 xc-black3 address_name">{{item.pickup_name}} 868 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
865 - <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> 869 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
866 <text class="no_store">(配送不匹配)</text> 870 <text class="no_store">(配送不匹配)</text>
867 </block> 871 </block>
  872 + <text wx:elif="{{item.is_no_dis_act}}" class="no_store">(该店不可售)</text>
868 </view> 873 </view>
869 </view> 874 </view>
870 <view> 875 <view>
@@ -894,9 +899,10 @@ @@ -894,9 +899,10 @@
894 <view class="flex-vertical-between "> 899 <view class="flex-vertical-between ">
895 <view class="flex xc-ash"> 900 <view class="flex xc-ash">
896 <view class="fs28 xc-black3 address_name">{{item.pickup_name}} 901 <view class="fs28 xc-black3 address_name">{{item.pickup_name}}
897 - <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> 902 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
898 <text class="no_store">(配送不匹配)</text> 903 <text class="no_store">(配送不匹配)</text>
899 </block> 904 </block>
  905 + <text wx:elif="{{item.is_no_dis_act}}" class="no_store">(该店不可售)</text>
900 </view> 906 </view>
901 </view> 907 </view>
902 <view> 908 <view>
packageA/pages/profile/profile.js
@@ -1040,7 +1040,11 @@ Page({ @@ -1040,7 +1040,11 @@ Page({
1040 getApp().globalData.login_back = 1; 1040 getApp().globalData.login_back = 1;
1041 wx.setStorageSync("userinfo", e.data.data); 1041 wx.setStorageSync("userinfo", e.data.data);
1042 wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(a.globalData.userInfo.head_pic); 1042 wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(a.globalData.userInfo.head_pic);
1043 - wx.navigateBack({delta: 1}) 1043 + //wx.navigateBack({delta: 1})
  1044 + //-- 看情况,是跳转等级卡,还是跳转到新人有礼 --
  1045 + getApp().go_to_page(function (){
  1046 + wx.navigateBack({ delta: 1 })
  1047 + })
1044 1048
1045 }, 1049 },
1046 failStatus: function (t) { 1050 failStatus: function (t) {
packageA/pages/quan_pro/quan_pro.js
@@ -2,7 +2,7 @@ var t = require(&quot;../../../utils/util.js&quot;), ut = t, @@ -2,7 +2,7 @@ var t = require(&quot;../../../utils/util.js&quot;), ut = t,
2 e = require("../../../utils/common.js"), 2 e = require("../../../utils/common.js"),
3 oo = getApp().globalData, 3 oo = getApp().globalData,
4 os = getApp().globalData.setting; 4 os = getApp().globalData.setting;
5 - var utils = require('../../../utils/util.js'),ut=utils; 5 +
6 6
7 Page({ 7 Page({
8 data: { 8 data: {
@@ -44,23 +44,64 @@ Page({ @@ -44,23 +44,64 @@ Page({
44 }, 44 },
45 45
46 //---展示,显示券的信息--- 46 //---展示,显示券的信息---
47 - onShow: function() { 47 + onShow:async function() {
48 48
49 //检查能不能分享 49 //检查能不能分享
50 getApp().check_can_share(); 50 getApp().check_can_share();
51 -  
52 var th=this; 51 var th=this;
53 - var user_id=getApp().globalData.user_id;  
54 - getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", {  
55 - data:{store_id:os.stoid,type:1,id:th.data.id,user_id:user_id}  
56 - }).then(res => {  
57 - th.setData({is_get:1});  
58 - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length){  
59 - th.setData({q_data:res.data.data.pageData[0]});  
60 - }  
61 - });  
62 -  
63 th.setData({getcurday:ut.gettimestamp()}); 52 th.setData({getcurday:ut.gettimestamp()});
  53 +
  54 + var rs=await getApp().request.promiseGet("/api/weshop/prom/coupon/get/"+th.data.id, {})
  55 + if(!rs){
  56 + th.setData({is_get:1});
  57 + return false;
  58 + }
  59 + if(rs.data.code!=0){
  60 + th.setData({is_get:1});
  61 + return false;
  62 + }
  63 + var r_data=rs.data.data;
  64 + if(r_data.store_id!=os.stoid){
  65 + th.setData({is_get:1});
  66 + return false;
  67 + }
  68 + if(r_data.type!=1){
  69 + th.setData({is_get:2});
  70 + return false;
  71 + }
  72 +
  73 + var now=ut.gettimestamp();
  74 +
  75 + if(r_data.send_start_time>now){
  76 + th.setData({is_get:3});
  77 + return false;
  78 + }
  79 +
  80 + if(r_data.send_end_time<now){
  81 + th.setData({is_get:4});
  82 + return false;
  83 + }
  84 +
  85 + th.setData({is_get:1});
  86 + th.setData({ q_data:r_data });
  87 +
  88 + //如果只限定链接的时候,要取消分享按钮
  89 + if(r_data.is_share){
  90 + wx.hideShareMenu();
  91 + }
  92 +
  93 +
  94 + // var user_id=getApp().globalData.user_id;
  95 + // await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", {
  96 + // data:{store_id:os.stoid,type:1,id:th.data.id,user_id:user_id}
  97 + // }).then(res => {
  98 + // th.setData({is_get:1});
  99 + // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length){
  100 + // th.setData({q_data:res.data.data.pageData[0]});
  101 + // }
  102 + // });
  103 +
  104 +
64 }, 105 },
65 106
66 onHide: function() { 107 onHide: function() {
packageA/pages/quan_pro/quan_pro.wxml
@@ -11,7 +11,10 @@ @@ -11,7 +11,10 @@
11 <view> 11 <view>
12 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image> 12 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image>
13 <text wx:if="{{q_data}}">{{q_data.name}}</text> 13 <text wx:if="{{q_data}}">{{q_data.name}}</text>
14 - <text wx:elif="{{is_get}}" class="fs28">不存在此微券或数量已领取完</text> 14 + <text wx:elif="{{is_get==1}}" class="fs28">不存在此微券或数量已领取完</text>
  15 + <text wx:elif="{{is_get==2}}" class="fs28">该优惠券不是免费发放类型</text>
  16 + <text wx:elif="{{is_get==3}}" class="fs28">活动未开始暂时无法发放优惠券</text>
  17 + <text wx:elif="{{is_get==4}}" class="fs28">优惠券已过期</text>
15 </view> 18 </view>
16 <view class="fs30 flex" wx:if="{{q_data}}" style="height: 100rpx;justify-content: space-between;"> 19 <view class="fs30 flex" wx:if="{{q_data}}" style="height: 100rpx;justify-content: space-between;">
17 <view class="flex ai-center"> 20 <view class="flex ai-center">
@@ -45,7 +48,10 @@ @@ -45,7 +48,10 @@
45 </block> 48 </block>
46 49
47 <view wx:elif="{{is_get}}" class="fs28" style="text-align: center;color: #999;position: absolute;bottom: 20rpx;"> 50 <view wx:elif="{{is_get}}" class="fs28" style="text-align: center;color: #999;position: absolute;bottom: 20rpx;">
48 - 不存在此微券或数量已领取完 51 + <text wx:if="{{is_get==1}}">不存在此微券或数量已领取完</text>
  52 + <text wx:if="{{is_get==2}}">该优惠券不是免费发放类型</text>
  53 + <text wx:if="{{is_get==3}}">活动未开始暂时无法发放优惠券</text>
  54 + <text wx:if="{{is_get==4}}">优惠券已过期</text>
49 </view> 55 </view>
50 56
51 </view> 57 </view>
packageE/pages/togoin/togoin.js
@@ -357,7 +357,12 @@ Page({ @@ -357,7 +357,12 @@ Page({
357 } 357 }
358 }) 358 })
359 359
360 - wx.navigateBack({ delta: 1 }) 360 + //-- 看情况,是跳转等级卡,还是跳转到新人有礼 --
  361 + getApp().go_to_page(function (){
  362 + wx.navigateBack({ delta: 1 })
  363 + })
  364 +
  365 +
361 366
362 }, 367 },
363 failStatus: function (t) { 368 failStatus: function (t) {
packageE/pages/user/labels/labels.js
@@ -273,9 +273,14 @@ Page({ @@ -273,9 +273,14 @@ Page({
273 // check_label: arr 273 // check_label: arr
274 // }) 274 // })
275 // th.goto(); 275 // th.goto();
276 - wx.reLaunch({  
277 - url: '/pages/user/index/index', 276 + // wx.reLaunch({
  277 + // url: '/pages/user/index/index',
  278 + // })
  279 + //-- 看情况,是跳转等级卡,还是跳转到新人有礼 --
  280 + getApp().go_to_page(function (){
  281 + wx.navigateBack({ delta: 1 })
278 }) 282 })
  283 +
279 }, 2000); 284 }, 2000);
280 } else { 285 } else {
281 getApp().my_warnning("系统繁忙,请稍后再试", 0, th); 286 getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
pages/cart/cart/cart.js
@@ -672,14 +672,25 @@ Page({ @@ -672,14 +672,25 @@ Page({
672 }) 672 })
673 673
674 //只有一种活动,但是又是秒杀之类是互动,就要失效。不能是普通购买 674 //只有一种活动,但是又是秒杀之类是互动,就要失效。不能是普通购买
675 - if (prom && prom.length == 1 && [1, 2, 4, 6, 8, 9].indexOf(prom.prom_type) > -1 && !prom.is_integral_normal && !prom.is_pd_normal) { 675 + if (prom && prom.length == 1 && [1, 2, 4, 6, 8, 9].indexOf(prom[0].prom_type) > -1 && !item.is_integral_normal && !item.is_pd_normal) {
676 th.disInvalid(item); 676 th.disInvalid(item);
677 continue; 677 continue;
678 } 678 }
  679 +
679 //只有秒杀和积分购的时候,不能是普通购买 680 //只有秒杀和积分购的时候,不能是普通购买
680 - if (prom && prom.length == 2 && [1, 4].indexOf(prom.prom_type) > -1 && [1, 4].indexOf(prom.prom_type) > -1 && !prom.is_integral_normal && !prom.is_pd_normal) {  
681 - th.disInvalid(item);  
682 - continue; 681 + if (prom && prom.length == 2 && !item.is_integral_normal && !item.is_pd_normal) {
  682 + var idx=prom.findIndex(function (e){
  683 + return e.prom_type==1;
  684 + })
  685 + var idx2=prom.findIndex(function (e){
  686 + return e.prom_type==4;
  687 + })
  688 + //--如果是有秒杀和积分的时候--
  689 + if(idx>-1 && idx2>-1){
  690 + th.disInvalid(item);
  691 + continue;
  692 + }
  693 +
683 } 694 }
684 695
685 } 696 }
@@ -724,6 +735,8 @@ Page({ @@ -724,6 +735,8 @@ Page({
724 //商品已经下架 735 //商品已经下架
725 continue; 736 continue;
726 } 737 }
  738 + //把活动写入
  739 + item.prom=prom;
727 740
728 //判断秒杀的限购 741 //判断秒杀的限购
729 if (item.goods_num + promgoodsbuynum > prom.buy_limit && prom.buy_limit > 0) { 742 if (item.goods_num + promgoodsbuynum > prom.buy_limit && prom.buy_limit > 0) {
@@ -984,6 +997,8 @@ Page({ @@ -984,6 +997,8 @@ Page({
984 }, 0, 1); 997 }, 0, 1);
985 continue; 998 continue;
986 } 999 }
  1000 +
  1001 + item.prom=prom;
987 //判断秒杀的限购 1002 //判断秒杀的限购
988 var msNum = 0 1003 var msNum = 0
989 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { 1004 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
@@ -3327,6 +3342,18 @@ Page({ @@ -3327,6 +3342,18 @@ Page({
3327 if (res.data.code == 0) gd = res.data.data; 3342 if (res.data.code == 0) gd = res.data.data;
3328 }) 3343 })
3329 3344
  3345 + //判断秒杀的指定门店
  3346 + if(py_type==1 && i_arr[j].prom && i_arr[j].prom.pick_up_lists){
  3347 + var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){
  3348 + return e.pickup_id==i_arr[j].pick_id;
  3349 + })
  3350 + if(idx0<0){
  3351 + getApp().confirmBox(i_arr[j].goods_name + "秒杀活动的门店不可售");
  3352 + wx.hideLoading();
  3353 + return false;
  3354 + }
  3355 + }
  3356 +
3330 if ([0, 3, 5, 7, 10].indexOf(py_type) > -1) { 3357 if ([0, 3, 5, 7, 10].indexOf(py_type) > -1) {
3331 //如果是指定门店,就要判断 3358 //如果是指定门店,就要判断
3332 if(gd.pick_group_ids){ 3359 if(gd.pick_group_ids){
@@ -3582,8 +3609,22 @@ Page({ @@ -3582,8 +3609,22 @@ Page({
3582 store_id: oo.stoid 3609 store_id: oo.stoid
3583 } 3610 }
3584 }); 3611 });
  3612 +
  3613 +
  3614 + //判断秒杀的指定门店
  3615 + if(i_arr[j].prom_type==1 && i_arr[j].prom && i_arr[j].prom.pick_up_lists && i_arr[j].selected){
  3616 + var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){
  3617 + return e.pickup_id==i_arr[j].pick_id;
  3618 + })
  3619 + if(idx0<0){
  3620 + getApp().confirmBox(i_arr[j].service_name + "秒杀活动的门店不可售");
  3621 + wx.hideLoading();
  3622 + return false;
  3623 + }
  3624 + }
3585 } 3625 }
3586 } 3626 }
  3627 +
3587 //排除失效服务结算 3628 //排除失效服务结算
3588 this.data.invalidList.map(item => { 3629 this.data.invalidList.map(item => {
3589 if (item.selected && item.classType == 1) { 3630 if (item.selected && item.classType == 1) {
@@ -3596,6 +3637,8 @@ Page({ @@ -3596,6 +3637,8 @@ Page({
3596 }); 3637 });
3597 } 3638 }
3598 }) 3639 })
  3640 +
  3641 +
3599 wx.hideLoading(); 3642 wx.hideLoading();
3600 getApp().goto("/packageA/pages/cart2_ser/cart2_ser?is_cart=1"); 3643 getApp().goto("/packageA/pages/cart2_ser/cart2_ser?is_cart=1");
3601 } 3644 }
pages/goods/goodsInfo/goodsInfo.js
@@ -3569,14 +3569,21 @@ Page({ @@ -3569,14 +3569,21 @@ Page({
3569 3569
3570 if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { 3570 if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
3571 3571
  3572 + var pickup_ids=th.data.sele_g.pickup_ids;
  3573 +
  3574 + //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店
  3575 + if(!is_normal && th.data.prom_type==1 && th.data.prom_act.pick_up_lists){
  3576 + pickup_ids=th.data.prom_act.pick_up_lists
  3577 + }
  3578 +
3572 //-- 如果有指定门店的时候 -- 3579 //-- 如果有指定门店的时候 --
3573 - if(th.data.sele_g.pickup_ids){ 3580 + if(pickup_ids){
3574 3581
3575 var ok_arr=[]; 3582 var ok_arr=[];
3576 for (let i in e.data.data.pageData) { 3583 for (let i in e.data.data.pageData) {
3577 let ite = e.data.data.pageData[i]; 3584 let ite = e.data.data.pageData[i];
3578 //-- 查找一下门店有没有在 -- 3585 //-- 查找一下门店有没有在 --
3579 - var idx=th.data.sele_g.pickup_ids.findIndex(function (e){ 3586 + var idx=pickup_ids.findIndex(function (e){
3580 return e.pickup_id==ite.pickup_id; 3587 return e.pickup_id==ite.pickup_id;
3581 }) 3588 })
3582 if(idx>-1){ 3589 if(idx>-1){
@@ -3588,12 +3595,18 @@ Page({ @@ -3588,12 +3595,18 @@ Page({
3588 if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ 3595 if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){
3589 3596
3590 //-- 查找一下门店有没有在 -- 3597 //-- 查找一下门店有没有在 --
3591 - var idx1=th.data.sele_g.pickup_ids.findIndex(function (e){ 3598 + var idx1=pickup_ids.findIndex(function (e){
3592 return e.pickup_id==th.data.def_pick_store.pickup_id; 3599 return e.pickup_id==th.data.def_pick_store.pickup_id;
3593 }) 3600 })
3594 3601
3595 if(idx1<0){ 3602 if(idx1<0){
3596 th.data.def_pick_store.is_no_dis_nor=1; 3603 th.data.def_pick_store.is_no_dis_nor=1;
  3604 + //如果是秒杀的指定门店,就要设置秒杀的
  3605 + if(!is_normal && th.data.prom_type==1){
  3606 + th.data.def_pick_store.is_no_dis_act=1;
  3607 + }else{
  3608 + th.data.def_pick_store.is_no_dis_nor=1;
  3609 + }
3597 that.setData({ 3610 that.setData({
3598 def_pick_store: th.data.def_pick_store 3611 def_pick_store: th.data.def_pick_store
3599 }) 3612 })
@@ -3601,7 +3614,7 @@ Page({ @@ -3601,7 +3614,7 @@ Page({
3601 } 3614 }
3602 3615
3603 3616
3604 - e.data.data.pageData=ok_arr; //数组重新赋值 3617 + e.data.data.pageData=ok_arr; //数组重新赋值
3605 e.data.data.total=ok_arr.length; //数组的长度 3618 e.data.data.total=ok_arr.length; //数组的长度
3606 } 3619 }
3607 3620
pages/goods/goodsInfo/goodsInfo.wxml
@@ -712,6 +712,9 @@ @@ -712,6 +712,9 @@
712 <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}"> 712 <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}">
713 (该店不可售) 713 (该店不可售)
714 </view> 714 </view>
  715 + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}">
  716 + (该店不可售)
  717 + </view>
715 <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> 718 <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}">
716 (库存不足) 719 (库存不足)
717 </view> 720 </view>
@@ -1325,7 +1328,10 @@ @@ -1325,7 +1328,10 @@
1325 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> 1328 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
1326 <block wx:else> 1329 <block wx:else>
1327 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> 1330 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  1331 +
1328 <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view> 1332 <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view>
  1333 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor && is_normal}}">(该店不可售)</view>
  1334 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}">(该店不可售)</view>
1329 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0 &&!sele_g.whsle_id }}"> 1335 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0 &&!sele_g.whsle_id }}">
1330 (库存不足) 1336 (库存不足)
1331 </view> 1337 </view>
@@ -1385,6 +1391,12 @@ @@ -1385,6 +1391,12 @@
1385 <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> 1391 <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
1386 该店不可售 1392 该店不可售
1387 </view> 1393 </view>
  1394 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  1395 + 该店不可售
  1396 + </view>
  1397 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act && !is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  1398 + 该店不可售
  1399 + </view>
1388 <block wx:else> 1400 <block wx:else>
1389 <!-- 根本就找不到门店 --> 1401 <!-- 根本就找不到门店 -->
1390 <block wx:if="{{!only_pk && !def_pickpu_list}}"> 1402 <block wx:if="{{!only_pk && !def_pickpu_list}}">
@@ -1641,6 +1653,8 @@ @@ -1641,6 +1653,8 @@
1641 <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text> 1653 <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text>
1642 <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text> 1654 <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text>
1643 <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text> 1655 <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text>
  1656 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text>
  1657 + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text>
1644 </view> 1658 </view>
1645 </view> 1659 </view>
1646 <view> 1660 <view>
@@ -1670,6 +1684,8 @@ @@ -1670,6 +1684,8 @@
1670 <view class="fs30 xc-black3 address_name">{{item.pickup_name}} 1684 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
1671 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> 1685 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text>
1672 <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text> 1686 <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text>
  1687 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text>
  1688 + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text>
1673 <text class="c-red22" wx:elif="{{item.is_no_qyt }}">(库存不足)</text> 1689 <text class="c-red22" wx:elif="{{item.is_no_qyt }}">(库存不足)</text>
1674 </view> 1690 </view>
1675 </view> 1691 </view>
pages/user/order_detail/order_detail.js
@@ -978,6 +978,19 @@ Page({ @@ -978,6 +978,19 @@ Page({
978 } 978 }
979 //----------如果有活动,并且在进行中,就不计算线下库存--------------- 979 //----------如果有活动,并且在进行中,就不计算线下库存---------------
980 if (prom) { 980 if (prom) {
  981 +
  982 + //指定门店的控制
  983 + if (goodsinfo.prom_type == 1 && prom.pick_up_lists) {
  984 + var idx0=prom.pick_up_lists.findIndex(function (e){
  985 + return e.pickup_id==order.pickup_id;
  986 + })
  987 + if(idx0<0){
  988 + getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售");
  989 + th.setData({ paying: 0 });
  990 + return false;
  991 + }
  992 + }
  993 +
981 var now = ut.gettimestamp(); 994 var now = ut.gettimestamp();
982 if (prom.is_end == 1 && prom.end_time < now) { 995 if (prom.is_end == 1 && prom.end_time < now) {
983 var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单' 996 var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单'
pages/user/order_list/order_list.js
@@ -1292,6 +1292,20 @@ Page({ @@ -1292,6 +1292,20 @@ Page({
1292 } 1292 }
1293 //----------如果有活动,并且在进行中,就不计算线下库存--------------- 1293 //----------如果有活动,并且在进行中,就不计算线下库存---------------
1294 if (prom) { 1294 if (prom) {
  1295 +
  1296 + //指定门店的控制
  1297 + if (goodsinfo.prom_type == 1 && prom.pick_up_lists) {
  1298 + var idx0=prom.pick_up_lists.findIndex(function (e){
  1299 + return e.pickup_id==order.pickup_id;
  1300 + })
  1301 + if(idx0<0){
  1302 + getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售");
  1303 + th.setData({ paying: 0 });
  1304 + return false;
  1305 + }
  1306 + }
  1307 +
  1308 +
1295 var now = ut.gettimestamp(); 1309 var now = ut.gettimestamp();
1296 if (prom.is_end == 1 && prom.end_time < now) { 1310 if (prom.is_end == 1 && prom.end_time < now) {
1297 var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单' 1311 var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单'
@@ -2849,10 +2863,24 @@ Page({ @@ -2849,10 +2863,24 @@ Page({
2849 return false; 2863 return false;
2850 } 2864 }
2851 2865
  2866 +
  2867 + //指定门店的控制
  2868 + if (act_details.pick_up_lists) {
  2869 + var idx0=act_details.pick_up_lists.findIndex(function (e){
  2870 + return e.pickup_id==it.pickup_id;
  2871 + })
  2872 + if(idx0<0){
  2873 + getApp().confirmBox(it.service_name + "秒杀活动的门店不可售");
  2874 + th.setData({ paying: 0 });
  2875 + flag = false;
  2876 + return false;
  2877 + }
  2878 + }
  2879 +
2852 } 2880 }
2853 }); 2881 });
2854 2882
2855 - if(act_details.buy_limit>0 && flag){ 2883 + if(act_details && act_details.buy_limit>0 && flag){
2856 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { 2884 await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
2857 data: { 2885 data: {
2858 store_id: store_id, 2886 store_id: store_id,