Commit c8fe7f0c805eae18c43720ed303ec06762c813f0

Authored by WXD-SEASON\season
2 parents 626116af e058e95f

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

... ... @@ -51,7 +51,7 @@ App({
51 51 config: null, //门店参数
52 52 config2: null, //门店配置
53 53 code: null,
54   - user_id: 5682094,//1564704,// 10153869,// 6453964,//5682094,6520044,6520119 qa 4687 6519901
  54 + user_id: null,//1564704,// 10153869,// 6453964,//5682094,6520044,6520119 qa 4687 6519901
55 55 buy_now: null,
56 56 picklist: null, //门店列表
57 57 wuliuprice: null, //物流价格表
... ...
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 +}
... ...
packageD/pages/AI-test-skin/analyse/analyse.json
1 1 {
2   - "usingComponents": {}
  2 + "usingComponents": {},
  3 + "navigationBarTitleText": "测肤报告"
3 4 }
4 5 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/analyse/analyse.wxml
1 1 <view class="content">
2   - <view style="width: 750rpx; display: flex;justify-content: center; height: autuo">
  2 + <view style="width: 750rpx; display: flex;justify-content: center; height: 310px">
3 3 <view class="img" style="background-image: url({{iurl}}/miniapp/images/skinimg/11.png);"></view>
4 4 </view>
5   - <view style="text-align: center;margin-top: -20%;">
6   - <text style="color: #fff;">正在分析...</text>
7   - <progress border-radius="6" percent="{{per}}" activeColor="#fff" backgroundColor="#85898a" class="progress"></progress>
  5 + <view style="text-align: center;">
  6 + <text style="color: #fff; font-size: 28rpx">正在分析...</text>
  7 + <progress border-radius="3" percent="{{per}}" activeColor="#fff" stroke-width="4"
  8 + backgroundColor="#85898a" class="progress"></progress>
8 9 </view>
9 10 </view>
... ...
packageD/pages/AI-test-skin/analyse/analyse.wxss
... ... @@ -29,13 +29,13 @@ page {
29 29 display: inline-block;
30 30 width: 350px;
31 31 height: 350px;
32   - transform: scale(0.5);
33   - animation: 1s mymove infinite steps(27, end);
  32 + transform: scale(0.4);
  33 + animation: 2s mymove infinite steps(27, end);
34 34 }
35 35  
36 36 .progress {
37 37 margin-top: 3%;
38   - width: 60%;
  38 + width: 48%;
39 39 /* text-align: center; */
40 40 margin-left: 50%;
41 41 transform: translateX(-50%);
... ...
packageD/pages/AI-test-skin/fail_result/fail_result.wxss
... ... @@ -25,10 +25,10 @@ page {
25 25 margin: 70rpx 0 30rpx 50%;
26 26 transform: translateX(-50%);
27 27 background: #4bd6df;
28   - padding: 20rpx;
29   - width: 50%;
  28 + padding: 15rpx 10rpx;
  29 + width: 46%;
30 30 text-align: center;
31   - border-radius: 40rpx;
  31 + border-radius: 50rpx;
32 32 color: #fff;
33 33 }
34 34 .btn_fixed {
... ...
packageD/pages/AI-test-skin/history_record/history_record.js
... ... @@ -234,6 +234,20 @@ Page({
234 234 arr.push(time_obj);
235 235 }
236 236 }
  237 + function _sort_by_history_time (property){
  238 + return function(a,b){
  239 + let val1 = a[property];
  240 + let val2 = b[property];
  241 + if(val2 > val1){
  242 + return 1
  243 + }else if(val2 < val1){
  244 + return -1
  245 + }else{
  246 + return 0
  247 + }
  248 + }
  249 + }
  250 + arr.sort(_sort_by_history_time('history_time'));
237 251 return arr;
238 252 },
239 253  
... ...
packageD/pages/AI-test-skin/index/aiskin.wxml
1 1 <view class="container1">
2   - <view class="history" wx:if="{{show_his}}">
3   - <cover-view style="padding: 0 6rpx 0 25rpx;" bindtap="goto" data-url="/packageD/pages/AI-test-skin/history_record/history_record">历史档案</cover-view>
4   - <text class="iconfont icon-arrow_right"></text>
  2 + <view class="history" wx:if="{{show_his}}" style="font-size: 30rpx">
  3 + <cover-view style="padding: 6rpx 6rpx 6rpx 25rpx;" bindtap="goto" data-url="/packageD/pages/AI-test-skin/history_record/history_record">历史档案</cover-view>
  4 + <text class="iconfont icon-arrow_right" style="font-size: 30rpx"></text>
5 5 </view>
6   - <image src="{{iurl}}/miniapp/images/skinimg/shouye.jpeg"></image>
7   - <view class="start_btn" bindtap="goto" data-url="/packageD/pages/AI-test-skin/shoot_notice/shoot_notice">
8   - <text>开始测肤</text>
  6 + <view style="position: relative;width: 100%">
  7 + <image style="width: 100%" src="{{iurl}}/miniapp/images/skinimg/shouye.jpeg" mode="widthFix"></image>
  8 + <view class="start_btn" bindtap="goto" data-url="/packageD/pages/AI-test-skin/shoot_notice/shoot_notice">
  9 + <text>开始测肤</text>
  10 + </view>
9 11 </view>
10 12 </view>
11 13 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/index/aiskin.wxss
1   -/* packageB/pages/AI-test-skin/aiskin.wxss */
2   -page {
3   - width: 100%;
4   - height: 100%;
5   -}
6   -image {
7   - width: 100vw;
8   - height: 100%;
9   -}
  1 +
10 2 .container1 {
11 3 position: relative;
12 4 width: 100%;
13   - height: 100%;
14 5 }
15 6 .history {
16 7 margin-top: 30rpx;
... ... @@ -21,18 +12,19 @@ image {
21 12 border-radius: 50rpx 0 0 50rpx;
22 13 box-shadow: 0 0 2px 2px #f7f5f5;
23 14 color: #4ad5df;
  15 + align-items: center;
  16 + z-index: 100;
24 17 }
25 18 .start_btn {
26   - position: fixed;
27   - bottom: 50rpx;
28   - /* margin: auto; */
29   - /* text-align: center; */
30 19 margin-left: 50%;
31 20 transform: translateX(-50%);
32 21 background: #4bd6df;
33   - padding: 20rpx;
  22 + padding:16rpx 20rpx;
34 23 width: 67%;
35 24 text-align: center;
36 25 border-radius: 40rpx;
37 26 color: #fff;
  27 + font-size: 30rpx;
  28 + position:absolute;
  29 + bottom: 90rpx;
38 30 }
39 31 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/select_photo/select_photo.wxml
1 1 <view class="content" style="height: 70%;">
2   - <view style="height: 100%;">
3   - <image style="height: 100%;width: 100%;border-radius: 3%;" src="{{gl_skin_img}}"></image>
  2 + <view style="height: 100%;;display:flex;align-items:center;overflow: hidden;">
  3 + <image style="height: 100%;width: 100%;border-radius: 3%;" mode="widthFix" src="{{gl_skin_img}}"></image>
4 4 </view>
5 5 <view class="foot_btn">
6 6 <view class="reset_select" bindtap="show_pai_pop">
... ...
packageD/pages/AI-test-skin/select_photo/select_photo.wxss
... ... @@ -23,9 +23,8 @@ page {
23 23  
24 24 .foot_btn .ok_btn {
25 25 background: #5dd9dc;
26   - padding: 0 50rpx;
  26 + padding: 16rpx 40rpx;
27 27 border-radius: 50rpx;
28 28 /* margin: 0 auto; */
29   - line-height: 100rpx;
30 29 color: #fff;
31 30 }
... ...
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
1 1 /*
2 2 * @Author: abson
3 3 * @Date: 2022-02-15 10:01:57
4   - * @LastEditTime: 2022-02-17 09:40:38
  4 + * @LastEditTime: 2022-02-28 15:37:20
5 5 * @LastEditors: Please set LastEditors
6 6 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEet urkl
7 7 * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\shoot_notice\shoot_notice.js
... ... @@ -19,6 +19,7 @@ Page({
19 19 */
20 20 data: {
21 21 iurl: setting.imghost,
  22 + notice_show:"",
22 23 },
23 24  
24 25 /**
... ... @@ -32,7 +33,11 @@ Page({
32 33 * 生命周期函数--监听页面显示
33 34 */
34 35 onShow: function () {
35   -
  36 + setTimeout(()=>{
  37 + this.setData({
  38 + notice_show:'none',
  39 + })
  40 + },3000).bind(this)
36 41 },
37 42  
38 43 /**
... ... @@ -64,15 +69,15 @@ Page({
64 69 },
65 70  
66 71 //从相册中选择图片
67   - show_pai_pop:function () {
  72 + show_pai_pop: function () {
68 73 //选择和拍照一张图片
69 74 wx.chooseImage({
70 75 count: 1,
71 76 sizeType: ['original', 'compressed'],
72 77 sourceType: ['album', 'camera'],
73   - success (res) {
74   - let imgArr = res.tempFilePaths;
75   - getApp().globalData.skin_img=imgArr[0];
  78 + success(res) {
  79 + let imgArr = res.tempFiles;
  80 + getApp().globalData.skin_img_info = imgArr[0];
76 81 let url = "/packageD/pages/AI-test-skin/select_photo/select_photo";
77 82 app.goto(url);
78 83 }
... ...
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml
1 1 <!--packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxml-->
2 2 <view class="content">
  3 + <view class="notice_show" style="display: {{notice_show}};">根据要求拍摄,测肤结果更准确。</view>
3 4 <view>
4 5 <view class="work">准备工作</view>
5 6 <view class="hengxian"></view>
... ...
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss
... ... @@ -6,7 +6,31 @@ page {
6 6 box-sizing: border-box;
7 7 background-color: #e7f5fb;
8 8 }
  9 +
  10 +@keyframes notice_show {
  11 + 0% {
  12 + top: -999rpx;
  13 + }
  14 +
  15 + 100% {
  16 + top: 10rpx;
  17 + }
  18 +}
  19 +
  20 +.notice_show {
  21 + text-align: center;
  22 + padding: 30rpx;
  23 + color: skyblue;
  24 + position: absolute;
  25 + right: 10%;
  26 + box-shadow: #f0f0f0 0px 0px 5px;
  27 + z-index: 999;
  28 + background: #fff;
  29 + animation: 2s notice_show linear;
  30 +}
  31 +
9 32 .content {
  33 + position: relative;
10 34 width: 100%;
11 35 /* height: 100%; */
12 36 border-radius: 25rpx;
... ... @@ -26,11 +50,12 @@ page {
26 50 align-items: center;
27 51 margin-bottom: 40rpx
28 52 }
  53 +
29 54 .content .ready1 {
30 55 display: flex;
31 56 flex-direction: column;
32 57 align-items: center;
33   - padding-bottom: 50rpx ;
  58 + padding-bottom: 50rpx;
34 59 /* margin-bottom: 40rpx */
35 60 }
36 61  
... ... @@ -65,19 +90,21 @@ page {
65 90 .content image {
66 91 height: 100%;
67 92 }
  93 +
68 94 .btn {
69   -
  95 +
70 96 /* height: 150rpx; */
71 97 /* margin-left: 50%; */
72 98 margin: 70rpx 0 30rpx 50%;
73 99 transform: translateX(-50%);
74 100 background: #4bd6df;
75   - padding: 20rpx;
  101 + padding: 15rpx 15rpx;
76 102 width: 50%;
77 103 text-align: center;
78   - border-radius: 40rpx;
  104 + border-radius: 50rpx;
79 105 color: #fff;
80 106 }
  107 +
81 108 .btn_fixed {
82 109 position: fixed;
83 110 width: 100%;
... ... @@ -85,6 +112,7 @@ page {
85 112 height: 300rpx;
86 113 background: #e7f5fb;
87 114 }
  115 +
88 116 .notice {
89 117 text-align: center;
90 118 color: red;
... ... @@ -98,36 +126,71 @@ page {
98 126 right: 0;
99 127 bottom: 0;
100 128 z-index: 11;
101   - background: rgba(0,0,0,0.4);
  129 + background: rgba(0, 0, 0, 0.4);
102 130 width: 100%;
103 131 height: 100%;
104 132 }
105 133  
106   -.flex{display: flex}
107   -.jc-center{
  134 +.flex {
  135 + display: flex
  136 +}
  137 +
  138 +.jc-center {
108 139 justify-content: center;
109 140 }
110   -.ac{align-items: center}
111   -.pai_content{
112   - position: fixed;z-index: 100;bottom: 0;background: #FFFFFF;width: 100%;
113   - border-top-left-radius:30rpx;
114   - border-top-right-radius:30rpx;
  141 +
  142 +.ac {
  143 + align-items: center
115 144 }
116   -.p_item{ height: 100rpx; line-height: 100rpx;text-align: center; border-bottom: 1rpx solid #eee}
117   -.p_cancle{height: 100rpx; line-height: 100rpx;text-align: center; border-top:20rpx solid #f8f8f8;}
118 145  
119   -@keyframes p_up
120   -{
121   - from {transform:translateY(100%);}
122   - to {transform:translateY(0);}
  146 +.pai_content {
  147 + position: fixed;
  148 + z-index: 100;
  149 + bottom: 0;
  150 + background: #FFFFFF;
  151 + width: 100%;
  152 + border-top-left-radius: 30rpx;
  153 + border-top-right-radius: 30rpx;
  154 +}
  155 +
  156 +.p_item {
  157 + height: 100rpx;
  158 + line-height: 100rpx;
  159 + text-align: center;
  160 + border-bottom: 1rpx solid #eee
  161 +}
  162 +
  163 +.p_cancle {
  164 + height: 100rpx;
  165 + line-height: 100rpx;
  166 + text-align: center;
  167 + border-top: 20rpx solid #f8f8f8;
123 168 }
124 169  
125   -@keyframes p_down
126   -{
127   - from {transform:translateY(0);}
128   - to {transform:translateY(100%);}
  170 +@keyframes p_up {
  171 + from {
  172 + transform: translateY(100%);
  173 + }
  174 +
  175 + to {
  176 + transform: translateY(0);
  177 + }
129 178 }
130   -.p_to_up{animation:p_up 1s;}
131   -.p_to_down{animation:p_down 0.5s;}
132 179  
  180 +@keyframes p_down {
  181 + from {
  182 + transform: translateY(0);
  183 + }
  184 +
  185 + to {
  186 + transform: translateY(100%);
  187 + }
  188 +}
  189 +
  190 +.p_to_up {
  191 + animation: p_up 1s;
  192 +}
133 193  
  194 +.p_to_down {
  195 + animation: p_down 0.5s;
  196 +}
134 197 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/success_result/success_result.js
1 1 /*
2 2 * @Author: abson
3 3 * @Date: 2022-02-16 15:36:47
4   - * @LastEditTime: 2022-02-25 11:30:33
  4 + * @LastEditTime: 2022-02-28 10:44:27
5 5 * @LastEditors: Please set LastEditors
6 6 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
7 7 * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js
... ... @@ -24,7 +24,7 @@ Page({
24 24 * 页面的初始数据
25 25 */
26 26 data: {
27   - tab: [{ id: 'zong_he', name: '综合肤质' }, { id: 'mao_kong', name: '毛孔' }, { id: 'hei_tou', name: '黑头' }, { id: 'se_ban', name: '色斑' }, { id: 'zhou_wen', name: '皱纹' }, { id: 'hei_yan_quan', name: '黑眼圈' }, { id: 'cuo_chuang', name: '痤疮' }, { id: 'min_gan_du', name: '敏感度' }],
  27 + // tab: [{ id: 'zong_he', name: '综合肤质' }, { id: 'mao_kong', name: '毛孔' }, { id: 'hei_tou', name: '黑头' }, { id: 'se_ban', name: '色斑' }, { id: 'zhou_wen', name: '皱纹' }, { id: 'hei_yan_quan', name: '黑眼圈' }, { id: 'cuo_chuang', name: '痤疮' }, { id: 'min_gan_du', name: '敏感度' }],
28 28 zhouwen_arr: [{ id: 1, name: '全部皱纹' }, { id: 2, name: '抬头纹' }, { id: 3, name: '川字纹' }, { id: 4, name: '眼周细纹' }, { id: 5, name: '鱼尾纹' }, { id: 6, name: '法令纹' }, { id: 7, name: '口周纹' }],
29 29 cuochuang_arr: [{ id: 1, name: '全部痤疮' }, { id: 2, name: '粉刺 ' }, { id: 3, name: '痘印 ' }, { id: 4, name: '脓包' }, { id: 5, name: '结节' }],
30 30 zhouwen_arr1: [{ id: 1, name: '皱纹/细纹',des:'是指皮肤受到外界环境影响,形成游离自由基,自由基破坏正常细胞膜组织内的胶原蛋白、活性物质,氧化细胞,或缺水而形成的小细纹,继而严重形成皱纹',sign: 'zhou1',sign1: 'zhou2' }, { id: 2, name: '抬头皱纹/抬头细纹',des:'位于额头的皱纹、细纹。形成原因因人而异,后天因素是比较少的。-般多为横纹, 竖纹较少见。' ,sign: 'zhou3',sign1:'zhou4'}, { id: 3, name: '眼部皱纹/眼部细纹',des:'眼部皱纹、细纹一般位于下眼睑部位,多见于下脸内1/3处。',sign:'zhou5',sign1:'zhou6' }, { id: 4, name: '鱼尾纹',des:'眼部皱纹的一种,是在人两侧外眼角和登角之间出现的皱纹,其纹路与鱼尾巴上的纹路很相似,故被形象地称为鱼尾纹。',sign:'zhou7',sign1:'zhou8' }, { id: 5, name: '眉间纹',des:'又叫川字纹,皱眉纹,是面部的一种正常的表情纹,随着年龄的增长,面部的皱纹会逐渐加深,双眉之间逐渐形成了较深的皱折,会使人看起来总是愁眉不展。',sign:'zhou9',sign1:'zhou10'}, { id: 6, name: '泪沟',des:'泪沟是指由内眼角开始出现在下眼睑靠鼻侧的两条凹沟,是由于眼眶隔膜下缘的软组织萎缩、下垂而生成的。',sign:'zhou11',sign1:'zhou12' }, { id: 7, name: '法令纹',des:'法令纹是位于鼻翼边延伸而下的两道纹路,是典型的皮肤组织老化、造成肌肤表面凹陷的现象。',sign:'zhou15',sign1:'zhou16' }, { id: 8, name: '口角纹',des:'口角纹又称木偶纹、括号纹,位于嘴角延伸而下的两道纹路,是表情肌、重力和遗传基因等几方面因素综合形成的。',sign:'zhou13',sign1:'zhou14' }],
... ... @@ -199,7 +199,26 @@ Page({
199 199 return e.type==3;
200 200 })
201 201 th.data.acne_num4=a_arr.length;
202   -
  202 + let tab_arr = [{ id: 'zong_he', name: '综合肤质' }];
  203 + if(pore_num) {
  204 + tab_arr.push({ id: 'mao_kong', name: '毛孔' });
  205 + }
  206 + if(blackhead_num){
  207 + tab_arr.push({ id: 'hei_tou', name: '黑头' });
  208 + }
  209 + if(speckle_num){
  210 + tab_arr.push({ id: 'se_ban', name: '色斑' });
  211 + }
  212 + if(wrinkle_num){
  213 + tab_arr.push({ id: 'zhou_wen', name: '皱纹' });
  214 + }
  215 + if(dark_type > -1) {
  216 + tab_arr.push( { id: 'hei_yan_quan', name: '黑眼圈' });
  217 + }
  218 + if(acne_num){
  219 + tab_arr.push({ id: 'cuo_chuang', name: '痤疮' });
  220 + }
  221 + tab_arr.push( { id: 'min_gan_du', name: '敏感度' });
203 222 th.setData({
204 223 acne_num: acne_num,
205 224 speckle_num: speckle_num,
... ... @@ -219,6 +238,7 @@ Page({
219 238 bili: bili,
220 239 bili_eye:bili_eye,
221 240 sex:sex,
  241 + tab:tab_arr,
222 242 skin_dryoil_check_type:skin_dryoil_check_type,
223 243 eye_top:eye_top* bili_eye,
224 244 eye_left1:eye_left1* bili_eye,
... ...
packageD/pages/AI-test-skin/success_result/success_result.wxml
... ... @@ -130,7 +130,7 @@
130 130 <!-- 局部放大的 -->
131 131 <block wx:if="{{img_scale}}">
132 132 <!-- 图片显示区 -->
133   - <view class="dialog_img" style="{{show_type == 5?'height:60%':'height:75%'}}">
  133 + <view class="dialog_img" style="{{show_type == 5?'height:60%':'height:85%'}}">
134 134 <view class="img_content rel">
135 135 <!-- 如果是黑眼圈的左眼右眼的时候 -->
136 136 <view wx:if="{{is_esys_show}}" class="face_show_view rel" style="width:{{eye_w}}px;height:{{eye_h}}px;margin-top: -{{eye_top}}px;margin-left: -{{is_esys_show==1?eye_left1:eye_left2}}px">
... ... @@ -237,7 +237,7 @@
237 237 </block> -->
238 238 </view>
239 239 <!-- 文字显示区 -->
240   - <view class="dialog_txt" style="{{show_type == 5?'height:40%':'height:25%'}}">
  240 + <view class="dialog_txt" style="{{show_type == 5?'height:40%':'height:15%'}}">
241 241 <block wx:if="{{show_type == 5}}">
242 242 <view class="heiyanquan_img flex">
243 243 <view class="img1 t-c">
... ... @@ -259,31 +259,31 @@
259 259 </block>
260 260 <view class="dialog_progress">
261 261 <view style="margin-right:7px;font-size:32rpx;">
262   - <text wx:if="{{show_type==1}}">毛孔粗大{{pore_num}}</text>
263   - <text wx:if="{{show_type==2}}">色斑{{speckle_num}}</text>
  262 + <text wx:if="{{show_type==1}}">毛孔粗大 {{pore_num}}</text>
  263 + <text wx:if="{{show_type==2}}">色斑 {{speckle_num}}</text>
264 264 <block wx:if="{{show_type==3}}">
265   - <text wx:if="{{scroll_id==1}}">全部皱纹{{wrinkle_num}}</text>
266   - <text wx:if="{{scroll_id==2}}">抬头纹{{wrinkle_num1}}</text>
267   - <text wx:if="{{scroll_id==3}}">川字纹{{wrinkle_num2}}</text>
268   - <text wx:if="{{scroll_id==4}}">眼周细纹{{wrinkle_num3}}</text>
269   - <text wx:if="{{scroll_id==5}}">鱼尾纹{{wrinkle_num4}}</text>
270   - <text wx:if="{{scroll_id==6}}">法令纹{{wrinkle_num5}}</text>
271   - <text wx:if="{{scroll_id==7}}">口周纹{{wrinkle_num6}}</text>
  265 + <text wx:if="{{scroll_id==1}}" style="position: relative;top: 25rpx;">全部皱纹 {{wrinkle_num}}</text>
  266 + <text wx:if="{{scroll_id==2}}" style="position: relative;top: 25rpx;">抬头纹 {{wrinkle_num1}}</text>
  267 + <text wx:if="{{scroll_id==3}}" style="position: relative;top: 25rpx;">川字纹 {{wrinkle_num2}}</text>
  268 + <text wx:if="{{scroll_id==4}}" style="position: relative;top: 25rpx;">眼周细纹 {{wrinkle_num3}}</text>
  269 + <text wx:if="{{scroll_id==5}}" style="position: relative;top: 25rpx;">鱼尾纹 {{wrinkle_num4}}</text>
  270 + <text wx:if="{{scroll_id==6}}" style="position: relative;top: 25rpx;">法令纹 {{wrinkle_num5}}</text>
  271 + <text wx:if="{{scroll_id==7}}" style="position: relative;top: 25rpx;">口周纹 {{wrinkle_num6}}</text>
272 272 </block>
273   - <text wx:if="{{show_type==4}}">黑头{{blackhead_num}}</text>
  273 + <text wx:if="{{show_type==4}}">黑头 {{blackhead_num}}</text>
274 274 <block wx:if="{{show_type==5}}">
275 275 <text wx:if="{{!s_dark_type}}">黑眼圈 {{s_filter.get_dark_type(dark_type)}}</text>
276 276 <text wx:if="{{s_dark_type==1}}">左眼黑眼圈 {{s_filter.get_dark_type(dark_type1)}}</text>
277 277 <text wx:if="{{s_dark_type==2}}">右眼黑眼圈 {{s_filter.get_dark_type(dark_type2)}}</text>
278 278 </block>
279 279 <block wx:if="{{show_type==6}}">
280   - <text wx:if="{{scroll_id==1}}">全部痤疮{{acne_num}}</text>
281   - <text wx:if="{{scroll_id==2}}">粉刺{{acne_num1}}</text>
282   - <text wx:if="{{scroll_id==3}}">痘印{{acne_num2}}</text>
283   - <text wx:if="{{scroll_id==4}}">脓包{{acne_num3}}</text>
284   - <text wx:if="{{scroll_id==5}}">结节{{acne_num4}}</text>
  280 + <text wx:if="{{scroll_id==1}}">全部痤疮 {{acne_num}}</text>
  281 + <text wx:if="{{scroll_id==2}}">粉刺 {{acne_num1}}</text>
  282 + <text wx:if="{{scroll_id==3}}">痘印 {{acne_num2}}</text>
  283 + <text wx:if="{{scroll_id==4}}">脓包 {{acne_num3}}</text>
  284 + <text wx:if="{{scroll_id==5}}">结节 {{acne_num4}}</text>
285 285 </block>
286   - <text wx:if="{{show_type==7}}">敏感度{{s_filter.get_nai_shou(skin_sensitive_check)}}</text>
  286 + <text wx:if="{{show_type==7}}">敏感度 {{s_filter.get_nai_shou(skin_sensitive_check)}}</text>
287 287 </view>
288 288 <view style="margin-top:10rpx;display: flex;display: none">
289 289 <view class="pp"></view>
... ... @@ -305,8 +305,6 @@
305 305 </view>
306 306 </scroll-view>
307 307 </view>
308   -
309   -
310 308 </block>
311 309  
312 310 <!-- 全图的,能够自由拖拽和放大 -->
... ... @@ -401,8 +399,8 @@
401 399 <view class="fs28 mt10" style="color: #666;">
402 400 {{item.des}}
403 401 </view>
404   - <image class="yiwen_img" src="{{iurl}}/miniapp/images/skinimg/{{item.sign}}.png"></image>
405   - <image class="yiwen_img" src="{{iurl}}/miniapp/images/skinimg/{{item.sign1}}.png"></image>
  402 + <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign}}.png"></image>
  403 + <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign1}}.png"></image>
406 404 </view>
407 405 </scroll-view>
408 406 <view style="position:fixed;bottom:0;width: 100%;">
... ... @@ -415,7 +413,7 @@
415 413 </scroll-view>
416 414 </view>
417 415 <view class="close_icon" bindtap="close_yiwen">
418   - <text class="iconfont icon-close"></text>
  416 + <text class="iconfont icon-guan"></text>
419 417 </view>
420 418 </view>
421 419 <!-- 提示 -->
... ...
packageD/pages/AI-test-skin/success_result/success_result.wxss
... ... @@ -11,6 +11,7 @@ page {
11 11 z-index: 99;
12 12 display: flex;
13 13 height: 100rpx;
  14 + background-color: #fff;
14 15 }
15 16  
16 17 .share {
... ... @@ -18,12 +19,13 @@ page {
18 19 position: fixed;
19 20 bottom: 100rpx;
20 21 right: 0;
21   - padding: 20rpx;
  22 + padding:8rpx 20rpx;
22 23 background-color: #fff;
23 24 border: 2rpx solid #f0f0f0;
24 25 /* color: #FFF; */
25 26 border-radius: 40rpx 0 0 40rpx;
26 27 z-index: 99;
  28 + align-items: center;
27 29 }
28 30  
29 31 .tab_scroll_item {
... ... @@ -463,7 +465,7 @@ page {
463 465 flex-direction: column;
464 466 justify-content: space-evenly;
465 467 background-color: #fff;
466   - min-height: 25%;
  468 + min-height: 10%;
467 469 }
468 470  
469 471 .dialog_txt .heiyanquan_img {
... ... @@ -735,7 +737,7 @@ page {
735 737 line-height: 80rpx;
736 738 text-align: center;
737 739 color: #fff;
738   - background-color: #c3172d
  740 + background-color: #45d4eb
739 741 }
740 742  
741 743 .sh_close {
... ... @@ -843,6 +845,7 @@ page {
843 845 }
844 846  
845 847 .yiwen_img {
  848 + width: 100%;
846 849 margin-top: 40rpx;
847 850 /* width: 600rpx;
848 851 height: 600rpx; */
... ... @@ -856,4 +859,10 @@ page {
856 859 top: 15px;
857 860 position: absolute;
858 861 right: 50rpx;
859   -}
860 862 \ No newline at end of file
  863 +}
  864 +
  865 +::-webkit-scrollbar {
  866 + width: 0;
  867 + height: 0;
  868 + color: transparent;
  869 +}
... ...
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">
... ...
pages/user/cardinfo/cardinfo.js
... ... @@ -727,14 +727,19 @@ Page({
727 727  
728 728 //--转到用户余额--
729 729 to_user_money:function(){
730   - this.setData({yu_e_show:1})
  730 + //提现小于0的值也不提现
  731 + if(!this.data.free.VIPRebate || parseFloat(this.data.free.VIPRebate)<=0){
  732 + getApp().my_warnning("您目前没有可提现的金额",0,th); return false;
  733 + }
  734 + this.setData({yu_e_show:1})
731 735 },
732 736 close_yu_e:function(){
733 737 this.setData({yu_e_show:0})
734 738 },
735 739 go_yu_e:function(){
736 740 var th=this,free=th.data.free;
737   - if(!th.data.free.VIPRebate){
  741 + //提现小于0的值也不提现
  742 + if(!th.data.free.VIPRebate || parseFloat(th.data.free.VIPRebate)<=0){
738 743 getApp().my_warnning("您目前没有可提现的金额",0,th); return false;
739 744 }
740 745 wx.showModal({
... ...