Commit 36a7c2ff68db9f5773fa7b8dc2a63f77cf774af2

Authored by 后端研发-苏泰源
1 parent c8a0e37e

服务卡项秒杀

packageA/pages/cart2_ser/cart2_ser.js
... ... @@ -249,6 +249,11 @@ Page({
249 249 t.data.data.original_img = oo.imghost + t.data.data.imgUrl;
250 250 t.data.data['buynum'] = gg.goods_num;
251 251 t.data.data.shop_price = gd.money;
  252 +
  253 + if(th.data.postdata.prom_type == 1) {
  254 + let postdata = th.data.postdata;
  255 + t.data.data.shop_price = postdata.prom_price;
  256 + };
252 257  
253 258 th.setData({
254 259 bn_goods: t.data.data,
... ... @@ -510,6 +515,12 @@ Page({
510 515 // 'price': th.data.formData.order_amount,
511 516 'pickup_id': gg.pick_id,
512 517 'pickup_keyid': gg.keyid,
  518 + 'prom_type': this.data.postdata.prom_type, //促销活动类型
  519 + 'prom_id': this.data.postdata.prom_id, //促销活动id
  520 + };
  521 +
  522 + if(this.data.postdata.prom_type == 1) {
  523 + goods.price = this.data.postdata.prom_price;
513 524 };
514 525  
515 526 //--导购分享过来的id--
... ... @@ -525,6 +536,7 @@ Page({
525 536 }
526 537 })
527 538 }
  539 + console.log('goooooooooooooooooods', goods);
528 540 item.list.push(goods);
529 541 }
530 542  
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -205,22 +205,18 @@ Page({
205 205 hui_condition:null,
206 206 sto_sele_name_1:'',//分享的门店名称
207 207  
  208 + // 秒杀
  209 + prom_st: 1,
  210 + prom_r_null: 0,
208 211 },
209 212  
210 213 //------初始化加载----------
211 214 onLoad: function(t) {
212   -
213   - // ===> 小程序页面分享到朋友圈时使用
214   - if(!getApp().is_Single_page()){
215   - return false;
216   - }
217   - // <===
218   -
219   -
220   -
221 215 self = this;
222   - this.data.options = t; // { goods_id: ...}
223   -
  216 +
  217 + this.setData({
  218 + options: t,
  219 + });
224 220  
225 221 var ee = this,
226 222 that = ee,
... ... @@ -385,7 +381,7 @@ Page({
385 381 var ser_card=th.data.data;
386 382 //--如果默认门店不在等级卡的默认们店以内
387 383 if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){
388   - ee.is_no_dis=1;
  384 + ee.is_no_dis=1;
389 385 }
390 386  
391 387 var appd=getApp().globalData;
... ... @@ -454,6 +450,7 @@ Page({
454 450 });
455 451  
456 452 },
  453 +
457 454 //------------程序初始化入口-------------
458 455 async init(gid) {
459 456 var ee = this,
... ... @@ -494,6 +491,58 @@ Page({
494 491 // })
495 492  
496 493  
  494 + // ----> 秒杀
  495 + let prom_type = this.data.options.prom_type;
  496 +
  497 + let goods_id = this.data.options.goods_id;
  498 + if(!goods_id) goods_id = this.data.data.goods_id;
  499 +
  500 + if(prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入
  501 + let prom_id = this.data.options.prom_id;
  502 + this.check_prom(goods_id, prom_type, prom_id);
  503 + } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数
  504 + getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', {
  505 + data: {
  506 + store_id: os.stoid,
  507 + goodsidlist: goods_id,
  508 + is_detail: 1,
  509 + goods_type: 1,
  510 + user_id: oo.user_id,
  511 + }
  512 + }).then(res => {
  513 + if (res.data.code == 0) {
  514 + let result = res.data.data;
  515 + let resLength = result.length;
  516 + if(resLength == 1) { // 如果数组长度为1,则直接显示当前活动
  517 + let goods_id = this.data.options.goods_id;
  518 + let prom_type = result[0].prom_type;
  519 + let prom_id = result[0].act_id;
  520 + this.setData({
  521 + 'options.prom_type': prom_type,
  522 + });
  523 + this.check_prom(goods_id, prom_type, prom_id);
  524 + } else if(resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动
  525 + this.setData({
  526 + actList: res.data.data,
  527 + });
  528 + };
  529 +
  530 + console.log('!!!!!!~~~~~~~~~prom~~~~~~~~~~!!!!!!');
  531 + // this.setData({
  532 + // prom,
  533 + // });
  534 +
  535 + };
  536 + });
  537 + };
  538 + // <---- 秒杀
  539 +
  540 +
  541 +
  542 +
  543 +
  544 +
  545 +
497 546 //------是否收藏----------
498 547 await getApp().request.promiseGet("/api/weshop/goodscollect/page", {
499 548 data: {
... ... @@ -517,8 +566,6 @@ Page({
517 566 store_id: os.stoid,
518 567 service_id: gid
519 568 },
520   - //failRollback: !0,
521   -
522 569 }).then(res => {
523 570 console.log('get评价统计数量', res.data.data);
524 571 var t = res;
... ... @@ -538,7 +585,7 @@ Page({
538 585  
539 586 categories3 = dd;
540 587 }
541   - })
  588 + });
542 589  
543 590 //----获取详情页的评价----
544 591 await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", {
... ... @@ -553,7 +600,7 @@ Page({
553 600 }).then(res => {
554 601 console.log('get详情页评价', res.data.data);
555 602 fir_com = res.data.data.pageData;
556   - })
  603 + });
557 604  
558 605 if (fir_com) {
559 606 for (var ind in fir_com) {
... ... @@ -561,7 +608,7 @@ Page({
561 608 if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img);
562 609 if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img);
563 610 }
564   - }
  611 + };
565 612  
566 613 this.getTaohe();
567 614  
... ... @@ -600,6 +647,7 @@ Page({
600 647 var ee = this,gid = this.data.gid, i = getApp().request;
601 648 this.data.is_timer = 1;
602 649 this.wait_for_store_config();
  650 +
603 651  
604 652 i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
605 653 failRollback: !0,
... ... @@ -676,6 +724,8 @@ Page({
676 724 this.data.enterAddressPage && (this.data.enterAddressPage = !1);
677 725 this.get_sto();
678 726  
  727 +
  728 +
679 729 },
680 730  
681 731 enterAddress: function() {
... ... @@ -689,6 +739,7 @@ Page({
689 739 clearInterval(i);
690 740 }
691 741 },
  742 +
692 743 onHide: function() {
693 744 this.data.is_timer = 0;
694 745 for(var i = 1; i < 100; i++) {
... ... @@ -702,6 +753,7 @@ Page({
702 753 activeCategoryId: e
703 754 }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment();
704 755 },
  756 +
705 757 tabClick2: function(t) {
706 758 this.setData({
707 759 activeCategoryId2: t.currentTarget.id
... ... @@ -735,7 +787,7 @@ Page({
735 787 //商品详情的时候调用
736 788 tabGoodsContent: function() {
737 789 var th = this,
738   - i = getApp().request;
  790 + i = getApp().request;
739 791 this.setData({
740 792 activeCategoryId: 1
741 793 });
... ... @@ -749,7 +801,7 @@ Page({
749 801 var action= t.currentTarget.dataset.action;
750 802 if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
751 803  
752   - th.setData({
  804 + th.setData({
753 805 open_ind_store: ind
754 806 });
755 807  
... ... @@ -770,8 +822,16 @@ Page({
770 822 newd['pick_name'] = th.data.sto_sele_name;
771 823 newd['guide_id'] = getApp().globalData.guide_id;
772 824 newd['guide_type']=0;
  825 +
  826 + if(this.data.prom_type && this.data.prom_type == 1) {
  827 + newd['prom_type'] = this.data.prom_type;
  828 + newd['prom_id'] = this.data.prom_id;
  829 + newd['prom_price'] = this.data.prom_price;
  830 + }
  831 +
  832 + // console.log('newd++++++++', newd);
773 833 th.buyNow(newd);
774   - }else{
  834 + } else {
775 835  
776 836 var newd = {
777 837 service_id: th.data.data.id,
... ... @@ -881,7 +941,8 @@ Page({
881 941 },
882 942  
883 943 openSpecModel: function(t) {
884   - var th=this;
  944 + // console.log('****ttttttt***', t);
  945 + var th=this;
885 946 var open_store = t.currentTarget.dataset.ind;
886 947 this.setData({
887 948 store: 0,
... ... @@ -2749,7 +2810,278 @@ Page({
2749 2810 };
2750 2811 };
2751 2812 });
2752   - }
  2813 + },
  2814 +
  2815 +
  2816 +
  2817 +
  2818 + //---小于10的格式化函数----
  2819 + // timeFormat(param) {
  2820 + // return param < 10 ? '0' + param : param;
  2821 + // },
  2822 +
  2823 + //----倒计时函数-----
  2824 + countDown(time, prom_st) {
  2825 + if (!this.data.is_timer) return false;
  2826 + var th = this;
  2827 + // 获取当前时间,同时得到活动结束时间数组
  2828 + var endTime = time;
  2829 + var newTime = ut.gettimestamp();
  2830 + // 对结束时间进行处理渲染到页面
  2831 + var obj = null;
  2832 + // 如果活动未结束,对时间进行处理
  2833 + if (endTime - newTime > 0) {
  2834 + var time = (endTime - newTime);
  2835 + // 获取天、时、分、秒
  2836 + var day = parseInt(time / (60 * 60 * 24));
  2837 + var hou = parseInt(time % (60 * 60 * 24) / 3600);
  2838 + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  2839 + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  2840 + obj = {
  2841 + day: this.timeFormat(day),
  2842 + hou: this.timeFormat(hou),
  2843 + min: this.timeFormat(min),
  2844 + sec: this.timeFormat(sec)
  2845 + }
  2846 + } else {
  2847 + if (th.data.prom_st == 0) {
  2848 + //var endTime2 = new Date(th.data.prom_end_time).getTime();
  2849 + var endTime2 = th.data.prom_act.end_time;
  2850 + th.setData({
  2851 + prom_time_text: '距结束还剩:',
  2852 + prom_st: 1
  2853 + })
  2854 + setTimeout(function () {
  2855 + th.countDown(endTime2)
  2856 + }, 1000);
  2857 + return false;
  2858 +
  2859 + } else {
  2860 + //活动已结束,全部设置为'00'
  2861 + obj = {
  2862 + day: '00',
  2863 + hou: '00',
  2864 + min: '00',
  2865 + sec: '00'
  2866 + }
  2867 + th.setData({
  2868 + prom_time_text: '活动已经结束:',
  2869 + prom_st: 3
  2870 + })
  2871 + th.setData({
  2872 + djs: obj
  2873 + });
  2874 + return false;
  2875 + }
  2876 + }
  2877 +
  2878 + th.setData({
  2879 + djs: obj
  2880 + });
  2881 + setTimeout(function () {
  2882 + th.countDown(endTime)
  2883 + }, 1000);
  2884 + },
  2885 +
  2886 +
  2887 + get_normal(gid) {
  2888 + this.setData({
  2889 + prom_type: 0,
  2890 + isshow: 1,
  2891 + });
  2892 + // this.get_sku(os.stoid, this.data.data, gid);
  2893 + // this.get_sto();
  2894 + // this.check_is_youhui(gid, 1);
  2895 + this.data.is_normal = 1;
  2896 + },
  2897 +
  2898 +
  2899 +
  2900 +
  2901 + //--------检查是否活动,活动是否开始,或者是否结束-------
  2902 + async check_prom(gid, prom_type, prom_id) {
  2903 + console.log('check_prom');
  2904 + var ee = this, th = ee;
  2905 + var user_id = getApp().globalData.user_id;
  2906 + if (!user_id) user_id = 0;
  2907 +
  2908 + // if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) {
  2909 + // this.setData({
  2910 + // prom_type: 0, isshow: 1,
  2911 + // });
  2912 + // return false;
  2913 + // }
  2914 +
  2915 +
  2916 +
  2917 + // if (prom_type == 1 && prom_id == 0) {
  2918 + // this.setData({
  2919 + // prom_type: 0, isshow: 1,
  2920 + // });
  2921 +
  2922 + // //获取门店
  2923 + // this.get_sto();
  2924 + // this.get_sku(o.stoid, this.data.data, gid);
  2925 + // this.check_has_flash();
  2926 + // this.data.is_normal = 1;
  2927 + // this.check_is_youhui(gid, 1);
  2928 + // return false;
  2929 + // }
  2930 +
  2931 + //if (prom_type != 3 && prom_type!=0){
  2932 + //---判断秒杀----
  2933 + if (prom_type == 1 && prom_id > 0) {
  2934 + //-------判断活动是否抢光---------
  2935 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  2936 + 1: 1
  2937 + }).then(res => {
  2938 + var em = res;
  2939 + if (res.data.code == 0) {
  2940 + // console.log('!!!!!!res!!!!', res);
  2941 + if (res.data.data <= 0) ee.setData({
  2942 + prom_r_null: 1
  2943 + });
  2944 + //拿取价格并且判断时间--
  2945 + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
  2946 + success: function (t) {
  2947 + // console.log('!!!!!!t!!!!', t);
  2948 + if (t.data.code != 0) {
  2949 + ee.get_normal(gid);
  2950 + return false;
  2951 + }
  2952 + //----已经结束-----
  2953 + if (t.data.data.is_end == 1) {
  2954 + ee.get_normal(gid);
  2955 + return false;
  2956 + }
  2957 + //----已经过期-----
  2958 + var now = ut.gettimestamp();
  2959 + if (t.data.data.end_time < now) {
  2960 + ee.get_normal(gid);
  2961 + return false;
  2962 + }
  2963 + /*-- 还没有开始预热的也不显示 --*/
  2964 + if (t.data.data.show_time > now) {
  2965 + ee.get_normal(gid);
  2966 + return false;
  2967 + }
  2968 +
  2969 + var t_gd = ee.data.data;
  2970 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  2971 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  2972 +
  2973 + ee.setData({
  2974 + 'data.shop_price': t.data.data.user_price,
  2975 + prom_price: t.data.data.user_price,
  2976 + prom_type: 1,
  2977 + prom_id: prom_id,
  2978 + prom_buy_limit: t.data.data.buy_limit,
  2979 + prom_act: t.data.data,
  2980 + prom_end_time: prom_end_time,
  2981 + prom_start_time: prom_start_time,
  2982 + isshow: 1,
  2983 + });
  2984 +
  2985 + ee.get_sto();
  2986 + var newTime = ut.gettimestamp();
  2987 + var endTime2 = t.data.data.end_time;
  2988 + var endTime1 = t.data.data.start_time;
  2989 + if (endTime1 > newTime) {
  2990 + ee.setData({
  2991 + prom_time_text: '距秒杀开始还有',
  2992 + prom_st: 0,
  2993 + })
  2994 + ee.countDown(endTime1, 0);
  2995 + } else {
  2996 + if (endTime2 > newTime) {
  2997 + ee.setData({
  2998 + prom_time_text: '距秒杀结束还有',
  2999 + prom_st: 1
  3000 + })
  3001 + ee.countDown(endTime2);
  3002 + }
  3003 + }
  3004 +
  3005 + //如果是进行中的话
  3006 + // if (endTime1 < newTime) {
  3007 + // //-- 获取秒杀活动的多少规格 --
  3008 + // ee.get_more_flahs(function (list) {
  3009 + // if (list && list.length > 1) {
  3010 +
  3011 + // var n_item = list[0];
  3012 + // var ind = list.findIndex(function (ele) {
  3013 + // return ele.goods_id == ee.data.data.goods_id;
  3014 + // })
  3015 + // if (ind < 0) return false;
  3016 + // if (ind > 0) {
  3017 + // n_item = JSON.parse(JSON.stringify(list[ind]));
  3018 + // list.splice(ind, 1);
  3019 + // list.unshift(n_item);
  3020 + // }
  3021 +
  3022 + // ee.data.sele_g.viplimited = n_item.viplimited;
  3023 + // ee.data.data.viplimited = n_item.viplimited;
  3024 +
  3025 + // var gb = 1;
  3026 + // //-- 显示多规格 --
  3027 + // for (let i in list) {
  3028 + // let item = list[i];
  3029 + // var gg = "";
  3030 + // if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  3031 + // if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  3032 +
  3033 + // if (item.goods_spec != "" && item.goods_color != "") {
  3034 + // gg = item.goods_spec + "/" + item.goods_color;
  3035 + // } else if (item.goods_spec != "" || item.goods_color != "") {
  3036 + // gg = item.goods_spec + item.goods_color;
  3037 + // } else {
  3038 + // gg = "规格" + gb;
  3039 + // gb++;
  3040 + // }
  3041 + // item.gg = gg;
  3042 + // item.prom_id = item.prom_id;
  3043 + // item.prom_type = 1;
  3044 + // }
  3045 +
  3046 + // ee.setData({
  3047 + // sku_g: list,
  3048 + // });
  3049 +
  3050 + // }
  3051 + // })
  3052 + // }
  3053 +
  3054 + }
  3055 + });
  3056 + }
  3057 + })
  3058 + }
  3059 +
  3060 + },
  3061 +
  3062 +
  3063 +
  3064 + viewFlash(e) {
  3065 + let prom_type = e.currentTarget.dataset.promtype;
  3066 + let prom_id = e.currentTarget.dataset.promid;
  3067 + let goods_id = this.data.data.goods_id;
  3068 + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;
  3069 + // console.log('url~~~~', url);
  3070 + getApp().goto(url);
  3071 + },
  3072 +
  3073 +
  3074 +
  3075 +
  3076 +
  3077 +
  3078 +
  3079 +
  3080 +
  3081 +
  3082 +
  3083 +
  3084 +
2753 3085  
2754 3086  
2755 3087  
... ...
packageA/pages/goodsInfo/goodsInfo.wxml
... ... @@ -51,6 +51,7 @@
51 51 </view>
52 52 </view>
53 53  
  54 +
54 55  
55 56 <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove" wx:else>
56 57 <view class="xc-videos-picture rel">
... ... @@ -63,6 +64,30 @@
63 64 </swiper>
64 65 </view>
65 66 </view>
  67 +
  68 +
  69 + <!-- --显示秒杀价 -->
  70 + <view class="prom_show rel" wx:if="{{options.prom_type == 1}}">
  71 + <!-- 即将开始 -->
  72 + <image class="secondkill-img" src='{{iurl+"/miniapp/images/blue_ks.png"}}' wx:if="{{prom_st==0}}"></image>
  73 + <!-- 进行中 -->
  74 + <image class="secondkill-img" src='{{iurl+"/miniapp/images/red_jx.png"}}' wx:elif="{{prom_st!=0}}"></image>
  75 + <image class="abs spike-img" src="{{iurl}}/miniapp/images/xsmiaosha.png"></image>
  76 + <view class="start fs26 abs" wx:if="{{prom_st==0}}">距活动开始还有</view>
  77 + <view class="stop fs26 abs" wx:if="{{prom_st==1 || prom_st==3}}">距活动结束还有</view>
  78 + <view class="secview flex abs fs24 xc-miaosha-time">
  79 + <block wx:if="djs.day">
  80 + <view class='day-val' style="color:{{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">{{djs.day}}</view>
  81 + <view class="day white" style="color: {{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">天</view>
  82 + </block>
  83 + <view class='time-val white t-c' style=" background:{{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">{{djs.hou}}</view>
  84 + <view class="time" style="color: {{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">时</view>
  85 + <view class='time-val white t-c' style=" background:{{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">{{djs.min}}</view>
  86 + <view class="time" style="color: {{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">分</view>
  87 + <view class='time-val white t-c' style=";background:{{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">{{djs.sec}}</view>
  88 + <view class="time" style="color: {{(prom_st==1 || prom_st==3)?'#d40022':'#0097e0'}}">秒</view>
  89 + </view>
  90 + </view>
66 91  
67 92  
68 93 <!-- <block> -->
... ... @@ -73,6 +98,9 @@
73 98 </view>
74 99  
75 100 <view>
  101 + <!-- 秒杀价 -->
  102 + <!-- <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> -->
  103 + <!-- 手店价 -->
76 104 <view class="co-red"><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view>
77 105 <view class="goods-title">
78 106 <view class="goods-name elli">{{data.goods_name}}</view>
... ... @@ -124,6 +152,41 @@
124 152 </view>
125 153  
126 154 </view>
  155 +
  156 +
  157 + <view class="bdt16" wx:if="{{actList}}">
  158 + <view class="cx-frame" style="position: relative; height: auto">
  159 + <!-- <block> -->
  160 + <view class="flex ai_c" wx:for="{{actList}}">
  161 + <view class="cx-sizs fs30 pdr40" wx:if="{{item.prom_type == 1}}">秒杀{{index+1}}</view>
  162 + <view class="f1">
  163 + <!-- <view class="fs28 f1"> -->
  164 + <!-- <view>
  165 + <text class="prom_condition">
  166 + <text class="fill-box">消费满</text>享优惠
  167 + </text>
  168 + </view> -->
  169 +
  170 + <!-- <view class="word f1 fs26"> -->
  171 + <!-- <text class="tick lh2 pdr20" wx:if="{{item.money>0}}">减价{{item.money}}元</text>
  172 + <text class="tick lh2 pdr20" wx:if="{{item.sale>0}}">打{{item.sale}}折</text>
  173 + <text class="tick lh2 pdr20" wx:if="{{item.past==1}}">包邮</text>
  174 + <text class="tick lh2 pdr20" wx:if="{{item.intValue>0}}">送{{item.intValue}}积分</text>
  175 + <view class="tick lh2 pdr20" wx:if="{{item.couponId>0}}">送{{item.couponMoney}}元优惠券</view>
  176 + <view class="tick ellipsis-1x lh2" wx:if="{{item.gift_id>0}}">送商品{{item.goods_name}}</view>
  177 + <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.lb_id>0}}" data-id="{{item.lb_id}}" bindtap="viewLbDetails">送{{item.lbtitle}}</view> -->
  178 + <view class="tick ellipsis-1x lh2 details pdr40" bindtap="viewFlash" data-promtype="{{item.prom_type}}" data-promid="{{item.act_id}}">{{item.act_name}}</view>
  179 + <!-- </view> -->
  180 + <!-- </view> -->
  181 + </view>
  182 + </view>
  183 +
  184 +
  185 + <!-- </block> -->
  186 + </view>
  187 + </view>
  188 +
  189 +
127 190  
128 191 <view class="bz_view flex bdt16" wx:if="{{store_config}}">
129 192 <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
... ... @@ -238,7 +301,7 @@
238 301 </block>
239 302 </block>
240 303  
241   - <view class="table_s" wx:if="{{service_list}}">
  304 + <!-- <view class="table_s" wx:if="{{service_list}}">
242 305 <view class="tb_item tb-l">
243 306 <view class="item_left f1">
244 307 <text>项目名称</text>
... ... @@ -261,7 +324,7 @@
261 324 <text>{{item.frequency}}</text>
262 325 </view>
263 326 </view>
264   - </view>
  327 + </view> -->
265 328  
266 329 <view class="wxParse">
267 330 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
... ... @@ -439,11 +502,63 @@
439 502 </view>
440 503 </view>
441 504  
442   -
  505 +
443 506 <view class="flex f1 btn-group">
444   - <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
445   - <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view>
  507 +
  508 + <!-- 从“秒杀”入口进入购买商品 -->
  509 + <!-- <block wx:if="{{options.prom_type == 1}}"> -->
  510 + <block wx:if="{{options.prom_type == 1}}">
  511 + <block wx:if="{{prom_st==1 && !prom_r_null}}">
  512 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
  513 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view>
  514 + </block>
  515 +
  516 + <block wx:if="{{prom_st == 0 && !prom_r_null}}">
  517 + <!-- 秒杀预热要单独购买 -->
  518 + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}">
  519 + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view>
  520 + <view class="buy-btn cart-btn lanse">即将开始</view>
  521 + </block>
  522 + <block wx:else>
  523 + <view class="buy-btn cart-btn cart-btn-lg lanse set_width f1">即将开始</view>
  524 + </block>
  525 + </block>
  526 +
  527 +
  528 + <block wx:if="{{prom_r_null}}">
  529 +
  530 + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}">
  531 + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view>
  532 + <view class="buy-btn cart-btn huise f1">已抢光</view>
  533 + </block>
  534 + <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">已抢光</view>
  535 + </block>
  536 +
  537 + <block wx:if="{{prom_st==3 && !prom_r_null}}">
  538 + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}">
  539 + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view>
  540 + <view class="buy-btn cart-btn huise f1">活动已经结束</view>
  541 + </block>
  542 +
  543 + <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">活动已经结束</view>
  544 + </block>
  545 + </block>
  546 + <!-- </block> -->
  547 +
  548 +
  549 + <!-- 从“我的服务”入口进入购买商品 -->
  550 + <block wx:else>
  551 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
  552 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view>
  553 + </block>
  554 +
  555 +
  556 +
446 557 </view>
  558 +
  559 +
  560 +
  561 +
447 562  
448 563 </view>
449 564  
... ... @@ -558,10 +673,20 @@
558 673 <block wx:else>
559 674 <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32 {{!sto_sele_name?'gray':''}}"
560 675 data-action="add">加入购物车</view>
561   - <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
562   - data-action="buy">
563   - {{sele_g.offline_price?"券后购买":"立即购买"}}
564   - </view>
  676 + <!-- 秒杀 -->
  677 + <block wx:if="{{options.prom_type == 1}}">
  678 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
  679 + data-action="buy" data-promtype="{{options.prom_type}}" data-promid="{{options.prom_id}}">
  680 + {{sele_g.offline_price?"券后购买":"立即购买"}}
  681 + </view>
  682 + </block>
  683 + <!-- 普通商品 -->
  684 + <block wx:else>
  685 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
  686 + data-action="buy">
  687 + {{sele_g.offline_price?"券后购买":"立即购买"}}
  688 + </view>
  689 + </block>
565 690 </block>
566 691 </block>
567 692 </block>
... ...
packageA/pages/goodsInfo/goodsInfo.wxss
... ... @@ -2907,3 +2907,45 @@ button.custom-service::after{
2907 2907 .del {
2908 2908 text-decoration: line-through;
2909 2909 }
  2910 +
  2911 +
  2912 +
  2913 +
  2914 +.tick {
  2915 + position: relative;
  2916 +}
  2917 +
  2918 +.tick:before {
  2919 + content: '';
  2920 + display: inline-block;
  2921 + vertical-align: middle;
  2922 + margin-top: -4rpx;
  2923 + margin-right: 12rpx;
  2924 + width: 22rpx;
  2925 + height: 22rpx;
  2926 + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat;
  2927 + background-size: 22rpx auto;
  2928 +}
  2929 +
  2930 +.details::after {
  2931 + content: '';
  2932 + position: absolute;
  2933 + right: 0;
  2934 + top: 0;
  2935 + bottom: 0;
  2936 + margin: auto;
  2937 + display: inline-block;
  2938 + width: 40rpx;
  2939 + height: 40rpx;
  2940 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=);
  2941 + background-repeat: no-repeat;
  2942 + background-size: 40rpx auto;
  2943 +}
  2944 +
  2945 +.lh2 {
  2946 + line-height: 2;
  2947 +}
  2948 +
  2949 +.huise {
  2950 + background: gray
  2951 +}
... ...
pages/index/index/index.wxml
... ... @@ -172,21 +172,23 @@
172 172 <view class="seckill-list">
173 173 <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange">
174 174 <swiper-item wx:for="{{saleGoods}}" wx:key="{{index}}" class="p_swiper" wx:key="saleGoods" style="740rpx !important;padding: 0; margin-left: 10rpx">
175   - <navigator style="flex-shrink: 0;width: 247rpx" class="nav" hover-class="none" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&title={{aitem.goods_name}}&prom_type=1&prom_id={{aitem.id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind">
176   - <view class="imgview ">
177   - <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image>
178   -
179   - <image wx:if="{{aitem.status==0}}" class="status_img" src="{{url}}/miniapp/images/miao/yure.png"></image>
180   - <image wx:if="{{aitem.status==1}}" class="status_img" src="{{url}}/miniapp/images/miao/going.png"></image>
181   - <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image>
182   - </view>
183   - <view class="ellipsis-2 mar-top10" style="height: 76rpx;">{{aitem.goods_name}}</view>
184   - <!-- <view class="red-co mar-top10 is_seckill_height"> -->
185   - <view class="co-red mar-top10">
186   - <text class="fs20">¥</text>{{aitem.price}}
187   - <text class="un_line">¥{{aitem.market_price}}</text>
188   - </view>
189   - </navigator>
  175 + <navigator style="flex-shrink: 0;width: 247rpx" class="nav" hover-class="none" url="{{aitem.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id )}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind">
  176 + <view class="imgview">
  177 + <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image>
  178 +
  179 + <image wx:if="{{aitem.status==0}}" class="status_img" src="{{url}}/miniapp/images/miao/yure.png"></image>
  180 + <image wx:if="{{aitem.status==1}}" class="status_img" src="{{url}}/miniapp/images/miao/going.png"></image>
  181 + <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image>
  182 + </view>
  183 + <view class="ellipsis-2 mar-top10" style="height: 76rpx;">{{aitem.goods_name}}</view>
  184 + <!-- <view class="red-co mar-top10 is_seckill_height"> -->
  185 + <view class="co-red mar-top10">
  186 + <text class="fs20">¥</text>{{aitem.price}}
  187 + <text class="un_line">¥{{aitem.market_price}}</text>
  188 + </view>
  189 + </navigator>
  190 +
  191 +
190 192 </swiper-item>
191 193 </swiper>
192 194 <!-- <view class="flex-center-around translation">
... ...