Showing
9 changed files
with
1436 additions
and
272 deletions
| @@ -61,6 +61,8 @@ Page({ | @@ -61,6 +61,8 @@ Page({ | ||
| 61 | openOrder: '', //点餐 | 61 | openOrder: '', //点餐 |
| 62 | isComments: '', //券和充值 | 62 | isComments: '', //券和充值 |
| 63 | markers: [], //地图标注 | 63 | markers: [], //地图标注 |
| 64 | + couponArr: [],//待领取的优惠券列表 | ||
| 65 | + couponList:[],//优惠券列表 | ||
| 64 | }, | 66 | }, |
| 65 | tablestr: '', //桌位id拼接 | 67 | tablestr: '', //桌位id拼接 |
| 66 | urlsValue: [], //包间预览图片列表 | 68 | urlsValue: [], //包间预览图片列表 |
| @@ -70,6 +72,7 @@ Page({ | @@ -70,6 +72,7 @@ Page({ | ||
| 70 | timers: null, // 动画定时器 | 72 | timers: null, // 动画定时器 |
| 71 | n: 0, | 73 | n: 0, |
| 72 | modal: '', | 74 | modal: '', |
| 75 | + couponModal: '', | ||
| 73 | /** | 76 | /** |
| 74 | * 生命周期函数--监听页面加载 | 77 | * 生命周期函数--监听页面加载 |
| 75 | */ | 78 | */ |
| @@ -97,6 +100,7 @@ Page({ | @@ -97,6 +100,7 @@ Page({ | ||
| 97 | wx.onUserCaptureScreen((res) => { | 100 | wx.onUserCaptureScreen((res) => { |
| 98 | this.modal.showModal() | 101 | this.modal.showModal() |
| 99 | }) | 102 | }) |
| 103 | + this.couponModal = this.selectComponent("#couponModal"); | ||
| 100 | }, | 104 | }, |
| 101 | //预览图片 | 105 | //预览图片 |
| 102 | previewImage(e) { | 106 | previewImage(e) { |
| @@ -114,6 +118,11 @@ Page({ | @@ -114,6 +118,11 @@ Page({ | ||
| 114 | closeModal() { | 118 | closeModal() { |
| 115 | this.modal.closeModal() | 119 | this.modal.closeModal() |
| 116 | }, | 120 | }, |
| 121 | + // 关闭优惠券弹框(更新已被领取数量) | ||
| 122 | + closeCouponModal() { | ||
| 123 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 124 | + this.couponModal.closeModal() | ||
| 125 | + }, | ||
| 117 | // 页面滚动事件 | 126 | // 页面滚动事件 |
| 118 | onPageScroll: function (event) { | 127 | onPageScroll: function (event) { |
| 119 | const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离 | 128 | const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离 |
| @@ -471,9 +480,10 @@ Page({ | @@ -471,9 +480,10 @@ Page({ | ||
| 471 | uid | 480 | uid |
| 472 | }).then((json) => { | 481 | }).then((json) => { |
| 473 | if (json.ret == 200) { | 482 | if (json.ret == 200) { |
| 474 | - console.log('经理信息staffinfo', json.data) | 483 | + console.log('客户经理获取基本信息------', json.data) |
| 475 | this.setData({ | 484 | this.setData({ |
| 476 | - staffinfo: json.data | 485 | + staffinfo: json.data, |
| 486 | + couponArr:[], | ||
| 477 | }) | 487 | }) |
| 478 | this.getSellerTemplateConfFun(sid); | 488 | this.getSellerTemplateConfFun(sid); |
| 479 | } | 489 | } |
| @@ -592,7 +602,7 @@ Page({ | @@ -592,7 +602,7 @@ Page({ | ||
| 592 | }).then(res => { | 602 | }).then(res => { |
| 593 | let data = res.data | 603 | let data = res.data |
| 594 | let couponList = [] | 604 | let couponList = [] |
| 595 | - let StyleType, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store; | 605 | + let StyleType, home, chef, marketing, coupon, coupon_data_pay, coupon_data_free, reserve, swich_phone, is_comments, signboard, store; |
| 596 | chef = util.determine(data.chef); | 606 | chef = util.determine(data.chef); |
| 597 | reserve = util.determine(data.reserve); | 607 | reserve = util.determine(data.reserve); |
| 598 | marketing = util.determine(data.marketing); | 608 | marketing = util.determine(data.marketing); |
| @@ -609,29 +619,23 @@ Page({ | @@ -609,29 +619,23 @@ Page({ | ||
| 609 | if (marketing) { | 619 | if (marketing) { |
| 610 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; | 620 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; |
| 611 | is_comments = marketing.is_comments ? marketing.is_comments : ''; | 621 | is_comments = marketing.is_comments ? marketing.is_comments : ''; |
| 612 | - coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : ''; | 622 | + coupon = (marketing.coupon_data && marketing.is_coupon == '1') ? util.determine(marketing.coupon_data) : ''; |
| 623 | + coupon_data_pay = (marketing.coupon_data_pay && marketing.is_coupon_pay == '1') ? util.determine(marketing.coupon_data_pay) : ''; | ||
| 624 | + marketing.coupon_data_payList = coupon_data_pay | ||
| 625 | + coupon_data_free = (marketing.coupon_data_free && marketing.is_coupon_free == '1') ? util.determine(marketing.coupon_data_free) : ''; | ||
| 626 | + marketing.coupon_data_freeList = coupon_data_free | ||
| 613 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; | 627 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; |
| 614 | let couponDataId = info && info.length > 0 ? info[0].id : {} | 628 | let couponDataId = info && info.length > 0 ? info[0].id : {} |
| 615 | // 根据券ID获取评价赠送的券详情 | 629 | // 根据券ID获取评价赠送的券详情 |
| 616 | if (couponDataId) this.getEvaluateFun(couponDataId) | 630 | if (couponDataId) this.getEvaluateFun(couponDataId) |
| 617 | } | 631 | } |
| 618 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 | 632 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 |
| 619 | - if (coupon && util.getType(coupon) == 'object') { | ||
| 620 | - couponList.push({ | ||
| 621 | - id: coupon.id | ||
| 622 | - }); | ||
| 623 | - } | ||
| 624 | - if (coupon && util.getType(coupon) == 'array') { | ||
| 625 | - if (coupon.length > 0) { | ||
| 626 | - coupon.forEach(item => { | ||
| 627 | - couponList.push({ | ||
| 628 | - id: item.id | ||
| 629 | - }) | ||
| 630 | - }) | ||
| 631 | - } | ||
| 632 | - } | ||
| 633 | - // 根据券ID获取券详情 | ||
| 634 | - this.getActivityByIdFun(couponList, couponList.length) | 633 | + // 获取全部的优惠券(商家券、个人券、免费券、付费券) |
| 634 | + couponList = this.addCoupons(coupon,couponList); | ||
| 635 | + couponList = this.addCoupons(coupon_data_pay,couponList); | ||
| 636 | + couponList = this.addCoupons(coupon_data_free,couponList); | ||
| 637 | + // 根据券ID获取券详情 | ||
| 638 | + this.getActivityByIdFun(couponList) | ||
| 635 | // 根据充值ID获取充值详情 | 639 | // 根据充值ID获取充值详情 |
| 636 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { | 640 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { |
| 637 | this.getRechargeDetail(marketing.recharge_data.id) | 641 | this.getRechargeDetail(marketing.recharge_data.id) |
| @@ -665,6 +669,7 @@ Page({ | @@ -665,6 +669,7 @@ Page({ | ||
| 665 | lite_style: data.lite_style, | 669 | lite_style: data.lite_style, |
| 666 | timeList, | 670 | timeList, |
| 667 | is_comments, | 671 | is_comments, |
| 672 | + couponList, | ||
| 668 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', | 673 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', |
| 669 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', | 674 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', |
| 670 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', | 675 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', |
| @@ -712,9 +717,12 @@ Page({ | @@ -712,9 +717,12 @@ Page({ | ||
| 712 | }) | 717 | }) |
| 713 | }, | 718 | }, |
| 714 | // 点击商家有礼 | 719 | // 点击商家有礼 |
| 715 | - gotoSellerGift() { | 720 | + gotoSellerGift(e){ |
| 721 | + this.couponModal.closeModal() | ||
| 722 | + const form = e.currentTarget.dataset['form']; | ||
| 716 | let url = util.http_build_query({ | 723 | let url = util.http_build_query({ |
| 717 | id: this.data.detail.id, | 724 | id: this.data.detail.id, |
| 725 | + form | ||
| 718 | }, '/pages/reserve/sellerGift') | 726 | }, '/pages/reserve/sellerGift') |
| 719 | wx.navigateTo({ | 727 | wx.navigateTo({ |
| 720 | url | 728 | url |
| @@ -861,56 +869,219 @@ Page({ | @@ -861,56 +869,219 @@ Page({ | ||
| 861 | id | 869 | id |
| 862 | }).then(res => { | 870 | }).then(res => { |
| 863 | if (res.data.length > 0) { | 871 | if (res.data.length > 0) { |
| 864 | - let couponData = res.data[0] | ||
| 865 | - couponData.use = couponData.use ? util.determine(couponData.use) : ''; | ||
| 866 | - couponData.exp_date = couponData.exp_date ? util.determine(couponData.exp_date) : ''; | ||
| 867 | - if ((couponData.use && (!couponData.use.is_cash || couponData.use.is_cash == '1'))) { | ||
| 868 | - let cash = couponData.use.cash * 1; | ||
| 869 | - let price = couponData.price * 1; | ||
| 870 | - couponData.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 872 | + let detail = res.data[0] |
| 873 | + detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | ||
| 874 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 875 | + detail.use = detail.use ? util.determine(detail.use) : ''; | ||
| 876 | + if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | ||
| 877 | + let cash = detail.use.cash * 1; | ||
| 878 | + let price = detail.price * 1; | ||
| 879 | + detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | ||
| 871 | } | 880 | } |
| 872 | - // showCoupon 代表赠送的券没过有效期 && 是开启状态 | ||
| 873 | - couponData.showCoupon = (this.data.dataStr < (couponData.etime * 1) && couponData.is_open == '1') ? '1' : '0'; | ||
| 874 | - console.log('邀请函--------------------评价赠送的优惠券', couponData); | 881 | + let num = detail.grant_num*1-detail.grant_last*1; |
| 882 | + if (num > 0) { | ||
| 883 | + detail.receiveNumText = '' | ||
| 884 | + if (num >= 0 && num <= 100) { | ||
| 885 | + detail.receiveNumText = num.toString(); | ||
| 886 | + } else if (num >= 101 && num <= 199) { | ||
| 887 | + detail.receiveNumText = '100+'; | ||
| 888 | + } else if (num >= 200 && num <= 299) { | ||
| 889 | + detail.receiveNumText = '200+'; | ||
| 890 | + } else { | ||
| 891 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 892 | + } | ||
| 893 | + } | ||
| 894 | + if (detail.exp_date && detail.exp_date.week_data) { | ||
| 895 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 896 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 897 | + if (noon) noon = '午餐:' + noon | ||
| 898 | + if (nig) nig = '晚餐:' + nig | ||
| 899 | + detail.noonText = noon; | ||
| 900 | + detail.nigText = nig; | ||
| 901 | + } | ||
| 902 | + detail.showCoupon = (this.data.dataStr < (detail.etime * 1) && detail.is_open == '1') ? '1' : '0'; | ||
| 903 | + console.log('邀请函--------------------评价赠送的优惠券', detail); | ||
| 875 | this.setData({ | 904 | this.setData({ |
| 876 | - couponData: res.data[0] | 905 | + couponData: detail |
| 877 | }) | 906 | }) |
| 878 | } | 907 | } |
| 879 | }) | 908 | }) |
| 880 | }, | 909 | }, |
| 881 | // 根据券ID获取券详情 | 910 | // 根据券ID获取券详情 |
| 882 | - getActivityByIdFun(ids, length) { | ||
| 883 | - let coupon_dataList = []; | ||
| 884 | - ids.forEach(i => { | ||
| 885 | - App.Activity.GetActivityById({ | ||
| 886 | - id: i.id | ||
| 887 | - }).then(res => { | ||
| 888 | - if (res.data.length > 0) { | ||
| 889 | - let detail = res.data[0]; | 911 | + getActivityByIdFun(obj,setcoupon) { |
| 912 | + App.Activity.GetActivityById({ | ||
| 913 | + id: obj.map(item => item.id).join(','), | ||
| 914 | + }).then(res => { | ||
| 915 | + if (res.data.length > 0) { | ||
| 916 | + let list = res.data.filter(item => { | ||
| 917 | + return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 918 | + }) | ||
| 919 | + list.forEach(detail => { | ||
| 890 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 920 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 891 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 921 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| 922 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 892 | detail.use = detail.use ? util.determine(detail.use) : ''; | 923 | detail.use = detail.use ? util.determine(detail.use) : ''; |
| 893 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | 924 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { |
| 894 | let cash = detail.use.cash * 1; | 925 | let cash = detail.use.cash * 1; |
| 895 | let price = detail.price * 1; | 926 | let price = detail.price * 1; |
| 896 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 927 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; |
| 897 | } | 928 | } |
| 898 | - detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II') | ||
| 899 | - detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II') | ||
| 900 | - coupon_dataList.push(detail); | ||
| 901 | - if (length === coupon_dataList.length) { | ||
| 902 | - coupon_dataList = coupon_dataList.filter(item => { | ||
| 903 | - return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 904 | - }) | ||
| 905 | - console.log('邀请函--------------------优惠券', coupon_dataList); | ||
| 906 | - this.setData({ | ||
| 907 | - coupon_dataList, | ||
| 908 | - }) | 929 | + let num = detail.grant_num*1-detail.grant_last*1; |
| 930 | + if (num > 0) { | ||
| 931 | + detail.receiveNumText = '' | ||
| 932 | + if (num >= 0 && num <= 100) { | ||
| 933 | + detail.receiveNumText = num.toString(); | ||
| 934 | + } else if (num >= 101 && num <= 199) { | ||
| 935 | + detail.receiveNumText = '100+'; | ||
| 936 | + } else if (num >= 200 && num <= 299) { | ||
| 937 | + detail.receiveNumText = '200+'; | ||
| 938 | + } else { | ||
| 939 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 940 | + } | ||
| 909 | } | 941 | } |
| 942 | + if (detail.exp_date && detail.exp_date.week_data) { | ||
| 943 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 944 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 945 | + if (noon) noon = '午餐:' + noon | ||
| 946 | + if (nig) nig = '晚餐:' + nig | ||
| 947 | + detail.noonText = noon; | ||
| 948 | + detail.nigText = nig; | ||
| 949 | + } | ||
| 950 | + }) | ||
| 951 | + let freeCoupons = list.filter(item => { | ||
| 952 | + return item.is_type == '3' | ||
| 953 | + }) | ||
| 954 | + // 免费券判断是否领取,弹框领取 | ||
| 955 | + if (freeCoupons.length > 0 && setcoupon!='1') { | ||
| 956 | + let length = freeCoupons.length - 1 | ||
| 957 | + freeCoupons.forEach(i => { | ||
| 958 | + this.getCoupon(i, freeCoupons[length].id, obj) | ||
| 959 | + }) | ||
| 910 | } | 960 | } |
| 911 | - }) | 961 | + console.log('邀请函--------------------优惠券', list); |
| 962 | + this.setData({ | ||
| 963 | + coupon_dataList: list, | ||
| 964 | + }) | ||
| 965 | + } | ||
| 966 | + }) | ||
| 967 | + }, | ||
| 968 | + // 获取所有的券并且展示 | ||
| 969 | + addCoupons(coupons, couponList) { | ||
| 970 | + if (coupons && util.getType(coupons) == 'object') { | ||
| 971 | + couponList.push({ | ||
| 972 | + id: coupon.id, | ||
| 973 | + number: coupon.number | ||
| 974 | + }); | ||
| 975 | + } | ||
| 976 | + if (coupons && util.getType(coupons) === 'array' && coupons.length > 0) { | ||
| 977 | + coupons.forEach(item => { | ||
| 978 | + couponList.push({ | ||
| 979 | + id: item.id, | ||
| 980 | + number: item.number | ||
| 981 | + }); | ||
| 982 | + }); | ||
| 983 | + } | ||
| 984 | + return couponList | ||
| 985 | + }, | ||
| 986 | + // 弹框领取免费券 | ||
| 987 | + setcouponFun(arr) { | ||
| 988 | + let str = arr.flatMap(item => Array(item.number).fill(item.id)).join(','); | ||
| 989 | + console.log('弹框领取免费券id', str); | ||
| 990 | + App.Activity.SetActivityAsReserve({ | ||
| 991 | + aid: str, | ||
| 992 | + rid: this.id, | ||
| 993 | + }).then((json) => { | ||
| 994 | + if (json.ret != 200) { | ||
| 995 | + wx.showToast({ | ||
| 996 | + title: res.msg, | ||
| 997 | + duration: 2000, | ||
| 998 | + mask: true | ||
| 999 | + }) | ||
| 1000 | + } | ||
| 912 | }) | 1001 | }) |
| 913 | }, | 1002 | }, |
| 1003 | + // 免费券 0未领取 1已领取 获取未领取的组成数组couponArr | ||
| 1004 | + getCoupon(item, id, obj) { | ||
| 1005 | + let couponArr = this.data.couponArr; | ||
| 1006 | + let totalPrice = this.data.totalPrice; | ||
| 1007 | + App.Activity.ActivityListByOpenid({ | ||
| 1008 | + aid: item.id, | ||
| 1009 | + sellerid:this.data.seller.sid, | ||
| 1010 | + }).then(res => { | ||
| 1011 | + if (res.ret == 200) { | ||
| 1012 | + if (res.data.length == 0) { | ||
| 1013 | + couponArr.push(item) | ||
| 1014 | + } | ||
| 1015 | + if (item.id == id && couponArr.length > 0) { | ||
| 1016 | + couponArr.forEach((item,index) => { | ||
| 1017 | + let match = obj.find(b => b.id === item.id); | ||
| 1018 | + if (match) { | ||
| 1019 | + item.number = match.number; | ||
| 1020 | + } | ||
| 1021 | + item.grant_num = item.grant_num*1 | ||
| 1022 | + if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1) | ||
| 1023 | + if(item.number>item.grant_num){ | ||
| 1024 | + item.number = item.grant_num | ||
| 1025 | + } | ||
| 1026 | + }); | ||
| 1027 | + if(couponArr.length>0){ | ||
| 1028 | + totalPrice = couponArr.reduce((sum, item) => sum + item.price * item.number, 0); | ||
| 1029 | + this.setcouponFun(couponArr) | ||
| 1030 | + this.couponModal.showModal() | ||
| 1031 | + } | ||
| 1032 | + } | ||
| 1033 | + console.log('未领取的券列表-----------', couponArr); | ||
| 1034 | + this.setData({ | ||
| 1035 | + couponArr, | ||
| 1036 | + totalPrice | ||
| 1037 | + }) | ||
| 1038 | + } | ||
| 1039 | + }) | ||
| 1040 | + }, | ||
| 1041 | + // 处理优惠券不可用日期数据 | ||
| 1042 | + hasConsecutiveSelect(arr, type) { | ||
| 1043 | + let firstTitle = null; | ||
| 1044 | + let lastTitle = null; | ||
| 1045 | + let rArr = [] | ||
| 1046 | + let num = 0 | ||
| 1047 | + for (let i = 0; i < arr.length; i++) { | ||
| 1048 | + let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig | ||
| 1049 | + if (str) { | ||
| 1050 | + rArr.push(arr[i].title) | ||
| 1051 | + num++ | ||
| 1052 | + if (num == 1) { | ||
| 1053 | + firstTitle = arr[i].title | ||
| 1054 | + } | ||
| 1055 | + if (num >= 5) { | ||
| 1056 | + lastTitle = arr[i].title | ||
| 1057 | + } | ||
| 1058 | + if (num >= 5 && i >= (arr.length - 1)) { | ||
| 1059 | + let fi = rArr.findIndex((item) => { | ||
| 1060 | + return item == firstTitle | ||
| 1061 | + }) | ||
| 1062 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1063 | + num = 0 | ||
| 1064 | + } | ||
| 1065 | + } else { | ||
| 1066 | + if (num < 5) { | ||
| 1067 | + num = 0 | ||
| 1068 | + firstTitle = null; | ||
| 1069 | + lastTitle = null; | ||
| 1070 | + } else { | ||
| 1071 | + let fi = rArr.findIndex((item) => { | ||
| 1072 | + return item == firstTitle | ||
| 1073 | + }) | ||
| 1074 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1075 | + num = 0 | ||
| 1076 | + } | ||
| 1077 | + } | ||
| 1078 | + } | ||
| 1079 | + return { | ||
| 1080 | + rArr, | ||
| 1081 | + lastTitle, | ||
| 1082 | + firstTitle | ||
| 1083 | + }; | ||
| 1084 | + }, | ||
| 914 | /** | 1085 | /** |
| 915 | * 生命周期函数--监听页面隐藏 | 1086 | * 生命周期函数--监听页面隐藏 |
| 916 | */ | 1087 | */ |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" backgroundColor="#ffeddc" place="{{true}}"></nav> | 3 | <nav hasHome class="navhome" backgroundColor="#ffeddc" place="{{true}}"></nav> |
| 4 | <scroll-view scroll-y class="viewBox"> | 4 | <scroll-view scroll-y class="viewBox"> |
| 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> | 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> |
| 6 | - <image class="giftImg" bindtap="gotoSellerGift" wx:if="{{(hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> | 6 | + <image class="giftImg" bindtap="gotoSellerGift" data-form="1" wx:if="{{(hasValueCertificate && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> |
| 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> | 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> |
| 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> | 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> |
| 9 | <view class="reservationInfo"> | 9 | <view class="reservationInfo"> |
| @@ -71,10 +71,10 @@ | @@ -71,10 +71,10 @@ | ||
| 71 | </view> | 71 | </view> |
| 72 | </view> | 72 | </view> |
| 73 | <!-- 优惠券 --> | 73 | <!-- 优惠券 --> |
| 74 | - <view class="publicModule couponBox" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 74 | + <view class="publicModule couponBoxWrap" wx:if="{{hasValueCertificate && coupon_dataList.length>0}}"> |
| 75 | <image class="titleImg5" src="https://qn.colorcun.com/invitation10Title1.png" mode="" /> | 75 | <image class="titleImg5" src="https://qn.colorcun.com/invitation10Title1.png" mode="" /> |
| 76 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 76 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 77 | - <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> | 77 | + <navigator url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 78 | <view class="preferentialItems"> | 78 | <view class="preferentialItems"> |
| 79 | <view class="purchase"> | 79 | <view class="purchase"> |
| 80 | <view class="priceText" wx:if="{{item.price}}"> | 80 | <view class="priceText" wx:if="{{item.price}}"> |
| @@ -86,7 +86,7 @@ | @@ -86,7 +86,7 @@ | ||
| 86 | <view class="certificateInfo"> | 86 | <view class="certificateInfo"> |
| 87 | <view class="preferentialDetails"> | 87 | <view class="preferentialDetails"> |
| 88 | <view class="information"> | 88 | <view class="information"> |
| 89 | - <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text> | 89 | + <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 90 | <text class="ticketName font24r">{{item.aname}}</text> | 90 | <text class="ticketName font24r">{{item.aname}}</text> |
| 91 | </view> | 91 | </view> |
| 92 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> | 92 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> |
| @@ -96,16 +96,35 @@ | @@ -96,16 +96,35 @@ | ||
| 96 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> | 96 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 97 | 会员生日当天可用 | 97 | 会员生日当天可用 |
| 98 | </view> | 98 | </view> |
| 99 | - <view wx:if="{{item.desc}}" class="limitation showDesc"> | 99 | + <view wx:if="{{item.is_type == '4' && item.desc}}" class="limitation showDesc"> |
| 100 | <text class="font24r">消费要求</text> | 100 | <text class="font24r">消费要求</text> |
| 101 | </view> | 101 | </view> |
| 102 | + <view wx:if="{{item.is_type == '3' && (item.noonText || item.nigText)}}" class="limitation showDesc"> | ||
| 103 | + <text class="font24r">不可用日期</text> | ||
| 104 | + </view> | ||
| 102 | </view> | 105 | </view> |
| 103 | - <view class="limitationBtn"> | 106 | + <view class="limitationBtn" wx:if="{{item.is_type != '3'}}"> |
| 104 | <view class="font24r couponBtn">立即抢购</view> | 107 | <view class="font24r couponBtn">立即抢购</view> |
| 105 | </view> | 108 | </view> |
| 109 | + <view class="btnBox" wx:if="{{item.is_type == '3'}}" > | ||
| 110 | + <view class="font24r orderingFood">已领取</view> | ||
| 111 | + <view class="grantNum" wx:if="{{item.receiveNumText}}"> | ||
| 112 | + <view class="font24r">已被领取</view> | ||
| 113 | + <view class="font24r"><text>{{item.receiveNumText}}</text>张</view> | ||
| 114 | + </view> | ||
| 115 | + </view> | ||
| 106 | </view> | 116 | </view> |
| 107 | </view> | 117 | </view> |
| 108 | - <view wx:if="{{item.desc}}" class="bottomLimitation limitation font24r"><text></text>{{item.desc}}</view> | 118 | + <view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottomLimitation limitation font24r"> |
| 119 | + <text></text> | ||
| 120 | + <view>消费满{{item.desc}}元可用</view> | ||
| 121 | + </view> | ||
| 122 | + <view wx:if="{{item.is_type == '3' && item.noonText}}" class="bottomLimitation limitation font24r"> | ||
| 123 | + <text></text>{{item.noonText}} | ||
| 124 | + </view> | ||
| 125 | + <view wx:if="{{item.is_type == '3' && item.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 126 | + <text></text>{{item.nigText}} | ||
| 127 | + </view> | ||
| 109 | </navigator> | 128 | </navigator> |
| 110 | </block> | 129 | </block> |
| 111 | </view> | 130 | </view> |
| @@ -135,7 +154,7 @@ | @@ -135,7 +154,7 @@ | ||
| 135 | </view> | 154 | </view> |
| 136 | </view> | 155 | </view> |
| 137 | <!-- 评价券 --> | 156 | <!-- 评价券 --> |
| 138 | - <view class="publicModule couponBox" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> | 157 | + <view class="publicModule couponBoxWrap" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> |
| 139 | <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" /> | 158 | <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" /> |
| 140 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> | 159 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> |
| 141 | <view class="couponInfo" bindtap="evaluateFun"> | 160 | <view class="couponInfo" bindtap="evaluateFun"> |
| @@ -150,7 +169,7 @@ | @@ -150,7 +169,7 @@ | ||
| 150 | <view class="certificateInfo"> | 169 | <view class="certificateInfo"> |
| 151 | <view class="preferentialDetails"> | 170 | <view class="preferentialDetails"> |
| 152 | <view class="information"> | 171 | <view class="information"> |
| 153 | - <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':''}}</text> | 172 | + <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 154 | <text class="ticketName font24r">{{couponData.aname}}</text> | 173 | <text class="ticketName font24r">{{couponData.aname}}</text> |
| 155 | </view> | 174 | </view> |
| 156 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> | 175 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> |
| @@ -160,16 +179,35 @@ | @@ -160,16 +179,35 @@ | ||
| 160 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> | 179 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 161 | 会员生日当天可用 | 180 | 会员生日当天可用 |
| 162 | </view> | 181 | </view> |
| 163 | - <view wx:if="{{couponData.desc}}" class="limitation showDesc"> | 182 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc}}" class="limitation showDesc"> |
| 164 | <text class="font24r">消费要求</text> | 183 | <text class="font24r">消费要求</text> |
| 165 | </view> | 184 | </view> |
| 185 | + <view wx:if="{{couponData.is_type == '3' && (couponData.noonText || couponData.nigText)}}" class="limitation showDesc"> | ||
| 186 | + <text class="font24r">不可用日期</text> | ||
| 187 | + </view> | ||
| 166 | </view> | 188 | </view> |
| 167 | - <view class="limitationBtn"> | ||
| 168 | - <view class="font24r couponBtn">立即领取</view> | 189 | + <view class="limitationBtn" wx:if="{{couponData.is_type != '3'}}"> |
| 190 | + <view class="font24r couponBtn">立即抢购</view> | ||
| 191 | + </view> | ||
| 192 | + <view class="btnBox" wx:if="{{couponData.is_type == '3'}}" > | ||
| 193 | + <view class="font24r orderingFood">已领取</view> | ||
| 194 | + <view class="grantNum" wx:if="{{couponData.receiveNumText}}"> | ||
| 195 | + <view class="font24r">已被领取</view> | ||
| 196 | + <view class="font24r"><text>{{couponData.receiveNumText}}</text>张</view> | ||
| 197 | + </view> | ||
| 169 | </view> | 198 | </view> |
| 170 | </view> | 199 | </view> |
| 171 | </view> | 200 | </view> |
| 172 | - <view wx:if="{{couponData.desc}}" class="bottomLimitation limitation font24r"><text></text>{{couponData.desc}}</view> | 201 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc!='0'}}" class="bottomLimitation limitation font24r"> |
| 202 | + <text></text> | ||
| 203 | + <view>消费满{{couponData.desc}}元可用</view> | ||
| 204 | + </view> | ||
| 205 | + <view wx:if="{{couponData.is_type == '3' && couponData.noonText}}" class="bottomLimitation limitation font24r"> | ||
| 206 | + <text></text>{{couponData.noonText}} | ||
| 207 | + </view> | ||
| 208 | + <view wx:if="{{couponData.is_type == '3' && couponData.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 209 | + <text></text>{{couponData.nigText}} | ||
| 210 | + </view> | ||
| 173 | </view> | 211 | </view> |
| 174 | </view> | 212 | </view> |
| 175 | <!-- 评价没有券 --> | 213 | <!-- 评价没有券 --> |
| @@ -275,4 +313,24 @@ | @@ -275,4 +313,24 @@ | ||
| 275 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> | 313 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> |
| 276 | </view> | 314 | </view> |
| 277 | </view> | 315 | </view> |
| 316 | +</my-modal> | ||
| 317 | +<my-modal id="couponModal" fadeStyle="slideUp" height="240px"> | ||
| 318 | + <view slot="modalName" class="titleModal {{(couponArr.length == '2' || couponArr.length < '2') ? 'titleModal2 ' : (couponArr.length == '4' || couponArr.length < '4') ? 'titleModal3 ' : (couponArr.length > '4') ? 'titleModal4' : '' }}"> | ||
| 319 | + <image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/> | ||
| 320 | + <view class="nameInfo">{{seller.name||reserve.seller_name}}</view> | ||
| 321 | + <view class="couponTotal">赠送给您<text>{{totalPrice}}元</text>代金券</view> | ||
| 322 | + </view> | ||
| 323 | + <view slot="modalContent"> | ||
| 324 | + <view class="couponBox"> | ||
| 325 | + <view wx:for="{{couponArr}}" class="couponItems"> | ||
| 326 | + <view class="couponNum font20r">×{{item.number}}</view> | ||
| 327 | + <view class="font36r couponPrice">¥<text>{{item.price}}</text></view> | ||
| 328 | + <view class="couponLines"></view> | ||
| 329 | + <view class="font28r couponCondition" wx:if="{{item.desc!='0'}}">消费满{{item.desc}}元可用</view> | ||
| 330 | + <view class="font28r couponCondition" wx:else>无门槛</view> | ||
| 331 | + </view> | ||
| 332 | + </view> | ||
| 333 | + <view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view> | ||
| 334 | + <view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view> | ||
| 335 | + </view> | ||
| 278 | </my-modal> | 336 | </my-modal> |
| @@ -283,15 +283,28 @@ | @@ -283,15 +283,28 @@ | ||
| 283 | padding: 0 20rpx; | 283 | padding: 0 20rpx; |
| 284 | border-radius: 22rpx; | 284 | border-radius: 22rpx; |
| 285 | text-align: center; | 285 | text-align: center; |
| 286 | - color: #000; | ||
| 287 | border-radius: 20rpx; | 286 | border-radius: 20rpx; |
| 288 | line-height: 44rpx; | 287 | line-height: 44rpx; |
| 289 | height: 44rpx; | 288 | height: 44rpx; |
| 290 | - background: #fff; | ||
| 291 | - border: 2rpx solid #fff; | ||
| 292 | width: max-content; | 289 | width: max-content; |
| 293 | margin-top: 24rpx; | 290 | margin-top: 24rpx; |
| 294 | flex-shrink: 0; | 291 | flex-shrink: 0; |
| 292 | + border: 2rpx solid #999; | ||
| 293 | + background: transparent; | ||
| 294 | + color: #999; | ||
| 295 | +} | ||
| 296 | + | ||
| 297 | +.grantNum { | ||
| 298 | + display: flex; | ||
| 299 | + flex-direction: column; | ||
| 300 | + align-items: center; | ||
| 301 | + color: #999; | ||
| 302 | + margin-top: 10rpx; | ||
| 303 | +} | ||
| 304 | + | ||
| 305 | +.grantNum text { | ||
| 306 | + color: #CC9B6A; | ||
| 307 | + margin-right: 10rpx; | ||
| 295 | } | 308 | } |
| 296 | 309 | ||
| 297 | .limitation { | 310 | .limitation { |
| @@ -370,30 +383,33 @@ | @@ -370,30 +383,33 @@ | ||
| 370 | text-align: center; | 383 | text-align: center; |
| 371 | } | 384 | } |
| 372 | 385 | ||
| 373 | -.couponBox navigator, | ||
| 374 | -.couponBox .couponInfo { | 386 | +.couponBoxWrap navigator, |
| 387 | +.couponBoxWrap .couponInfo { | ||
| 375 | width: 100%; | 388 | width: 100%; |
| 376 | margin-bottom: 20rpx; | 389 | margin-bottom: 20rpx; |
| 377 | - padding-bottom: 10rpx; | ||
| 378 | border-radius: 10rpx; | 390 | border-radius: 10rpx; |
| 379 | background: #fff; | 391 | background: #fff; |
| 380 | } | 392 | } |
| 381 | 393 | ||
| 382 | -.couponBox .preferentialItems { | 394 | +.couponBoxWrap .preferentialItems { |
| 383 | box-shadow: 0rpx 4rpx 8rpx #0000000d; | 395 | box-shadow: 0rpx 4rpx 8rpx #0000000d; |
| 384 | } | 396 | } |
| 385 | 397 | ||
| 386 | -.couponBox .showDesc { | 398 | +.couponBoxWrap .showDesc { |
| 387 | display: flex; | 399 | display: flex; |
| 388 | align-items: center; | 400 | align-items: center; |
| 389 | } | 401 | } |
| 390 | 402 | ||
| 391 | .bottomLimitation { | 403 | .bottomLimitation { |
| 392 | - padding: 20rpx; | 404 | + padding: 0 20rpx; |
| 393 | display: flex; | 405 | display: flex; |
| 394 | align-items: center; | 406 | align-items: center; |
| 395 | } | 407 | } |
| 396 | 408 | ||
| 409 | +.bottomLimitation:nth-last-of-type(1){ | ||
| 410 | + padding-bottom: 20rpx; | ||
| 411 | +} | ||
| 412 | + | ||
| 397 | .bottomLimitation text { | 413 | .bottomLimitation text { |
| 398 | display: block; | 414 | display: block; |
| 399 | width: 8rpx; | 415 | width: 8rpx; |
| @@ -403,37 +419,37 @@ | @@ -403,37 +419,37 @@ | ||
| 403 | border-radius: 50%; | 419 | border-radius: 50%; |
| 404 | } | 420 | } |
| 405 | 421 | ||
| 406 | -.couponBox .certificateInfo { | 422 | +.couponBoxWrap .certificateInfo { |
| 407 | flex-direction: row; | 423 | flex-direction: row; |
| 408 | background: #fff; | 424 | background: #fff; |
| 409 | align-items: center; | 425 | align-items: center; |
| 410 | } | 426 | } |
| 411 | 427 | ||
| 412 | -.couponBox .couponBtn { | 428 | +.couponBoxWrap .couponBtn { |
| 413 | width: 100%; | 429 | width: 100%; |
| 414 | height: fit-content; | 430 | height: fit-content; |
| 415 | background: #CC9B6A; | 431 | background: #CC9B6A; |
| 416 | color: #fff; | 432 | color: #fff; |
| 417 | } | 433 | } |
| 418 | 434 | ||
| 419 | -.couponBox .certificateInfo .preferentialDetails { | 435 | +.couponBoxWrap .certificateInfo .preferentialDetails { |
| 420 | width: 100%; | 436 | width: 100%; |
| 421 | display: flex; | 437 | display: flex; |
| 422 | flex-direction: column; | 438 | flex-direction: column; |
| 423 | } | 439 | } |
| 424 | 440 | ||
| 425 | -.couponBox .information { | 441 | +.couponBoxWrap .information { |
| 426 | display: flex; | 442 | display: flex; |
| 427 | align-items: center; | 443 | align-items: center; |
| 428 | } | 444 | } |
| 429 | 445 | ||
| 430 | -.couponBox .certificateInfo .limitation { | 446 | +.couponBoxWrap .certificateInfo .limitation { |
| 431 | margin-right: 20rpx; | 447 | margin-right: 20rpx; |
| 432 | flex: 1; | 448 | flex: 1; |
| 433 | width: auto; | 449 | width: auto; |
| 434 | } | 450 | } |
| 435 | 451 | ||
| 436 | -.couponBox .discountInfo { | 452 | +.couponBoxWrap .discountInfo { |
| 437 | font-family: PingFang SC; | 453 | font-family: PingFang SC; |
| 438 | background: #FD4D59; | 454 | background: #FD4D59; |
| 439 | position: absolute; | 455 | position: absolute; |
| @@ -449,7 +465,7 @@ | @@ -449,7 +465,7 @@ | ||
| 449 | width: max-content; | 465 | width: max-content; |
| 450 | } | 466 | } |
| 451 | 467 | ||
| 452 | -.couponBox .certificateImg { | 468 | +.couponBoxWrap .certificateImg { |
| 453 | position: absolute; | 469 | position: absolute; |
| 454 | top: 0; | 470 | top: 0; |
| 455 | left: 0; | 471 | left: 0; |
| @@ -457,7 +473,7 @@ | @@ -457,7 +473,7 @@ | ||
| 457 | height: 28rpx; | 473 | height: 28rpx; |
| 458 | } | 474 | } |
| 459 | 475 | ||
| 460 | -.couponBox .limitationBtn { | 476 | +.couponBoxWrap .limitationBtn { |
| 461 | width: 40%; | 477 | width: 40%; |
| 462 | display: flex; | 478 | display: flex; |
| 463 | flex-direction: column; | 479 | flex-direction: column; |
| @@ -769,4 +785,143 @@ | @@ -769,4 +785,143 @@ | ||
| 769 | 785 | ||
| 770 | .mymodal .mymodal-content { | 786 | .mymodal .mymodal-content { |
| 771 | height: auto !important; | 787 | height: auto !important; |
| 788 | +} | ||
| 789 | + | ||
| 790 | +#couponModal .titleModal { | ||
| 791 | + margin-top: 30%; | ||
| 792 | + position: relative; | ||
| 793 | +} | ||
| 794 | + | ||
| 795 | +#couponModal .titleModal2 { | ||
| 796 | + margin-top: 80%; | ||
| 797 | +} | ||
| 798 | + | ||
| 799 | +#couponModal .titleModal3 { | ||
| 800 | + margin-top: 60%; | ||
| 801 | +} | ||
| 802 | + | ||
| 803 | +#couponModal .titleModal4 { | ||
| 804 | + margin-top: 30%; | ||
| 805 | +} | ||
| 806 | + | ||
| 807 | +#couponModal .mymodal { | ||
| 808 | + background: rgba(0, 0, 0, 0.8); | ||
| 809 | + width: 100% !important; | ||
| 810 | + top: 0 !important; | ||
| 811 | + height: auto !important; | ||
| 812 | + z-index: 300; | ||
| 813 | +} | ||
| 814 | + | ||
| 815 | +.nameInfo { | ||
| 816 | + font-family: PingFang SC; | ||
| 817 | + font-weight: 400; | ||
| 818 | + font-size: 52rpx; | ||
| 819 | + line-height: 56rpx; | ||
| 820 | + color: #fff; | ||
| 821 | + margin-bottom: 40rpx; | ||
| 822 | + padding-top: 60rpx; | ||
| 823 | +} | ||
| 824 | + | ||
| 825 | +.couponTotal { | ||
| 826 | + color: #dfdfdf; | ||
| 827 | + font-family: PingFang SC; | ||
| 828 | + font-weight: 400; | ||
| 829 | + font-size: 40rpx; | ||
| 830 | + line-height: 48rpx; | ||
| 831 | + margin-bottom: 40rpx; | ||
| 832 | + display: flex; | ||
| 833 | + align-items: center; | ||
| 834 | + justify-content: center; | ||
| 835 | +} | ||
| 836 | + | ||
| 837 | +.couponTotal text { | ||
| 838 | + color: #ffc806; | ||
| 839 | + font-weight: 600; | ||
| 840 | + font-size: 80rpx; | ||
| 841 | + margin: 0 14rpx; | ||
| 842 | +} | ||
| 843 | + | ||
| 844 | +.couponBox { | ||
| 845 | + width: 80%; | ||
| 846 | + margin: 0 auto; | ||
| 847 | + display: flex; | ||
| 848 | + flex-wrap: wrap; | ||
| 849 | + justify-content: space-evenly; | ||
| 850 | +} | ||
| 851 | + | ||
| 852 | +.couponItems { | ||
| 853 | + width: 46%; | ||
| 854 | + margin-bottom: 24rpx; | ||
| 855 | + padding-bottom: 52rpx; | ||
| 856 | + border-radius: 20rpx; | ||
| 857 | + border: 2rpx solid #ff7e06; | ||
| 858 | + background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%); | ||
| 859 | +} | ||
| 860 | + | ||
| 861 | +.couponNum { | ||
| 862 | + background: #727272; | ||
| 863 | + border-radius: 50%; | ||
| 864 | + color: #fff; | ||
| 865 | + width: 40rpx; | ||
| 866 | + height: 40rpx; | ||
| 867 | + display: flex; | ||
| 868 | + align-items: center; | ||
| 869 | + justify-content: center; | ||
| 870 | + margin: 8rpx 0 0 8rpx; | ||
| 871 | +} | ||
| 872 | + | ||
| 873 | +.couponPrice { | ||
| 874 | + display: flex; | ||
| 875 | + align-items: center; | ||
| 876 | + justify-content: center; | ||
| 877 | + color: #F6231B; | ||
| 878 | + font-weight: 500; | ||
| 879 | +} | ||
| 880 | + | ||
| 881 | +.couponLines{ | ||
| 882 | + width: 80%; | ||
| 883 | + margin: 0 auto; | ||
| 884 | + height: 2rpx; | ||
| 885 | + border-bottom: 2rpx dashed #F6231B; | ||
| 886 | +} | ||
| 887 | + | ||
| 888 | +.couponPrice text { | ||
| 889 | + margin-left: 4rpx; | ||
| 890 | + font-size: 76rpx; | ||
| 891 | + font-weight: 700; | ||
| 892 | +} | ||
| 893 | + | ||
| 894 | +.couponCondition { | ||
| 895 | + color: #C36607; | ||
| 896 | + display: flex; | ||
| 897 | + align-items: center; | ||
| 898 | + justify-content: center; | ||
| 899 | + padding-top: 24rpx; | ||
| 900 | +} | ||
| 901 | + | ||
| 902 | +.couponBtn { | ||
| 903 | + width: 80%; | ||
| 904 | + margin: 0 auto; | ||
| 905 | + border-radius: 42rpx; | ||
| 906 | + background: linear-gradient(90.98deg, #f41919 0.25%, #ff7426 120.07%); | ||
| 907 | + font-weight: 400; | ||
| 908 | + color: #fff; | ||
| 909 | + text-align: center; | ||
| 910 | + border: 4rpx solid #fff; | ||
| 911 | + padding: 12rpx 0; | ||
| 912 | + margin: 16rpx auto 20rpx auto; | ||
| 913 | +} | ||
| 914 | + | ||
| 915 | +.couponText { | ||
| 916 | + color: #fff; | ||
| 917 | + text-decoration: underline; | ||
| 918 | + text-align: center; | ||
| 919 | +} | ||
| 920 | + | ||
| 921 | +.closeImg { | ||
| 922 | + width: 60rpx; | ||
| 923 | + height: 60rpx; | ||
| 924 | + position: absolute; | ||
| 925 | + right: 0; | ||
| 926 | + top: 0; | ||
| 772 | } | 927 | } |
| @@ -66,6 +66,8 @@ Page({ | @@ -66,6 +66,8 @@ Page({ | ||
| 66 | roomimage: [], //包间信息列表 | 66 | roomimage: [], //包间信息列表 |
| 67 | activeTitle: '1', //选择的标题 1优惠券 2充值 3评价 | 67 | activeTitle: '1', //选择的标题 1优惠券 2充值 3评价 |
| 68 | titleList: [], //优惠券、充值、评价标题数组 | 68 | titleList: [], //优惠券、充值、评价标题数组 |
| 69 | + couponArr: [],//待领取的优惠券列表 | ||
| 70 | + couponList:[],//优惠券列表 | ||
| 69 | }, | 71 | }, |
| 70 | tablestr: '', //桌位id拼接 | 72 | tablestr: '', //桌位id拼接 |
| 71 | screenHeight: '', | 73 | screenHeight: '', |
| @@ -74,6 +76,7 @@ Page({ | @@ -74,6 +76,7 @@ Page({ | ||
| 74 | timers: null, // 动画定时器 | 76 | timers: null, // 动画定时器 |
| 75 | n: 0, | 77 | n: 0, |
| 76 | modal: '', | 78 | modal: '', |
| 79 | + couponModal: '', | ||
| 77 | /** | 80 | /** |
| 78 | * 生命周期函数--监听页面加载 | 81 | * 生命周期函数--监听页面加载 |
| 79 | */ | 82 | */ |
| @@ -105,6 +108,7 @@ Page({ | @@ -105,6 +108,7 @@ Page({ | ||
| 105 | wx.onUserCaptureScreen((res) => { | 108 | wx.onUserCaptureScreen((res) => { |
| 106 | this.modal.showModal() | 109 | this.modal.showModal() |
| 107 | }) | 110 | }) |
| 111 | + this.couponModal = this.selectComponent("#couponModal"); | ||
| 108 | }, | 112 | }, |
| 109 | // 锚点定位 | 113 | // 锚点定位 |
| 110 | gotoModule(e) { | 114 | gotoModule(e) { |
| @@ -126,6 +130,11 @@ Page({ | @@ -126,6 +130,11 @@ Page({ | ||
| 126 | closeModal() { | 130 | closeModal() { |
| 127 | this.modal.closeModal() | 131 | this.modal.closeModal() |
| 128 | }, | 132 | }, |
| 133 | + // 关闭优惠券弹框(更新已被领取数量) | ||
| 134 | + closeCouponModal() { | ||
| 135 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 136 | + this.couponModal.closeModal() | ||
| 137 | + }, | ||
| 129 | // 页面滚动事件 | 138 | // 页面滚动事件 |
| 130 | onPageScroll: function (event) { | 139 | onPageScroll: function (event) { |
| 131 | if (event.scrollTop > 150) { //当页面滚动到某个位置时(这里设置为50),将导航栏背景颜色设置为白色 | 140 | if (event.scrollTop > 150) { //当页面滚动到某个位置时(这里设置为50),将导航栏背景颜色设置为白色 |
| @@ -248,9 +257,11 @@ Page({ | @@ -248,9 +257,11 @@ Page({ | ||
| 248 | sellerid, | 257 | sellerid, |
| 249 | tableids: this.tablestr | 258 | tableids: this.tablestr |
| 250 | }).then((json) => { | 259 | }).then((json) => { |
| 260 | + console.log('客户经理获取基本信息------', json.data) | ||
| 251 | if (json.ret == 200) { | 261 | if (json.ret == 200) { |
| 252 | this.setData({ | 262 | this.setData({ |
| 253 | - roomimage: json.data | 263 | + roomimage: json.data, |
| 264 | + couponArr:[], | ||
| 254 | }) | 265 | }) |
| 255 | var urlsArr = []; | 266 | var urlsArr = []; |
| 256 | json.data.forEach((v, i) => { | 267 | json.data.forEach((v, i) => { |
| @@ -601,7 +612,7 @@ Page({ | @@ -601,7 +612,7 @@ Page({ | ||
| 601 | }).then(res => { | 612 | }).then(res => { |
| 602 | let data = res.data | 613 | let data = res.data |
| 603 | let couponList = [] | 614 | let couponList = [] |
| 604 | - let StyleType, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store; | 615 | + let StyleType, home, chef, marketing, coupon, coupon_data_pay, coupon_data_free, reserve, swich_phone, is_comments, signboard, store; |
| 605 | chef = util.determine(data.chef); | 616 | chef = util.determine(data.chef); |
| 606 | reserve = util.determine(data.reserve); | 617 | reserve = util.determine(data.reserve); |
| 607 | marketing = util.determine(data.marketing); | 618 | marketing = util.determine(data.marketing); |
| @@ -618,29 +629,23 @@ Page({ | @@ -618,29 +629,23 @@ Page({ | ||
| 618 | if (marketing) { | 629 | if (marketing) { |
| 619 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; | 630 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; |
| 620 | is_comments = marketing.is_comments ? marketing.is_comments : ''; | 631 | is_comments = marketing.is_comments ? marketing.is_comments : ''; |
| 621 | - coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : ''; | 632 | + coupon = (marketing.coupon_data && marketing.is_coupon == '1') ? util.determine(marketing.coupon_data) : ''; |
| 633 | + coupon_data_pay = (marketing.coupon_data_pay && marketing.is_coupon_pay == '1') ? util.determine(marketing.coupon_data_pay) : ''; | ||
| 634 | + marketing.coupon_data_payList = coupon_data_pay | ||
| 635 | + coupon_data_free = (marketing.coupon_data_free && marketing.is_coupon_free == '1') ? util.determine(marketing.coupon_data_free) : ''; | ||
| 636 | + marketing.coupon_data_freeList = coupon_data_free | ||
| 622 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; | 637 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; |
| 623 | let couponDataId = info && info.length > 0 ? info[0].id : {} | 638 | let couponDataId = info && info.length > 0 ? info[0].id : {} |
| 624 | // 根据券ID获取评价赠送的券详情 | 639 | // 根据券ID获取评价赠送的券详情 |
| 625 | if (couponDataId) this.getEvaluateFun(couponDataId) | 640 | if (couponDataId) this.getEvaluateFun(couponDataId) |
| 626 | } | 641 | } |
| 627 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 | 642 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 |
| 628 | - if (coupon && util.getType(coupon) == 'object') { | ||
| 629 | - couponList.push({ | ||
| 630 | - id: coupon.id | ||
| 631 | - }); | ||
| 632 | - } | ||
| 633 | - if (coupon && util.getType(coupon) == 'array') { | ||
| 634 | - if (coupon.length > 0) { | ||
| 635 | - coupon.forEach(item => { | ||
| 636 | - couponList.push({ | ||
| 637 | - id: item.id | ||
| 638 | - }) | ||
| 639 | - }) | ||
| 640 | - } | ||
| 641 | - } | 643 | + // 获取全部的优惠券(商家券、个人券、免费券、付费券) |
| 644 | + couponList = this.addCoupons(coupon,couponList); | ||
| 645 | + couponList = this.addCoupons(coupon_data_pay,couponList); | ||
| 646 | + couponList = this.addCoupons(coupon_data_free,couponList); | ||
| 642 | // 根据券ID获取券详情 | 647 | // 根据券ID获取券详情 |
| 643 | - this.getActivityByIdFun(couponList, couponList.length) | 648 | + this.getActivityByIdFun(couponList) |
| 644 | // 根据充值ID获取充值详情 | 649 | // 根据充值ID获取充值详情 |
| 645 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { | 650 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { |
| 646 | this.getRechargeDetail(marketing.recharge_data.id) | 651 | this.getRechargeDetail(marketing.recharge_data.id) |
| @@ -679,6 +684,7 @@ Page({ | @@ -679,6 +684,7 @@ Page({ | ||
| 679 | lite_style: data.lite_style, | 684 | lite_style: data.lite_style, |
| 680 | timeList, | 685 | timeList, |
| 681 | is_comments, | 686 | is_comments, |
| 687 | + couponList, | ||
| 682 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', | 688 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', |
| 683 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', | 689 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', |
| 684 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', | 690 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', |
| @@ -728,9 +734,12 @@ Page({ | @@ -728,9 +734,12 @@ Page({ | ||
| 728 | }) | 734 | }) |
| 729 | }, | 735 | }, |
| 730 | // 点击商家有礼 | 736 | // 点击商家有礼 |
| 731 | - gotoSellerGift() { | 737 | + gotoSellerGift(e){ |
| 738 | + this.couponModal.closeModal() | ||
| 739 | + const form = e.currentTarget.dataset['form']; | ||
| 732 | let url = util.http_build_query({ | 740 | let url = util.http_build_query({ |
| 733 | id: this.data.detail.id, | 741 | id: this.data.detail.id, |
| 742 | + form | ||
| 734 | }, '/pages/reserve/sellerGift') | 743 | }, '/pages/reserve/sellerGift') |
| 735 | wx.navigateTo({ | 744 | wx.navigateTo({ |
| 736 | url | 745 | url |
| @@ -898,19 +907,39 @@ Page({ | @@ -898,19 +907,39 @@ Page({ | ||
| 898 | id | 907 | id |
| 899 | }).then(res => { | 908 | }).then(res => { |
| 900 | if (res.data.length > 0) { | 909 | if (res.data.length > 0) { |
| 901 | - let couponData = res.data[0] | ||
| 902 | - couponData.use = couponData.use ? util.determine(couponData.use) : ''; | ||
| 903 | - couponData.exp_date = couponData.exp_date ? util.determine(couponData.exp_date) : ''; | ||
| 904 | - if ((couponData.use && (!couponData.use.is_cash || couponData.use.is_cash == '1'))) { | ||
| 905 | - let cash = couponData.use.cash * 1; | ||
| 906 | - let price = couponData.price * 1; | ||
| 907 | - couponData.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 910 | + let detail = res.data[0] |
| 911 | + detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | ||
| 912 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 913 | + detail.use = detail.use ? util.determine(detail.use) : ''; | ||
| 914 | + if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | ||
| 915 | + let cash = detail.use.cash * 1; | ||
| 916 | + let price = detail.price * 1; | ||
| 917 | + detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | ||
| 918 | + } | ||
| 919 | + let num = detail.grant_num*1-detail.grant_last*1; | ||
| 920 | + if (num > 0) { | ||
| 921 | + detail.receiveNumText = '' | ||
| 922 | + if (num >= 0 && num <= 100) { | ||
| 923 | + detail.receiveNumText = num.toString(); | ||
| 924 | + } else if (num >= 101 && num <= 199) { | ||
| 925 | + detail.receiveNumText = '100+'; | ||
| 926 | + } else if (num >= 200 && num <= 299) { | ||
| 927 | + detail.receiveNumText = '200+'; | ||
| 928 | + } else { | ||
| 929 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 930 | + } | ||
| 908 | } | 931 | } |
| 909 | - // showCoupon 代表赠送的券没过有效期 && 是开启状态 | ||
| 910 | - couponData.showCoupon = (this.data.dataStr < (couponData.etime * 1) && couponData.is_open == '1') ? '1' : '0'; | ||
| 911 | - console.log('邀请函--------------------评价赠送的优惠券', couponData); | 932 | + if (detail.exp_date && detail.exp_date.week_data) { |
| 933 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 934 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 935 | + if (noon) noon = '午餐:' + noon | ||
| 936 | + if (nig) nig = '晚餐:' + nig | ||
| 937 | + detail.noonText = noon; | ||
| 938 | + detail.nigText = nig; | ||
| 939 | + } | ||
| 940 | + detail.showCoupon = (this.data.dataStr < (detail.etime * 1) && detail.is_open == '1') ? '1' : '0'; | ||
| 912 | let entry = this.data.titleList | 941 | let entry = this.data.titleList |
| 913 | - if ((!this.data.is_user_comments && this.data.isComments == '1' && couponData.showCoupon == '1') || (this.data.is_comments == '1' && (this.data.marketing.is_comments_coupon != '1' || couponData.showCoupon != '1'))) { | 942 | + if ((!this.data.is_user_comments && this.data.isComments == '1' && detail.showCoupon == '1') || (this.data.is_comments == '1' && (this.data.marketing.is_comments_coupon != '1' || detail.showCoupon != '1'))) { |
| 914 | entry.push({ | 943 | entry.push({ |
| 915 | id: 3, | 944 | id: 3, |
| 916 | title: '评价反馈' | 945 | title: '评价反馈' |
| @@ -919,8 +948,9 @@ Page({ | @@ -919,8 +948,9 @@ Page({ | ||
| 919 | entry.sort((a, b) => a.id - b.id); | 948 | entry.sort((a, b) => a.id - b.id); |
| 920 | } | 949 | } |
| 921 | } | 950 | } |
| 951 | + console.log('邀请函--------------------评价赠送的优惠券', detail); | ||
| 922 | this.setData({ | 952 | this.setData({ |
| 923 | - couponData: res.data[0], | 953 | + couponData: detail, |
| 924 | titleList: entry, | 954 | titleList: entry, |
| 925 | activeTitle: entry.length > 0 ? entry[0].id : '', | 955 | activeTitle: entry.length > 0 ? entry[0].id : '', |
| 926 | }) | 956 | }) |
| @@ -928,50 +958,194 @@ Page({ | @@ -928,50 +958,194 @@ Page({ | ||
| 928 | }) | 958 | }) |
| 929 | }, | 959 | }, |
| 930 | // 根据券ID获取券详情 | 960 | // 根据券ID获取券详情 |
| 931 | - getActivityByIdFun(ids, length) { | ||
| 932 | - let coupon_dataList = []; | ||
| 933 | - ids.forEach(i => { | ||
| 934 | - App.Activity.GetActivityById({ | ||
| 935 | - id: i.id | ||
| 936 | - }).then(res => { | ||
| 937 | - if (res.data.length > 0) { | ||
| 938 | - let detail = res.data[0]; | 961 | + getActivityByIdFun(obj,setcoupon) { |
| 962 | + App.Activity.GetActivityById({ | ||
| 963 | + id: obj.map(item => item.id).join(','), | ||
| 964 | + }).then(res => { | ||
| 965 | + if (res.data.length > 0) { | ||
| 966 | + let list = res.data.filter(item => { | ||
| 967 | + return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 968 | + }) | ||
| 969 | + list.forEach(detail => { | ||
| 939 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 970 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 940 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 971 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| 972 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 941 | detail.use = detail.use ? util.determine(detail.use) : ''; | 973 | detail.use = detail.use ? util.determine(detail.use) : ''; |
| 942 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | 974 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { |
| 943 | let cash = detail.use.cash * 1; | 975 | let cash = detail.use.cash * 1; |
| 944 | let price = detail.price * 1; | 976 | let price = detail.price * 1; |
| 945 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 977 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; |
| 946 | } | 978 | } |
| 979 | + let num = detail.grant_num * 1 - detail.grant_last * 1; | ||
| 980 | + if (num > 0) { | ||
| 981 | + detail.receiveNumText = '' | ||
| 982 | + if (num >= 0 && num <= 100) { | ||
| 983 | + detail.receiveNumText = num.toString(); | ||
| 984 | + } else if (num >= 101 && num <= 199) { | ||
| 985 | + detail.receiveNumText = '100+'; | ||
| 986 | + } else if (num >= 200 && num <= 299) { | ||
| 987 | + detail.receiveNumText = '200+'; | ||
| 988 | + } else { | ||
| 989 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 990 | + } | ||
| 991 | + } | ||
| 992 | + if (detail.exp_date && detail.exp_date.week_data) { | ||
| 993 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 994 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 995 | + if (noon) noon = '午餐:' + noon | ||
| 996 | + if (nig) nig = '晚餐:' + nig | ||
| 997 | + detail.noonText = noon; | ||
| 998 | + detail.nigText = nig; | ||
| 999 | + } | ||
| 947 | detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II') | 1000 | detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II') |
| 948 | detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II') | 1001 | detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II') |
| 949 | - coupon_dataList.push(detail); | ||
| 950 | - if (length === coupon_dataList.length) { | ||
| 951 | - coupon_dataList = coupon_dataList.filter(item => { | ||
| 952 | - return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 953 | - }) | ||
| 954 | - let entry = this.data.titleList | ||
| 955 | - if (this.data.hasValueCertificate && this.data.marketing.is_coupon == '1' && coupon_dataList.length > 0) { | ||
| 956 | - entry.push({ | ||
| 957 | - id: 1, | ||
| 958 | - title: '专属优惠券' | ||
| 959 | - }) | ||
| 960 | - if (entry.length > 0) { | ||
| 961 | - entry.sort((a, b) => a.id - b.id); | ||
| 962 | - } | 1002 | + }) |
| 1003 | + let freeCoupons = list.filter(item => { | ||
| 1004 | + return item.is_type == '3' | ||
| 1005 | + }) | ||
| 1006 | + let entry = this.data.titleList | ||
| 1007 | + if (this.data.hasValueCertificate && list.length > 0 && setcoupon != '1') { | ||
| 1008 | + entry.push({ | ||
| 1009 | + id: 1, | ||
| 1010 | + title: '专属优惠券' | ||
| 1011 | + }) | ||
| 1012 | + if (entry.length > 0) { | ||
| 1013 | + entry.sort((a, b) => a.id - b.id); | ||
| 1014 | + } | ||
| 1015 | + } | ||
| 1016 | + // 免费券判断是否领取,弹框领取 | ||
| 1017 | + if (freeCoupons.length > 0 && setcoupon != '1') { | ||
| 1018 | + let length = freeCoupons.length - 1 | ||
| 1019 | + freeCoupons.forEach(i => { | ||
| 1020 | + this.getCoupon(i, freeCoupons[length].id, obj) | ||
| 1021 | + }) | ||
| 1022 | + } | ||
| 1023 | + console.log('邀请函--------------------优惠券', list); | ||
| 1024 | + this.setData({ | ||
| 1025 | + coupon_dataList: list, | ||
| 1026 | + titleList: entry, | ||
| 1027 | + activeTitle: entry.length > 0 ? entry[0].id : '', | ||
| 1028 | + }) | ||
| 1029 | + } | ||
| 1030 | + }) | ||
| 1031 | + }, | ||
| 1032 | + // 获取所有的券并且展示 | ||
| 1033 | + addCoupons(coupons, couponList) { | ||
| 1034 | + if (coupons && util.getType(coupons) == 'object') { | ||
| 1035 | + couponList.push({ | ||
| 1036 | + id: coupon.id, | ||
| 1037 | + number: coupon.number | ||
| 1038 | + }); | ||
| 1039 | + } | ||
| 1040 | + if (coupons && util.getType(coupons) === 'array' && coupons.length > 0) { | ||
| 1041 | + coupons.forEach(item => { | ||
| 1042 | + couponList.push({ | ||
| 1043 | + id: item.id, | ||
| 1044 | + number: item.number | ||
| 1045 | + }); | ||
| 1046 | + }); | ||
| 1047 | + } | ||
| 1048 | + return couponList | ||
| 1049 | + }, | ||
| 1050 | + // 弹框领取免费券 | ||
| 1051 | + setcouponFun(arr) { | ||
| 1052 | + let str = arr.flatMap(item => Array(item.number).fill(item.id)).join(','); | ||
| 1053 | + console.log('弹框领取免费券id', str); | ||
| 1054 | + App.Activity.SetActivityAsReserve({ | ||
| 1055 | + aid: str, | ||
| 1056 | + rid: this.id, | ||
| 1057 | + }).then((json) => { | ||
| 1058 | + if (json.ret != 200) { | ||
| 1059 | + wx.showToast({ | ||
| 1060 | + title: res.msg, | ||
| 1061 | + duration: 2000, | ||
| 1062 | + mask: true | ||
| 1063 | + }) | ||
| 1064 | + } | ||
| 1065 | + }) | ||
| 1066 | + }, | ||
| 1067 | + // 免费券 0未领取 1已领取 获取未领取的组成数组couponArr | ||
| 1068 | + getCoupon(item, id, obj) { | ||
| 1069 | + let couponArr = this.data.couponArr; | ||
| 1070 | + let totalPrice = this.data.totalPrice; | ||
| 1071 | + App.Activity.ActivityListByOpenid({ | ||
| 1072 | + aid: item.id, | ||
| 1073 | + sellerid:this.data.seller.sid, | ||
| 1074 | + }).then(res => { | ||
| 1075 | + if (res.ret == 200) { | ||
| 1076 | + if (res.data.length == 0) { | ||
| 1077 | + couponArr.push(item) | ||
| 1078 | + } | ||
| 1079 | + if (item.id == id && couponArr.length > 0) { | ||
| 1080 | + couponArr.forEach((item,index) => { | ||
| 1081 | + let match = obj.find(b => b.id === item.id); | ||
| 1082 | + if (match) { | ||
| 1083 | + item.number = match.number; | ||
| 963 | } | 1084 | } |
| 964 | - console.log('邀请函--------------------优惠券', coupon_dataList); | ||
| 965 | - this.setData({ | ||
| 966 | - coupon_dataList, | ||
| 967 | - titleList: entry, | ||
| 968 | - activeTitle: entry.length > 0 ? entry[0].id : '', | ||
| 969 | - }) | 1085 | + item.grant_num = item.grant_num*1 |
| 1086 | + if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1) | ||
| 1087 | + if(item.number>item.grant_num){ | ||
| 1088 | + item.number = item.grant_num | ||
| 1089 | + } | ||
| 1090 | + }); | ||
| 1091 | + if(couponArr.length>0){ | ||
| 1092 | + totalPrice = couponArr.reduce((sum, item) => sum + item.price * item.number, 0); | ||
| 1093 | + this.setcouponFun(couponArr) | ||
| 1094 | + this.couponModal.showModal() | ||
| 970 | } | 1095 | } |
| 971 | } | 1096 | } |
| 972 | - }) | 1097 | + console.log('未领取的券列表-----------', couponArr); |
| 1098 | + this.setData({ | ||
| 1099 | + couponArr, | ||
| 1100 | + totalPrice | ||
| 1101 | + }) | ||
| 1102 | + } | ||
| 973 | }) | 1103 | }) |
| 974 | }, | 1104 | }, |
| 1105 | + // 处理优惠券不可用日期数据 | ||
| 1106 | + hasConsecutiveSelect(arr, type) { | ||
| 1107 | + let firstTitle = null; | ||
| 1108 | + let lastTitle = null; | ||
| 1109 | + let rArr = [] | ||
| 1110 | + let num = 0 | ||
| 1111 | + for (let i = 0; i < arr.length; i++) { | ||
| 1112 | + let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig | ||
| 1113 | + if (str) { | ||
| 1114 | + rArr.push(arr[i].title) | ||
| 1115 | + num++ | ||
| 1116 | + if (num == 1) { | ||
| 1117 | + firstTitle = arr[i].title | ||
| 1118 | + } | ||
| 1119 | + if (num >= 5) { | ||
| 1120 | + lastTitle = arr[i].title | ||
| 1121 | + } | ||
| 1122 | + if (num >= 5 && i >= (arr.length - 1)) { | ||
| 1123 | + let fi = rArr.findIndex((item) => { | ||
| 1124 | + return item == firstTitle | ||
| 1125 | + }) | ||
| 1126 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1127 | + num = 0 | ||
| 1128 | + } | ||
| 1129 | + } else { | ||
| 1130 | + if (num < 5) { | ||
| 1131 | + num = 0 | ||
| 1132 | + firstTitle = null; | ||
| 1133 | + lastTitle = null; | ||
| 1134 | + } else { | ||
| 1135 | + let fi = rArr.findIndex((item) => { | ||
| 1136 | + return item == firstTitle | ||
| 1137 | + }) | ||
| 1138 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1139 | + num = 0 | ||
| 1140 | + } | ||
| 1141 | + } | ||
| 1142 | + } | ||
| 1143 | + return { | ||
| 1144 | + rArr, | ||
| 1145 | + lastTitle, | ||
| 1146 | + firstTitle | ||
| 1147 | + }; | ||
| 1148 | + }, | ||
| 975 | /** | 1149 | /** |
| 976 | * 生命周期函数--监听页面隐藏 | 1150 | * 生命周期函数--监听页面隐藏 |
| 977 | */ | 1151 | */ |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" backgroundColor="{{show_white ? colors : 'transparent'}}" place="{{false}}"></nav> | 3 | <nav hasHome class="navhome" backgroundColor="{{show_white ? colors : 'transparent'}}" place="{{false}}"></nav> |
| 4 | <scroll-view scroll-y class="viewBox viewBox{{bookType}}"> | 4 | <scroll-view scroll-y class="viewBox viewBox{{bookType}}"> |
| 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> | 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> |
| 6 | - <image class="giftImg" bindtap="gotoSellerGift" wx:if="{{(hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> | 6 | + <image class="giftImg" bindtap="gotoSellerGift" data-form="1" wx:if="{{(hasValueCertificate && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> |
| 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> | 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> |
| 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> | 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> |
| 9 | <view class="reservationInfoBox"> | 9 | <view class="reservationInfoBox"> |
| @@ -109,9 +109,9 @@ | @@ -109,9 +109,9 @@ | ||
| 109 | <view wx:for="{{titleList}}" wx:key="index" wx:for-index="index" bindtap="checkTitleFun" data-type="{{item.id}}" class="titleItem {{activeTitle==item.id?'activeTitleItem':''}}">{{item.title}}</view> | 109 | <view wx:for="{{titleList}}" wx:key="index" wx:for-index="index" bindtap="checkTitleFun" data-type="{{item.id}}" class="titleItem {{activeTitle==item.id?'activeTitleItem':''}}">{{item.title}}</view> |
| 110 | </view> | 110 | </view> |
| 111 | <!-- 优惠券 --> | 111 | <!-- 优惠券 --> |
| 112 | - <view class="regionItem couponBox" wx:if="{{activeTitle == '1'}}"> | 112 | + <view class="regionItem couponBoxWrap" wx:if="{{activeTitle == '1'}}"> |
| 113 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 113 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 114 | - <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> | 114 | + <navigator url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 115 | <view class="preferentialItems"> | 115 | <view class="preferentialItems"> |
| 116 | <view class="purchase"> | 116 | <view class="purchase"> |
| 117 | <view class="priceText" wx:if="{{item.price}}"> | 117 | <view class="priceText" wx:if="{{item.price}}"> |
| @@ -123,7 +123,7 @@ | @@ -123,7 +123,7 @@ | ||
| 123 | <view class="certificateInfo"> | 123 | <view class="certificateInfo"> |
| 124 | <view class="preferentialDetails"> | 124 | <view class="preferentialDetails"> |
| 125 | <view class="information"> | 125 | <view class="information"> |
| 126 | - <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text> | 126 | + <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 127 | <text class="ticketName font24r">{{item.aname}}</text> | 127 | <text class="ticketName font24r">{{item.aname}}</text> |
| 128 | </view> | 128 | </view> |
| 129 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> | 129 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> |
| @@ -133,16 +133,35 @@ | @@ -133,16 +133,35 @@ | ||
| 133 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> | 133 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 134 | 会员生日当天可用 | 134 | 会员生日当天可用 |
| 135 | </view> | 135 | </view> |
| 136 | - <view wx:if="{{item.desc}}" class="showDesc"> | 136 | + <view wx:if="{{item.is_type == '4' && item.desc}}" class="limitation showDesc"> |
| 137 | <text class="font24r">消费要求</text> | 137 | <text class="font24r">消费要求</text> |
| 138 | </view> | 138 | </view> |
| 139 | + <view wx:if="{{item.is_type == '3' && (item.noonText || item.nigText)}}" class="limitation showDesc"> | ||
| 140 | + <text class="font24r">不可用日期</text> | ||
| 141 | + </view> | ||
| 139 | </view> | 142 | </view> |
| 140 | - <view class="limitationBtn"> | 143 | + <view class="limitationBtn" wx:if="{{item.is_type != '3'}}"> |
| 141 | <view class="font24r couponBtn">立即抢购</view> | 144 | <view class="font24r couponBtn">立即抢购</view> |
| 142 | </view> | 145 | </view> |
| 146 | + <view class="btnBox" wx:if="{{item.is_type == '3'}}" > | ||
| 147 | + <view class="font24r orderingFood">已领取</view> | ||
| 148 | + <view class="grantNum" wx:if="{{item.receiveNumText}}"> | ||
| 149 | + <view class="font24r">已被领取</view> | ||
| 150 | + <view class="font24r"><text>{{item.receiveNumText}}</text>张</view> | ||
| 151 | + </view> | ||
| 152 | + </view> | ||
| 143 | </view> | 153 | </view> |
| 144 | </view> | 154 | </view> |
| 145 | - <view wx:if="{{item.desc}}" class="bottomLimitation font24r"><text></text>{{item.desc}}</view> | 155 | + <view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottomLimitation limitation font24r bottomLimitationTop"> |
| 156 | + <text></text> | ||
| 157 | + <view>消费满{{item.desc}}元可用</view> | ||
| 158 | + </view> | ||
| 159 | + <view wx:if="{{item.is_type == '3' && item.noonText}}" class="bottomLimitation limitation font24r bottomLimitationTop"> | ||
| 160 | + <text></text>{{item.noonText}} | ||
| 161 | + </view> | ||
| 162 | + <view wx:if="{{item.is_type == '3' && item.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 163 | + <text></text>{{item.nigText}} | ||
| 164 | + </view> | ||
| 146 | </navigator> | 165 | </navigator> |
| 147 | </block> | 166 | </block> |
| 148 | </view> | 167 | </view> |
| @@ -179,7 +198,7 @@ | @@ -179,7 +198,7 @@ | ||
| 179 | </view> | 198 | </view> |
| 180 | </view> | 199 | </view> |
| 181 | <!-- 评价券 --> | 200 | <!-- 评价券 --> |
| 182 | - <view class="regionItem certificateBox couponBox" wx:if="{{activeTitle == '3' && !is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> | 201 | + <view class="regionItem certificateBox couponBoxWrap" wx:if="{{activeTitle == '3' && !is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> |
| 183 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> | 202 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> |
| 184 | <view class="couponInfo" bindtap="evaluateFun"> | 203 | <view class="couponInfo" bindtap="evaluateFun"> |
| 185 | <view class="preferentialItems"> | 204 | <view class="preferentialItems"> |
| @@ -193,7 +212,7 @@ | @@ -193,7 +212,7 @@ | ||
| 193 | <view class="certificateInfo"> | 212 | <view class="certificateInfo"> |
| 194 | <view class="preferentialDetails"> | 213 | <view class="preferentialDetails"> |
| 195 | <view class="information"> | 214 | <view class="information"> |
| 196 | - <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':''}}</text> | 215 | + <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 197 | <text class="ticketName font24r">{{couponData.aname}}</text> | 216 | <text class="ticketName font24r">{{couponData.aname}}</text> |
| 198 | </view> | 217 | </view> |
| 199 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> | 218 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> |
| @@ -203,16 +222,35 @@ | @@ -203,16 +222,35 @@ | ||
| 203 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> | 222 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 204 | 会员生日当天可用 | 223 | 会员生日当天可用 |
| 205 | </view> | 224 | </view> |
| 206 | - <view wx:if="{{couponData.desc}}" class="showDesc"> | 225 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc}}" class="limitation showDesc"> |
| 207 | <text class="font24r">消费要求</text> | 226 | <text class="font24r">消费要求</text> |
| 208 | </view> | 227 | </view> |
| 228 | + <view wx:if="{{couponData.is_type == '3' && (couponData.noonText || couponData.nigText)}}" class="limitation showDesc"> | ||
| 229 | + <text class="font24r">不可用日期</text> | ||
| 230 | + </view> | ||
| 209 | </view> | 231 | </view> |
| 210 | - <view class="limitationBtn"> | ||
| 211 | - <view class="font24r couponBtn">立即领取</view> | 232 | + <view class="limitationBtn" wx:if="{{couponData.is_type != '3'}}"> |
| 233 | + <view class="font24r couponBtn">立即抢购</view> | ||
| 234 | + </view> | ||
| 235 | + <view class="btnBox" wx:if="{{couponData.is_type == '3'}}" > | ||
| 236 | + <view class="font24r orderingFood">已领取</view> | ||
| 237 | + <view class="grantNum" wx:if="{{couponData.receiveNumText}}"> | ||
| 238 | + <view class="font24r">已被领取</view> | ||
| 239 | + <view class="font24r"><text>{{couponData.receiveNumText}}</text>张</view> | ||
| 240 | + </view> | ||
| 212 | </view> | 241 | </view> |
| 213 | </view> | 242 | </view> |
| 214 | </view> | 243 | </view> |
| 215 | - <view wx:if="{{couponData.desc}}" class="bottomLimitation font24r"><text></text>{{couponData.desc}}</view> | 244 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc!='0'}}" class="bottomLimitation limitation font24r bottomLimitationTop"> |
| 245 | + <text></text> | ||
| 246 | + <view>消费满{{couponData.desc}}元可用</view> | ||
| 247 | + </view> | ||
| 248 | + <view wx:if="{{couponData.is_type == '3' && couponData.noonText}}" class="bottomLimitation limitation font24r bottomLimitationTop"> | ||
| 249 | + <text></text>{{couponData.noonText}} | ||
| 250 | + </view> | ||
| 251 | + <view wx:if="{{couponData.is_type == '3' && couponData.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 252 | + <text></text>{{couponData.nigText}} | ||
| 253 | + </view> | ||
| 216 | </view> | 254 | </view> |
| 217 | </view> | 255 | </view> |
| 218 | <view class="regionItem evaluateCoupon" wx:if="{{activeTitle == '3' && is_comments=='1' && (marketing.is_comments_coupon!='1' || couponData.showCoupon!='1')}}"> | 256 | <view class="regionItem evaluateCoupon" wx:if="{{activeTitle == '3' && is_comments=='1' && (marketing.is_comments_coupon!='1' || couponData.showCoupon!='1')}}"> |
| @@ -436,4 +474,24 @@ | @@ -436,4 +474,24 @@ | ||
| 436 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> | 474 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> |
| 437 | </view> | 475 | </view> |
| 438 | </view> | 476 | </view> |
| 477 | +</my-modal> | ||
| 478 | +<my-modal id="couponModal" fadeStyle="slideUp" height="240px"> | ||
| 479 | + <view slot="modalName" class="titleModal {{(couponArr.length == '2' || couponArr.length < '2') ? 'titleModal2 ' : (couponArr.length == '4' || couponArr.length < '4') ? 'titleModal3 ' : (couponArr.length > '4') ? 'titleModal4' : '' }}"> | ||
| 480 | + <image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/> | ||
| 481 | + <view class="nameInfo">{{seller.name||reserve.seller_name}}</view> | ||
| 482 | + <view class="couponTotal">赠送给您<text>{{totalPrice}}元</text>代金券</view> | ||
| 483 | + </view> | ||
| 484 | + <view slot="modalContent"> | ||
| 485 | + <view class="couponBox"> | ||
| 486 | + <view wx:for="{{couponArr}}" class="couponItems"> | ||
| 487 | + <view class="couponNum font20r">×{{item.number}}</view> | ||
| 488 | + <view class="font36r couponPrice">¥<text>{{item.price}}</text></view> | ||
| 489 | + <view class="couponLines"></view> | ||
| 490 | + <view class="font28r couponCondition" wx:if="{{item.desc!='0'}}">消费满{{item.desc}}元可用</view> | ||
| 491 | + <view class="font28r couponCondition" wx:else>无门槛</view> | ||
| 492 | + </view> | ||
| 493 | + </view> | ||
| 494 | + <view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view> | ||
| 495 | + <view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view> | ||
| 496 | + </view> | ||
| 439 | </my-modal> | 497 | </my-modal> |
| @@ -368,15 +368,28 @@ | @@ -368,15 +368,28 @@ | ||
| 368 | padding: 0 20rpx; | 368 | padding: 0 20rpx; |
| 369 | border-radius: 22rpx; | 369 | border-radius: 22rpx; |
| 370 | text-align: center; | 370 | text-align: center; |
| 371 | - color: #000; | ||
| 372 | border-radius: 20rpx; | 371 | border-radius: 20rpx; |
| 373 | line-height: 44rpx; | 372 | line-height: 44rpx; |
| 374 | height: 44rpx; | 373 | height: 44rpx; |
| 375 | - background: #fff; | ||
| 376 | - border: 2rpx solid #fff; | ||
| 377 | width: max-content; | 374 | width: max-content; |
| 378 | margin-top: 24rpx; | 375 | margin-top: 24rpx; |
| 379 | flex-shrink: 0; | 376 | flex-shrink: 0; |
| 377 | + border: 2rpx solid #999; | ||
| 378 | + background: transparent; | ||
| 379 | + color: #999; | ||
| 380 | +} | ||
| 381 | + | ||
| 382 | +.grantNum { | ||
| 383 | + display: flex; | ||
| 384 | + flex-direction: column; | ||
| 385 | + align-items: center; | ||
| 386 | + color: #999; | ||
| 387 | + margin-top: 10rpx; | ||
| 388 | +} | ||
| 389 | + | ||
| 390 | +.grantNum text { | ||
| 391 | + color: #CC9B6A; | ||
| 392 | + margin-right: 10rpx; | ||
| 380 | } | 393 | } |
| 381 | 394 | ||
| 382 | .limitation { | 395 | .limitation { |
| @@ -466,28 +479,30 @@ | @@ -466,28 +479,30 @@ | ||
| 466 | text-align: center; | 479 | text-align: center; |
| 467 | } | 480 | } |
| 468 | 481 | ||
| 469 | -.couponBox navigator, | ||
| 470 | -.couponBox .couponInfo { | 482 | +.couponBoxWrap navigator, |
| 483 | +.couponBoxWrap .couponInfo { | ||
| 471 | width: 100%; | 484 | width: 100%; |
| 472 | margin-bottom: 20rpx; | 485 | margin-bottom: 20rpx; |
| 473 | - padding-bottom: 10rpx; | ||
| 474 | border-radius: 10rpx; | 486 | border-radius: 10rpx; |
| 475 | background: #fff; | 487 | background: #fff; |
| 476 | } | 488 | } |
| 477 | 489 | ||
| 478 | -.couponBox .preferentialItems { | 490 | +.bottomLimitationTop{ |
| 491 | + margin-top: 20rpx !important; | ||
| 492 | +} | ||
| 493 | + | ||
| 494 | +.couponBoxWrap .preferentialItems { | ||
| 479 | box-shadow: 0rpx 4rpx 8rpx #0000000d; | 495 | box-shadow: 0rpx 4rpx 8rpx #0000000d; |
| 480 | } | 496 | } |
| 481 | 497 | ||
| 482 | -.couponBox .showDesc { | ||
| 483 | - display: flex; | ||
| 484 | - align-items: center; | 498 | +.couponBoxWrap .showDesc { |
| 485 | color: #666; | 499 | color: #666; |
| 486 | } | 500 | } |
| 487 | 501 | ||
| 488 | -.couponBox .bottomLimitation { | ||
| 489 | - padding: 20rpx; | 502 | +.couponBoxWrap .bottomLimitation { |
| 503 | + padding: 0 20rpx; | ||
| 490 | display: flex; | 504 | display: flex; |
| 505 | + flex-direction: row !important; | ||
| 491 | align-items: center; | 506 | align-items: center; |
| 492 | margin-top: 10rpx; | 507 | margin-top: 10rpx; |
| 493 | color: #666; | 508 | color: #666; |
| @@ -495,7 +510,11 @@ | @@ -495,7 +510,11 @@ | ||
| 495 | font-weight: 500; | 510 | font-weight: 500; |
| 496 | } | 511 | } |
| 497 | 512 | ||
| 498 | -.couponBox .bottomLimitation text { | 513 | +.bottomLimitation:nth-last-of-type(1){ |
| 514 | + padding-bottom: 20rpx; | ||
| 515 | +} | ||
| 516 | + | ||
| 517 | +.couponBoxWrap .bottomLimitation text { | ||
| 499 | display: block; | 518 | display: block; |
| 500 | width: 8rpx; | 519 | width: 8rpx; |
| 501 | height: 8rpx; | 520 | height: 8rpx; |
| @@ -504,36 +523,36 @@ | @@ -504,36 +523,36 @@ | ||
| 504 | border-radius: 50%; | 523 | border-radius: 50%; |
| 505 | } | 524 | } |
| 506 | 525 | ||
| 507 | -.couponBox .certificateInfo { | 526 | +.couponBoxWrap .certificateInfo { |
| 508 | flex-direction: row; | 527 | flex-direction: row; |
| 509 | align-items: center; | 528 | align-items: center; |
| 510 | } | 529 | } |
| 511 | 530 | ||
| 512 | -.couponBox .couponBtn { | 531 | +.couponBoxWrap .couponBtn { |
| 513 | width: 100%; | 532 | width: 100%; |
| 514 | height: fit-content; | 533 | height: fit-content; |
| 515 | background: #AE2D2D; | 534 | background: #AE2D2D; |
| 516 | color: #fff; | 535 | color: #fff; |
| 517 | } | 536 | } |
| 518 | 537 | ||
| 519 | -.couponBox .certificateInfo .preferentialDetails { | 538 | +.couponBoxWrap .certificateInfo .preferentialDetails { |
| 520 | width: 100%; | 539 | width: 100%; |
| 521 | display: flex; | 540 | display: flex; |
| 522 | flex-direction: column; | 541 | flex-direction: column; |
| 523 | } | 542 | } |
| 524 | 543 | ||
| 525 | -.couponBox .information { | 544 | +.couponBoxWrap .information { |
| 526 | display: flex; | 545 | display: flex; |
| 527 | align-items: center; | 546 | align-items: center; |
| 528 | } | 547 | } |
| 529 | 548 | ||
| 530 | -.couponBox .certificateInfo .limitation { | 549 | +.couponBoxWrap .certificateInfo .limitation { |
| 531 | margin-right: 20rpx; | 550 | margin-right: 20rpx; |
| 532 | flex: 1; | 551 | flex: 1; |
| 533 | width: auto; | 552 | width: auto; |
| 534 | } | 553 | } |
| 535 | 554 | ||
| 536 | -.couponBox .discountInfo { | 555 | +.couponBoxWrap .discountInfo { |
| 537 | font-family: PingFang SC; | 556 | font-family: PingFang SC; |
| 538 | background: #FD4D59; | 557 | background: #FD4D59; |
| 539 | position: absolute; | 558 | position: absolute; |
| @@ -549,7 +568,7 @@ | @@ -549,7 +568,7 @@ | ||
| 549 | width: max-content; | 568 | width: max-content; |
| 550 | } | 569 | } |
| 551 | 570 | ||
| 552 | -.couponBox .certificateImg { | 571 | +.couponBoxWrap .certificateImg { |
| 553 | position: absolute; | 572 | position: absolute; |
| 554 | top: 0; | 573 | top: 0; |
| 555 | left: 0; | 574 | left: 0; |
| @@ -557,7 +576,7 @@ | @@ -557,7 +576,7 @@ | ||
| 557 | height: 28rpx; | 576 | height: 28rpx; |
| 558 | } | 577 | } |
| 559 | 578 | ||
| 560 | -.couponBox .limitationBtn { | 579 | +.couponBoxWrap .limitationBtn { |
| 561 | width: 40%; | 580 | width: 40%; |
| 562 | display: flex; | 581 | display: flex; |
| 563 | flex-direction: column; | 582 | flex-direction: column; |
| @@ -871,6 +890,145 @@ | @@ -871,6 +890,145 @@ | ||
| 871 | background: #811a1f; | 890 | background: #811a1f; |
| 872 | } | 891 | } |
| 873 | 892 | ||
| 893 | +#couponModal .titleModal { | ||
| 894 | + margin-top: 30%; | ||
| 895 | + position: relative; | ||
| 896 | +} | ||
| 897 | + | ||
| 898 | +#couponModal .titleModal2 { | ||
| 899 | + margin-top: 80%; | ||
| 900 | +} | ||
| 901 | + | ||
| 902 | +#couponModal .titleModal3 { | ||
| 903 | + margin-top: 60%; | ||
| 904 | +} | ||
| 905 | + | ||
| 906 | +#couponModal .titleModal4 { | ||
| 907 | + margin-top: 30%; | ||
| 908 | +} | ||
| 909 | + | ||
| 910 | +#couponModal .mymodal { | ||
| 911 | + background: rgba(0, 0, 0, 0.8); | ||
| 912 | + width: 100% !important; | ||
| 913 | + top: 0 !important; | ||
| 914 | + height: auto !important; | ||
| 915 | + z-index: 300; | ||
| 916 | +} | ||
| 917 | + | ||
| 918 | +.nameInfo { | ||
| 919 | + font-family: PingFang SC; | ||
| 920 | + font-weight: 400; | ||
| 921 | + font-size: 52rpx; | ||
| 922 | + line-height: 56rpx; | ||
| 923 | + color: #fff; | ||
| 924 | + margin-bottom: 40rpx; | ||
| 925 | + padding-top: 60rpx; | ||
| 926 | +} | ||
| 927 | + | ||
| 928 | +.couponTotal { | ||
| 929 | + color: #dfdfdf; | ||
| 930 | + font-family: PingFang SC; | ||
| 931 | + font-weight: 400; | ||
| 932 | + font-size: 40rpx; | ||
| 933 | + line-height: 48rpx; | ||
| 934 | + margin-bottom: 40rpx; | ||
| 935 | + display: flex; | ||
| 936 | + align-items: center; | ||
| 937 | + justify-content: center; | ||
| 938 | +} | ||
| 939 | + | ||
| 940 | +.couponTotal text { | ||
| 941 | + color: #ffc806; | ||
| 942 | + font-weight: 600; | ||
| 943 | + font-size: 80rpx; | ||
| 944 | + margin: 0 14rpx; | ||
| 945 | +} | ||
| 946 | + | ||
| 947 | +.couponBox { | ||
| 948 | + width: 80%; | ||
| 949 | + margin: 0 auto; | ||
| 950 | + display: flex; | ||
| 951 | + flex-wrap: wrap; | ||
| 952 | + justify-content: space-evenly; | ||
| 953 | +} | ||
| 954 | + | ||
| 955 | +.couponItems { | ||
| 956 | + width: 46%; | ||
| 957 | + margin-bottom: 24rpx; | ||
| 958 | + padding-bottom: 52rpx; | ||
| 959 | + border-radius: 20rpx; | ||
| 960 | + border: 2rpx solid #ff7e06; | ||
| 961 | + background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%); | ||
| 962 | +} | ||
| 963 | + | ||
| 964 | +.couponNum { | ||
| 965 | + background: #727272; | ||
| 966 | + border-radius: 50%; | ||
| 967 | + color: #fff; | ||
| 968 | + width: 40rpx; | ||
| 969 | + height: 40rpx; | ||
| 970 | + display: flex; | ||
| 971 | + align-items: center; | ||
| 972 | + justify-content: center; | ||
| 973 | + margin: 8rpx 0 0 8rpx; | ||
| 974 | +} | ||
| 975 | + | ||
| 976 | +.couponPrice { | ||
| 977 | + display: flex; | ||
| 978 | + align-items: center; | ||
| 979 | + justify-content: center; | ||
| 980 | + color: #F6231B; | ||
| 981 | + font-weight: 500; | ||
| 982 | +} | ||
| 983 | + | ||
| 984 | +.couponLines{ | ||
| 985 | + width: 80%; | ||
| 986 | + margin: 0 auto; | ||
| 987 | + height: 2rpx; | ||
| 988 | + border-bottom: 2rpx dashed #F6231B; | ||
| 989 | +} | ||
| 990 | + | ||
| 991 | +.couponPrice text { | ||
| 992 | + margin-left: 4rpx; | ||
| 993 | + font-size: 76rpx; | ||
| 994 | + font-weight: 700; | ||
| 995 | +} | ||
| 996 | + | ||
| 997 | +.couponCondition { | ||
| 998 | + color: #C36607; | ||
| 999 | + display: flex; | ||
| 1000 | + align-items: center; | ||
| 1001 | + justify-content: center; | ||
| 1002 | + padding-top: 24rpx; | ||
| 1003 | +} | ||
| 1004 | + | ||
| 1005 | +.couponBtn { | ||
| 1006 | + width: 80%; | ||
| 1007 | + margin: 0 auto; | ||
| 1008 | + border-radius: 42rpx; | ||
| 1009 | + background: linear-gradient(90.98deg, #f41919 0.25%, #ff7426 120.07%); | ||
| 1010 | + font-weight: 400; | ||
| 1011 | + color: #fff; | ||
| 1012 | + text-align: center; | ||
| 1013 | + border: 4rpx solid #fff; | ||
| 1014 | + padding: 12rpx 0; | ||
| 1015 | + margin: 16rpx auto 20rpx auto; | ||
| 1016 | +} | ||
| 1017 | + | ||
| 1018 | +.couponText { | ||
| 1019 | + color: #fff; | ||
| 1020 | + text-decoration: underline; | ||
| 1021 | + text-align: center; | ||
| 1022 | +} | ||
| 1023 | + | ||
| 1024 | +.closeImg { | ||
| 1025 | + width: 60rpx; | ||
| 1026 | + height: 60rpx; | ||
| 1027 | + position: absolute; | ||
| 1028 | + right: 0; | ||
| 1029 | + top: 0; | ||
| 1030 | +} | ||
| 1031 | + | ||
| 874 | /* 商务宴会 */ | 1032 | /* 商务宴会 */ |
| 875 | .viewBox2 { | 1033 | .viewBox2 { |
| 876 | background: #fff; | 1034 | background: #fff; |
| @@ -68,6 +68,8 @@ Page({ | @@ -68,6 +68,8 @@ Page({ | ||
| 68 | titleList: [], //优惠券、充值、评价标题数组 | 68 | titleList: [], //优惠券、充值、评价标题数组 |
| 69 | modalType: '', //弹框 | 69 | modalType: '', //弹框 |
| 70 | modalTitle: '', //弹框标题 | 70 | modalTitle: '', //弹框标题 |
| 71 | + couponArr: [],//待领取的优惠券列表 | ||
| 72 | + couponList:[],//优惠券列表 | ||
| 71 | }, | 73 | }, |
| 72 | tablestr: '', //桌位id拼接 | 74 | tablestr: '', //桌位id拼接 |
| 73 | screenHeight: '', | 75 | screenHeight: '', |
| @@ -77,6 +79,7 @@ Page({ | @@ -77,6 +79,7 @@ Page({ | ||
| 77 | n: 0, | 79 | n: 0, |
| 78 | modal: '', | 80 | modal: '', |
| 79 | publicModal: '', | 81 | publicModal: '', |
| 82 | + couponModal: '', | ||
| 80 | /** | 83 | /** |
| 81 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 82 | */ | 85 | */ |
| @@ -109,6 +112,7 @@ Page({ | @@ -109,6 +112,7 @@ Page({ | ||
| 109 | wx.onUserCaptureScreen((res) => { | 112 | wx.onUserCaptureScreen((res) => { |
| 110 | this.modal.showModal() | 113 | this.modal.showModal() |
| 111 | }) | 114 | }) |
| 115 | + this.couponModal = this.selectComponent("#couponModal"); | ||
| 112 | }, | 116 | }, |
| 113 | //预览图片 | 117 | //预览图片 |
| 114 | previewImage(e) { | 118 | previewImage(e) { |
| @@ -126,6 +130,11 @@ Page({ | @@ -126,6 +130,11 @@ Page({ | ||
| 126 | closeModal() { | 130 | closeModal() { |
| 127 | this.modal.closeModal() | 131 | this.modal.closeModal() |
| 128 | }, | 132 | }, |
| 133 | + // 关闭优惠券弹框(更新已被领取数量) | ||
| 134 | + closeCouponModal() { | ||
| 135 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 136 | + this.couponModal.closeModal() | ||
| 137 | + }, | ||
| 129 | // 公共弹框 | 138 | // 公共弹框 |
| 130 | publicShowModal(e) { | 139 | publicShowModal(e) { |
| 131 | const modalType = e.currentTarget.dataset['type']; | 140 | const modalType = e.currentTarget.dataset['type']; |
| @@ -262,9 +271,11 @@ Page({ | @@ -262,9 +271,11 @@ Page({ | ||
| 262 | sellerid, | 271 | sellerid, |
| 263 | tableids: this.tablestr | 272 | tableids: this.tablestr |
| 264 | }).then((json) => { | 273 | }).then((json) => { |
| 274 | + console.log('客户经理获取基本信息------', json.data) | ||
| 265 | if (json.ret == 200) { | 275 | if (json.ret == 200) { |
| 266 | this.setData({ | 276 | this.setData({ |
| 267 | - roomimage: json.data | 277 | + roomimage: json.data, |
| 278 | + couponArr:[], | ||
| 268 | }) | 279 | }) |
| 269 | var urlsArr = []; | 280 | var urlsArr = []; |
| 270 | json.data.forEach((v, i) => { | 281 | json.data.forEach((v, i) => { |
| @@ -616,7 +627,7 @@ Page({ | @@ -616,7 +627,7 @@ Page({ | ||
| 616 | }).then(res => { | 627 | }).then(res => { |
| 617 | let data = res.data | 628 | let data = res.data |
| 618 | let couponList = [] | 629 | let couponList = [] |
| 619 | - let StyleType, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store; | 630 | + let StyleType, home, chef, marketing, coupon, coupon_data_pay, coupon_data_free, reserve, swich_phone, is_comments, signboard, store; |
| 620 | chef = util.determine(data.chef); | 631 | chef = util.determine(data.chef); |
| 621 | reserve = util.determine(data.reserve); | 632 | reserve = util.determine(data.reserve); |
| 622 | marketing = util.determine(data.marketing); | 633 | marketing = util.determine(data.marketing); |
| @@ -633,29 +644,23 @@ Page({ | @@ -633,29 +644,23 @@ Page({ | ||
| 633 | if (marketing) { | 644 | if (marketing) { |
| 634 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; | 645 | marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo != '0')) ? marketing.logo : ''; |
| 635 | is_comments = marketing.is_comments ? marketing.is_comments : ''; | 646 | is_comments = marketing.is_comments ? marketing.is_comments : ''; |
| 636 | - coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : ''; | 647 | + coupon = (marketing.coupon_data && marketing.is_coupon == '1') ? util.determine(marketing.coupon_data) : ''; |
| 648 | + coupon_data_pay = (marketing.coupon_data_pay && marketing.is_coupon_pay == '1') ? util.determine(marketing.coupon_data_pay) : ''; | ||
| 649 | + marketing.coupon_data_payList = coupon_data_pay | ||
| 650 | + coupon_data_free = (marketing.coupon_data_free && marketing.is_coupon_free == '1') ? util.determine(marketing.coupon_data_free) : ''; | ||
| 651 | + marketing.coupon_data_freeList = coupon_data_free | ||
| 637 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; | 652 | let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : ''; |
| 638 | let couponDataId = info && info.length > 0 ? info[0].id : {} | 653 | let couponDataId = info && info.length > 0 ? info[0].id : {} |
| 639 | // 根据券ID获取评价赠送的券详情 | 654 | // 根据券ID获取评价赠送的券详情 |
| 640 | if (couponDataId) this.getEvaluateFun(couponDataId) | 655 | if (couponDataId) this.getEvaluateFun(couponDataId) |
| 641 | } | 656 | } |
| 642 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 | 657 | // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 |
| 643 | - if (coupon && util.getType(coupon) == 'object') { | ||
| 644 | - couponList.push({ | ||
| 645 | - id: coupon.id | ||
| 646 | - }); | ||
| 647 | - } | ||
| 648 | - if (coupon && util.getType(coupon) == 'array') { | ||
| 649 | - if (coupon.length > 0) { | ||
| 650 | - coupon.forEach(item => { | ||
| 651 | - couponList.push({ | ||
| 652 | - id: item.id | ||
| 653 | - }) | ||
| 654 | - }) | ||
| 655 | - } | ||
| 656 | - } | ||
| 657 | - // 根据券ID获取券详情 | ||
| 658 | - this.getActivityByIdFun(couponList, couponList.length) | 658 | + // 获取全部的优惠券(商家券、个人券、免费券、付费券) |
| 659 | + couponList = this.addCoupons(coupon,couponList); | ||
| 660 | + couponList = this.addCoupons(coupon_data_pay,couponList); | ||
| 661 | + couponList = this.addCoupons(coupon_data_free,couponList); | ||
| 662 | + // 根据券ID获取券详情 | ||
| 663 | + this.getActivityByIdFun(couponList) | ||
| 659 | // 根据充值ID获取充值详情 | 664 | // 根据充值ID获取充值详情 |
| 660 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { | 665 | if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) { |
| 661 | this.getRechargeDetail(marketing.recharge_data.id) | 666 | this.getRechargeDetail(marketing.recharge_data.id) |
| @@ -694,6 +699,7 @@ Page({ | @@ -694,6 +699,7 @@ Page({ | ||
| 694 | lite_style: data.lite_style, | 699 | lite_style: data.lite_style, |
| 695 | timeList, | 700 | timeList, |
| 696 | is_comments, | 701 | is_comments, |
| 702 | + couponList, | ||
| 697 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', | 703 | isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', |
| 698 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', | 704 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', |
| 699 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', | 705 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', |
| @@ -743,9 +749,12 @@ Page({ | @@ -743,9 +749,12 @@ Page({ | ||
| 743 | }) | 749 | }) |
| 744 | }, | 750 | }, |
| 745 | // 点击商家有礼 | 751 | // 点击商家有礼 |
| 746 | - gotoSellerGift() { | 752 | + gotoSellerGift(e){ |
| 753 | + this.couponModal.closeModal() | ||
| 754 | + const form = e.currentTarget.dataset['form']; | ||
| 747 | let url = util.http_build_query({ | 755 | let url = util.http_build_query({ |
| 748 | id: this.data.detail.id, | 756 | id: this.data.detail.id, |
| 757 | + form | ||
| 749 | }, '/pages/reserve/sellerGift') | 758 | }, '/pages/reserve/sellerGift') |
| 750 | wx.navigateTo({ | 759 | wx.navigateTo({ |
| 751 | url | 760 | url |
| @@ -913,29 +922,50 @@ Page({ | @@ -913,29 +922,50 @@ Page({ | ||
| 913 | id | 922 | id |
| 914 | }).then(res => { | 923 | }).then(res => { |
| 915 | if (res.data.length > 0) { | 924 | if (res.data.length > 0) { |
| 916 | - let couponData = res.data[0] | ||
| 917 | - couponData.use = couponData.use ? util.determine(couponData.use) : ''; | ||
| 918 | - couponData.exp_date = couponData.exp_date ? util.determine(couponData.exp_date) : ''; | ||
| 919 | - if ((couponData.use && (!couponData.use.is_cash || couponData.use.is_cash == '1'))) { | ||
| 920 | - let cash = couponData.use.cash * 1; | ||
| 921 | - let price = couponData.price * 1; | ||
| 922 | - couponData.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 925 | + let detail = res.data[0] |
| 926 | + detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | ||
| 927 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 928 | + detail.use = detail.use ? util.determine(detail.use) : ''; | ||
| 929 | + if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | ||
| 930 | + let cash = detail.use.cash * 1; | ||
| 931 | + let price = detail.price * 1; | ||
| 932 | + detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | ||
| 933 | + } | ||
| 934 | + let num = detail.grant_num*1-detail.grant_last*1; | ||
| 935 | + if (num > 0) { | ||
| 936 | + detail.receiveNumText = '' | ||
| 937 | + if (num >= 0 && num <= 100) { | ||
| 938 | + detail.receiveNumText = num.toString(); | ||
| 939 | + } else if (num >= 101 && num <= 199) { | ||
| 940 | + detail.receiveNumText = '100+'; | ||
| 941 | + } else if (num >= 200 && num <= 299) { | ||
| 942 | + detail.receiveNumText = '200+'; | ||
| 943 | + } else { | ||
| 944 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 945 | + } | ||
| 923 | } | 946 | } |
| 924 | - // showCoupon 代表赠送的券没过有效期 && 是开启状态 | ||
| 925 | - couponData.showCoupon = (this.data.dataStr < (couponData.etime * 1) && couponData.is_open == '1') ? '1' : '0'; | ||
| 926 | - console.log('邀请函--------------------评价赠送的优惠券', couponData); | 947 | + if (detail.exp_date && detail.exp_date.week_data) { |
| 948 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 949 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 950 | + if (noon) noon = '午餐:' + noon | ||
| 951 | + if (nig) nig = '晚餐:' + nig | ||
| 952 | + detail.noonText = noon; | ||
| 953 | + detail.nigText = nig; | ||
| 954 | + } | ||
| 955 | + detail.showCoupon = (this.data.dataStr < (detail.etime * 1) && detail.is_open == '1') ? '1' : '0'; | ||
| 927 | let entry = this.data.titleList | 956 | let entry = this.data.titleList |
| 928 | - if (!this.data.is_user_comments && this.data.isComments == '1' && couponData.showCoupon == '1') { | 957 | + if ((!this.data.is_user_comments && this.data.isComments == '1' && detail.showCoupon == '1') || (this.data.is_comments == '1' && (this.data.marketing.is_comments_coupon != '1' || detail.showCoupon != '1'))) { |
| 929 | entry.push({ | 958 | entry.push({ |
| 930 | id: 3, | 959 | id: 3, |
| 931 | - title: '意见反馈有礼' | 960 | + title: '评价反馈' |
| 932 | }) | 961 | }) |
| 933 | if (entry.length > 0) { | 962 | if (entry.length > 0) { |
| 934 | entry.sort((a, b) => a.id - b.id); | 963 | entry.sort((a, b) => a.id - b.id); |
| 935 | } | 964 | } |
| 936 | } | 965 | } |
| 966 | + console.log('邀请函--------------------评价赠送的优惠券', detail); | ||
| 937 | this.setData({ | 967 | this.setData({ |
| 938 | - couponData: res.data[0], | 968 | + couponData: detail, |
| 939 | titleList: entry, | 969 | titleList: entry, |
| 940 | activeTitle: entry.length > 0 ? entry[0].id : '', | 970 | activeTitle: entry.length > 0 ? entry[0].id : '', |
| 941 | }) | 971 | }) |
| @@ -943,50 +973,194 @@ Page({ | @@ -943,50 +973,194 @@ Page({ | ||
| 943 | }) | 973 | }) |
| 944 | }, | 974 | }, |
| 945 | // 根据券ID获取券详情 | 975 | // 根据券ID获取券详情 |
| 946 | - getActivityByIdFun(ids, length) { | ||
| 947 | - let coupon_dataList = []; | ||
| 948 | - ids.forEach(i => { | ||
| 949 | - App.Activity.GetActivityById({ | ||
| 950 | - id: i.id | ||
| 951 | - }).then(res => { | ||
| 952 | - if (res.data.length > 0) { | ||
| 953 | - let detail = res.data[0]; | 976 | + getActivityByIdFun(obj,setcoupon) { |
| 977 | + App.Activity.GetActivityById({ | ||
| 978 | + id: obj.map(item => item.id).join(','), | ||
| 979 | + }).then(res => { | ||
| 980 | + if (res.data.length > 0) { | ||
| 981 | + let list = res.data.filter(item => { | ||
| 982 | + return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 983 | + }) | ||
| 984 | + list.forEach(detail => { | ||
| 954 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 985 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 955 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 986 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| 987 | + detail.arule = detail.arule ? util.determine(detail.arule) : ''; | ||
| 956 | detail.use = detail.use ? util.determine(detail.use) : ''; | 988 | detail.use = detail.use ? util.determine(detail.use) : ''; |
| 957 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { | 989 | if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) { |
| 958 | let cash = detail.use.cash * 1; | 990 | let cash = detail.use.cash * 1; |
| 959 | let price = detail.price * 1; | 991 | let price = detail.price * 1; |
| 960 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; | 992 | detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : ''; |
| 961 | } | 993 | } |
| 994 | + let num = detail.grant_num * 1 - detail.grant_last * 1; | ||
| 995 | + if (num > 0) { | ||
| 996 | + detail.receiveNumText = '' | ||
| 997 | + if (num >= 0 && num <= 100) { | ||
| 998 | + detail.receiveNumText = num.toString(); | ||
| 999 | + } else if (num >= 101 && num <= 199) { | ||
| 1000 | + detail.receiveNumText = '100+'; | ||
| 1001 | + } else if (num >= 200 && num <= 299) { | ||
| 1002 | + detail.receiveNumText = '200+'; | ||
| 1003 | + } else { | ||
| 1004 | + detail.receiveNumText = Math.floor(num / 100) * 100 + '+'; | ||
| 1005 | + } | ||
| 1006 | + } | ||
| 1007 | + if (detail.exp_date && detail.exp_date.week_data) { | ||
| 1008 | + let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、') | ||
| 1009 | + let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、') | ||
| 1010 | + if (noon) noon = '午餐:' + noon | ||
| 1011 | + if (nig) nig = '晚餐:' + nig | ||
| 1012 | + detail.noonText = noon; | ||
| 1013 | + detail.nigText = nig; | ||
| 1014 | + } | ||
| 962 | detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II') | 1015 | detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II') |
| 963 | detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II') | 1016 | detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II') |
| 964 | - coupon_dataList.push(detail); | ||
| 965 | - if (length === coupon_dataList.length) { | ||
| 966 | - coupon_dataList = coupon_dataList.filter(item => { | ||
| 967 | - return this.data.dataStr < (item.etime * 1) && item.is_open == '1' | ||
| 968 | - }) | ||
| 969 | - let entry = this.data.titleList | ||
| 970 | - if (this.data.hasValueCertificate && this.data.marketing.is_coupon == '1' && coupon_dataList.length > 0) { | ||
| 971 | - entry.push({ | ||
| 972 | - id: 1, | ||
| 973 | - title: '专属优惠券' | ||
| 974 | - }) | ||
| 975 | - if (entry.length > 0) { | ||
| 976 | - entry.sort((a, b) => a.id - b.id); | ||
| 977 | - } | 1017 | + }) |
| 1018 | + let freeCoupons = list.filter(item => { | ||
| 1019 | + return item.is_type == '3' | ||
| 1020 | + }) | ||
| 1021 | + let entry = this.data.titleList | ||
| 1022 | + if (this.data.hasValueCertificate && list.length > 0 && setcoupon != '1') { | ||
| 1023 | + entry.push({ | ||
| 1024 | + id: 1, | ||
| 1025 | + title: '专属优惠券' | ||
| 1026 | + }) | ||
| 1027 | + if (entry.length > 0) { | ||
| 1028 | + entry.sort((a, b) => a.id - b.id); | ||
| 1029 | + } | ||
| 1030 | + } | ||
| 1031 | + // 免费券判断是否领取,弹框领取 | ||
| 1032 | + if (freeCoupons.length > 0 && setcoupon != '1') { | ||
| 1033 | + let length = freeCoupons.length - 1 | ||
| 1034 | + freeCoupons.forEach(i => { | ||
| 1035 | + this.getCoupon(i, freeCoupons[length].id, obj) | ||
| 1036 | + }) | ||
| 1037 | + } | ||
| 1038 | + console.log('邀请函--------------------优惠券', list); | ||
| 1039 | + this.setData({ | ||
| 1040 | + coupon_dataList: list, | ||
| 1041 | + titleList: entry, | ||
| 1042 | + activeTitle: entry.length > 0 ? entry[0].id : '', | ||
| 1043 | + }) | ||
| 1044 | + } | ||
| 1045 | + }) | ||
| 1046 | + }, | ||
| 1047 | + // 获取所有的券并且展示 | ||
| 1048 | + addCoupons(coupons, couponList) { | ||
| 1049 | + if (coupons && util.getType(coupons) == 'object') { | ||
| 1050 | + couponList.push({ | ||
| 1051 | + id: coupon.id, | ||
| 1052 | + number: coupon.number | ||
| 1053 | + }); | ||
| 1054 | + } | ||
| 1055 | + if (coupons && util.getType(coupons) === 'array' && coupons.length > 0) { | ||
| 1056 | + coupons.forEach(item => { | ||
| 1057 | + couponList.push({ | ||
| 1058 | + id: item.id, | ||
| 1059 | + number: item.number | ||
| 1060 | + }); | ||
| 1061 | + }); | ||
| 1062 | + } | ||
| 1063 | + return couponList | ||
| 1064 | + }, | ||
| 1065 | + // 弹框领取免费券 | ||
| 1066 | + setcouponFun(arr) { | ||
| 1067 | + let str = arr.flatMap(item => Array(item.number).fill(item.id)).join(','); | ||
| 1068 | + console.log('弹框领取免费券id', str); | ||
| 1069 | + App.Activity.SetActivityAsReserve({ | ||
| 1070 | + aid: str, | ||
| 1071 | + rid: this.id, | ||
| 1072 | + }).then((json) => { | ||
| 1073 | + if (json.ret != 200) { | ||
| 1074 | + wx.showToast({ | ||
| 1075 | + title: res.msg, | ||
| 1076 | + duration: 2000, | ||
| 1077 | + mask: true | ||
| 1078 | + }) | ||
| 1079 | + } | ||
| 1080 | + }) | ||
| 1081 | + }, | ||
| 1082 | + // 免费券 0未领取 1已领取 获取未领取的组成数组couponArr | ||
| 1083 | + getCoupon(item, id, obj) { | ||
| 1084 | + let couponArr = this.data.couponArr; | ||
| 1085 | + let totalPrice = this.data.totalPrice; | ||
| 1086 | + App.Activity.ActivityListByOpenid({ | ||
| 1087 | + aid: item.id, | ||
| 1088 | + sellerid:this.data.seller.sid, | ||
| 1089 | + }).then(res => { | ||
| 1090 | + if (res.ret == 200) { | ||
| 1091 | + if (res.data.length == 0) { | ||
| 1092 | + couponArr.push(item) | ||
| 1093 | + } | ||
| 1094 | + if (item.id == id && couponArr.length > 0) { | ||
| 1095 | + couponArr.forEach((item,index) => { | ||
| 1096 | + let match = obj.find(b => b.id === item.id); | ||
| 1097 | + if (match) { | ||
| 1098 | + item.number = match.number; | ||
| 978 | } | 1099 | } |
| 979 | - console.log('邀请函--------------------优惠券', coupon_dataList); | ||
| 980 | - this.setData({ | ||
| 981 | - coupon_dataList, | ||
| 982 | - titleList: entry, | ||
| 983 | - activeTitle: entry.length > 0 ? entry[0].id : '', | ||
| 984 | - }) | 1100 | + item.grant_num = item.grant_num*1 |
| 1101 | + if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1) | ||
| 1102 | + if(item.number>item.grant_num){ | ||
| 1103 | + item.number = item.grant_num | ||
| 1104 | + } | ||
| 1105 | + }); | ||
| 1106 | + if(couponArr.length>0){ | ||
| 1107 | + totalPrice = couponArr.reduce((sum, item) => sum + item.price * item.number, 0); | ||
| 1108 | + this.setcouponFun(couponArr) | ||
| 1109 | + this.couponModal.showModal() | ||
| 985 | } | 1110 | } |
| 986 | } | 1111 | } |
| 987 | - }) | 1112 | + console.log('未领取的券列表-----------', couponArr); |
| 1113 | + this.setData({ | ||
| 1114 | + couponArr, | ||
| 1115 | + totalPrice | ||
| 1116 | + }) | ||
| 1117 | + } | ||
| 988 | }) | 1118 | }) |
| 989 | }, | 1119 | }, |
| 1120 | + // 处理优惠券不可用日期数据 | ||
| 1121 | + hasConsecutiveSelect(arr, type) { | ||
| 1122 | + let firstTitle = null; | ||
| 1123 | + let lastTitle = null; | ||
| 1124 | + let rArr = [] | ||
| 1125 | + let num = 0 | ||
| 1126 | + for (let i = 0; i < arr.length; i++) { | ||
| 1127 | + let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig | ||
| 1128 | + if (str) { | ||
| 1129 | + rArr.push(arr[i].title) | ||
| 1130 | + num++ | ||
| 1131 | + if (num == 1) { | ||
| 1132 | + firstTitle = arr[i].title | ||
| 1133 | + } | ||
| 1134 | + if (num >= 5) { | ||
| 1135 | + lastTitle = arr[i].title | ||
| 1136 | + } | ||
| 1137 | + if (num >= 5 && i >= (arr.length - 1)) { | ||
| 1138 | + let fi = rArr.findIndex((item) => { | ||
| 1139 | + return item == firstTitle | ||
| 1140 | + }) | ||
| 1141 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1142 | + num = 0 | ||
| 1143 | + } | ||
| 1144 | + } else { | ||
| 1145 | + if (num < 5) { | ||
| 1146 | + num = 0 | ||
| 1147 | + firstTitle = null; | ||
| 1148 | + lastTitle = null; | ||
| 1149 | + } else { | ||
| 1150 | + let fi = rArr.findIndex((item) => { | ||
| 1151 | + return item == firstTitle | ||
| 1152 | + }) | ||
| 1153 | + rArr.splice(fi, num, firstTitle + '至' + lastTitle) | ||
| 1154 | + num = 0 | ||
| 1155 | + } | ||
| 1156 | + } | ||
| 1157 | + } | ||
| 1158 | + return { | ||
| 1159 | + rArr, | ||
| 1160 | + lastTitle, | ||
| 1161 | + firstTitle | ||
| 1162 | + }; | ||
| 1163 | + }, | ||
| 990 | /** | 1164 | /** |
| 991 | * 生命周期函数--监听页面隐藏 | 1165 | * 生命周期函数--监听页面隐藏 |
| 992 | */ | 1166 | */ |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" backgroundColor="{{show_white ? colors : 'transparent'}}" place="{{false}}"></nav> | 3 | <nav hasHome class="navhome" backgroundColor="{{show_white ? colors : 'transparent'}}" place="{{false}}"></nav> |
| 4 | <scroll-view scroll-y class="viewBox viewBox{{bookType}}"> | 4 | <scroll-view scroll-y class="viewBox viewBox{{bookType}}"> |
| 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> | 5 | <image wx:if="{{hasValueBroadcast && isVoice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> |
| 6 | - <image class="giftImg" bindtap="gotoSellerGift" wx:if="{{(hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> | 6 | + <image class="giftImg" bindtap="gotoSellerGift" data-form="1" wx:if="{{(hasValueCertificate && coupon_dataList.length>0) || (!is_user_comments && isComments =='1' && couponData.showCoupon =='1') || (hasValueRecharge && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGift.png" mode="" /> |
| 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> | 7 | <image wx:if="{{detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" /> |
| 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> | 8 | <image wx:if="{{options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" /> |
| 9 | <view class="reservationInfo"> | 9 | <view class="reservationInfo"> |
| @@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
| 93 | </view> | 93 | </view> |
| 94 | </view> | 94 | </view> |
| 95 | <view class="entrance"> | 95 | <view class="entrance"> |
| 96 | - <view bindtap="publicShowModal" data-type="1" data-title="专属优惠券" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0}}" class="entranceItem"> | 96 | + <view bindtap="publicShowModal" data-type="1" data-title="专属优惠券" wx:if="{{hasValueCertificate && coupon_dataList.length>0}}" class="entranceItem"> |
| 97 | <image src="https://qn.colorcun.com/invitation1{{bookType == '1'?'3':'4'}}Icon1.png" mode="" /> | 97 | <image src="https://qn.colorcun.com/invitation1{{bookType == '1'?'3':'4'}}Icon1.png" mode="" /> |
| 98 | <view class="font24r">专属优惠券</view> | 98 | <view class="font24r">专属优惠券</view> |
| 99 | </view> | 99 | </view> |
| @@ -153,9 +153,9 @@ | @@ -153,9 +153,9 @@ | ||
| 153 | <image bindtap="closepublicModal" src="https://qn.colorcun.com/invitation13Icons.png" mode="" /> | 153 | <image bindtap="closepublicModal" src="https://qn.colorcun.com/invitation13Icons.png" mode="" /> |
| 154 | </view> | 154 | </view> |
| 155 | <block wx:if="{{modalType == '1'}}"> | 155 | <block wx:if="{{modalType == '1'}}"> |
| 156 | - <view class="regionItem couponBox" slot="modalContent"> | 156 | + <view class="regionItem couponBoxWrap" slot="modalContent"> |
| 157 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 157 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 158 | - <navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> | 158 | + <navigator url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover"> |
| 159 | <view class="preferentialItems"> | 159 | <view class="preferentialItems"> |
| 160 | <view class="purchase"> | 160 | <view class="purchase"> |
| 161 | <view class="priceText" wx:if="{{item.price}}"> | 161 | <view class="priceText" wx:if="{{item.price}}"> |
| @@ -167,7 +167,7 @@ | @@ -167,7 +167,7 @@ | ||
| 167 | <view class="certificateInfo"> | 167 | <view class="certificateInfo"> |
| 168 | <view class="preferentialDetails"> | 168 | <view class="preferentialDetails"> |
| 169 | <view class="information"> | 169 | <view class="information"> |
| 170 | - <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text> | 170 | + <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 171 | <text class="ticketName font24r">{{item.aname}}</text> | 171 | <text class="ticketName font24r">{{item.aname}}</text> |
| 172 | </view> | 172 | </view> |
| 173 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> | 173 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text> |
| @@ -177,16 +177,35 @@ | @@ -177,16 +177,35 @@ | ||
| 177 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> | 177 | <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 178 | 会员生日当天可用 | 178 | 会员生日当天可用 |
| 179 | </view> | 179 | </view> |
| 180 | - <view wx:if="{{item.desc}}" class="showDesc"> | 180 | + <view wx:if="{{item.is_type == '4' && item.desc}}" class="limitation showDesc"> |
| 181 | <text class="font24r">消费要求</text> | 181 | <text class="font24r">消费要求</text> |
| 182 | </view> | 182 | </view> |
| 183 | + <view wx:if="{{item.is_type == '3' && (item.noonText || item.nigText)}}" class="limitation showDesc"> | ||
| 184 | + <text class="font24r">不可用日期</text> | ||
| 185 | + </view> | ||
| 183 | </view> | 186 | </view> |
| 184 | - <view class="limitationBtn"> | 187 | + <view class="limitationBtn" wx:if="{{item.is_type != '3'}}"> |
| 185 | <view class="font24r couponBtn">立即抢购</view> | 188 | <view class="font24r couponBtn">立即抢购</view> |
| 186 | </view> | 189 | </view> |
| 190 | + <view class="btnBox" wx:if="{{item.is_type == '3'}}" > | ||
| 191 | + <view class="font24r orderingFood">已领取</view> | ||
| 192 | + <view class="grantNum" wx:if="{{item.receiveNumText}}"> | ||
| 193 | + <view class="font24r">已被领取</view> | ||
| 194 | + <view class="font24r"><text>{{item.receiveNumText}}</text>张</view> | ||
| 195 | + </view> | ||
| 196 | + </view> | ||
| 187 | </view> | 197 | </view> |
| 188 | </view> | 198 | </view> |
| 189 | - <view wx:if="{{item.desc}}" class="bottomLimitation font24r"><text></text>{{item.desc}}</view> | 199 | + <view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottomLimitation limitation font24r bottomLimitationTop"> |
| 200 | + <text></text> | ||
| 201 | + <view>消费满{{item.desc}}元可用</view> | ||
| 202 | + </view> | ||
| 203 | + <view wx:if="{{item.is_type == '3' && item.noonText}}" class="bottomLimitation limitation font24r bottomLimitationTop"> | ||
| 204 | + <text></text>{{item.noonText}} | ||
| 205 | + </view> | ||
| 206 | + <view wx:if="{{item.is_type == '3' && item.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 207 | + <text></text>{{item.nigText}} | ||
| 208 | + </view> | ||
| 190 | </navigator> | 209 | </navigator> |
| 191 | </block> | 210 | </block> |
| 192 | </view> | 211 | </view> |
| @@ -217,7 +236,7 @@ | @@ -217,7 +236,7 @@ | ||
| 217 | </view> | 236 | </view> |
| 218 | </block> | 237 | </block> |
| 219 | <block wx:if="{{modalType == '3'}}"> | 238 | <block wx:if="{{modalType == '3'}}"> |
| 220 | - <view class="publicModule couponBox" slot="modalContent" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> | 239 | + <view class="publicModule couponBoxWrap" slot="modalContent" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> |
| 221 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> | 240 | <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view> |
| 222 | <view class="couponInfo" bindtap="evaluateFun"> | 241 | <view class="couponInfo" bindtap="evaluateFun"> |
| 223 | <view class="preferentialItems"> | 242 | <view class="preferentialItems"> |
| @@ -231,7 +250,7 @@ | @@ -231,7 +250,7 @@ | ||
| 231 | <view class="certificateInfo"> | 250 | <view class="certificateInfo"> |
| 232 | <view class="preferentialDetails"> | 251 | <view class="preferentialDetails"> |
| 233 | <view class="information"> | 252 | <view class="information"> |
| 234 | - <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':''}}</text> | 253 | + <text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':'代金券'}}</text> |
| 235 | <text class="ticketName font24r">{{couponData.aname}}</text> | 254 | <text class="ticketName font24r">{{couponData.aname}}</text> |
| 236 | </view> | 255 | </view> |
| 237 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> | 256 | <text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text> |
| @@ -241,16 +260,35 @@ | @@ -241,16 +260,35 @@ | ||
| 241 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> | 260 | <view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r"> |
| 242 | 会员生日当天可用 | 261 | 会员生日当天可用 |
| 243 | </view> | 262 | </view> |
| 244 | - <view wx:if="{{couponData.desc}}" class="limitation showDesc"> | 263 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc}}" class="limitation showDesc"> |
| 245 | <text class="font24r">消费要求</text> | 264 | <text class="font24r">消费要求</text> |
| 246 | </view> | 265 | </view> |
| 266 | + <view wx:if="{{couponData.is_type == '3' && (couponData.noonText || couponData.nigText)}}" class="limitation showDesc"> | ||
| 267 | + <text class="font24r">不可用日期</text> | ||
| 268 | + </view> | ||
| 269 | + </view> | ||
| 270 | + <view class="limitationBtn" wx:if="{{couponData.is_type != '3'}}"> | ||
| 271 | + <view class="font24r couponBtn">立即抢购</view> | ||
| 247 | </view> | 272 | </view> |
| 248 | - <view class="limitationBtn"> | ||
| 249 | - <view class="font24r couponBtn">立即领取</view> | 273 | + <view class="btnBox" wx:if="{{couponData.is_type == '3'}}" > |
| 274 | + <view class="font24r orderingFood">已领取</view> | ||
| 275 | + <view class="grantNum" wx:if="{{couponData.receiveNumText}}"> | ||
| 276 | + <view class="font24r">已被领取</view> | ||
| 277 | + <view class="font24r"><text>{{couponData.receiveNumText}}</text>张</view> | ||
| 278 | + </view> | ||
| 250 | </view> | 279 | </view> |
| 251 | </view> | 280 | </view> |
| 252 | </view> | 281 | </view> |
| 253 | - <view wx:if="{{couponData.desc}}" class="bottomLimitation limitation font24r"><text></text>{{couponData.desc}}</view> | 282 | + <view wx:if="{{couponData.is_type == '4' && couponData.desc!='0'}}" class="bottomLimitation limitation font24r bottomLimitationTop"> |
| 283 | + <text></text> | ||
| 284 | + <view>消费满{{couponData.desc}}元可用</view> | ||
| 285 | + </view> | ||
| 286 | + <view wx:if="{{couponData.is_type == '3' && couponData.noonText}}" class="bottomLimitation limitation font24r bottomLimitationTop"> | ||
| 287 | + <text></text>{{couponData.noonText}} | ||
| 288 | + </view> | ||
| 289 | + <view wx:if="{{couponData.is_type == '3' && couponData.nigText}}" class="bottomLimitation limitation font24r"> | ||
| 290 | + <text></text>{{couponData.nigText}} | ||
| 291 | + </view> | ||
| 254 | </view> | 292 | </view> |
| 255 | </view> | 293 | </view> |
| 256 | <!-- 评价没有券 --> | 294 | <!-- 评价没有券 --> |
| @@ -409,4 +447,24 @@ | @@ -409,4 +447,24 @@ | ||
| 409 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> | 447 | <button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button> |
| 410 | </view> | 448 | </view> |
| 411 | </view> | 449 | </view> |
| 450 | +</my-modal> | ||
| 451 | +<my-modal id="couponModal" fadeStyle="slideUp" height="240px"> | ||
| 452 | + <view slot="modalName" class="titleModal {{(couponArr.length == '2' || couponArr.length < '2') ? 'titleModal2 ' : (couponArr.length == '4' || couponArr.length < '4') ? 'titleModal3 ' : (couponArr.length > '4') ? 'titleModal4' : '' }}"> | ||
| 453 | + <image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/> | ||
| 454 | + <view class="nameInfo">{{seller.name||reserve.seller_name}}</view> | ||
| 455 | + <view class="couponTotal">赠送给您<text>{{totalPrice}}元</text>代金券</view> | ||
| 456 | + </view> | ||
| 457 | + <view slot="modalContent"> | ||
| 458 | + <view class="couponBox"> | ||
| 459 | + <view wx:for="{{couponArr}}" class="couponItems"> | ||
| 460 | + <view class="couponNum font20r">×{{item.number}}</view> | ||
| 461 | + <view class="font36r couponPrice">¥<text>{{item.price}}</text></view> | ||
| 462 | + <view class="couponLines"></view> | ||
| 463 | + <view class="font28r couponCondition" wx:if="{{item.desc!='0'}}">消费满{{item.desc}}元可用</view> | ||
| 464 | + <view class="font28r couponCondition" wx:else>无门槛</view> | ||
| 465 | + </view> | ||
| 466 | + </view> | ||
| 467 | + <view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view> | ||
| 468 | + <view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view> | ||
| 469 | + </view> | ||
| 412 | </my-modal> | 470 | </my-modal> |
| @@ -403,15 +403,28 @@ | @@ -403,15 +403,28 @@ | ||
| 403 | padding: 0 20rpx; | 403 | padding: 0 20rpx; |
| 404 | border-radius: 22rpx; | 404 | border-radius: 22rpx; |
| 405 | text-align: center; | 405 | text-align: center; |
| 406 | - color: #000; | ||
| 407 | border-radius: 20rpx; | 406 | border-radius: 20rpx; |
| 408 | line-height: 44rpx; | 407 | line-height: 44rpx; |
| 409 | height: 44rpx; | 408 | height: 44rpx; |
| 410 | - background: #fff; | ||
| 411 | - border: 2rpx solid #fff; | ||
| 412 | width: max-content; | 409 | width: max-content; |
| 413 | margin-top: 24rpx; | 410 | margin-top: 24rpx; |
| 414 | flex-shrink: 0; | 411 | flex-shrink: 0; |
| 412 | + border: 2rpx solid #999; | ||
| 413 | + background: transparent; | ||
| 414 | + color: #999; | ||
| 415 | +} | ||
| 416 | + | ||
| 417 | +.grantNum { | ||
| 418 | + display: flex; | ||
| 419 | + flex-direction: column; | ||
| 420 | + align-items: center; | ||
| 421 | + color: #999; | ||
| 422 | + margin-top: 10rpx; | ||
| 423 | +} | ||
| 424 | + | ||
| 425 | +.grantNum text { | ||
| 426 | + color: #CC9B6A; | ||
| 427 | + margin-right: 10rpx; | ||
| 415 | } | 428 | } |
| 416 | 429 | ||
| 417 | .limitation { | 430 | .limitation { |
| @@ -510,28 +523,30 @@ | @@ -510,28 +523,30 @@ | ||
| 510 | } | 523 | } |
| 511 | 524 | ||
| 512 | 525 | ||
| 513 | -.couponBox navigator, | ||
| 514 | -.couponBox .couponInfo { | 526 | +.couponBoxWrap navigator, |
| 527 | +.couponBoxWrap .couponInfo { | ||
| 515 | width: 100%; | 528 | width: 100%; |
| 516 | margin-bottom: 20rpx; | 529 | margin-bottom: 20rpx; |
| 517 | - padding-bottom: 10rpx; | ||
| 518 | border-radius: 10rpx; | 530 | border-radius: 10rpx; |
| 519 | background: #FFF1E6; | 531 | background: #FFF1E6; |
| 520 | } | 532 | } |
| 521 | 533 | ||
| 522 | -.couponBox .preferentialItems { | 534 | +.bottomLimitationTop{ |
| 535 | + margin-top: 20rpx !important; | ||
| 536 | +} | ||
| 537 | + | ||
| 538 | +.couponBoxWrap .preferentialItems { | ||
| 523 | box-shadow: 0rpx 4rpx 8rpx #0000000d; | 539 | box-shadow: 0rpx 4rpx 8rpx #0000000d; |
| 524 | } | 540 | } |
| 525 | 541 | ||
| 526 | -.couponBox .showDesc { | ||
| 527 | - display: flex; | ||
| 528 | - align-items: center; | 542 | +.couponBoxWrap .showDesc { |
| 529 | color: #666; | 543 | color: #666; |
| 530 | } | 544 | } |
| 531 | 545 | ||
| 532 | .bottomLimitation { | 546 | .bottomLimitation { |
| 533 | - padding: 20rpx; | 547 | + padding: 0 20rpx; |
| 534 | display: flex; | 548 | display: flex; |
| 549 | + flex-direction: row !important; | ||
| 535 | align-items: center; | 550 | align-items: center; |
| 536 | margin-top: 10rpx; | 551 | margin-top: 10rpx; |
| 537 | color: #666; | 552 | color: #666; |
| @@ -539,6 +554,10 @@ | @@ -539,6 +554,10 @@ | ||
| 539 | font-weight: 500; | 554 | font-weight: 500; |
| 540 | } | 555 | } |
| 541 | 556 | ||
| 557 | +.bottomLimitation:nth-last-of-type(1){ | ||
| 558 | + padding-bottom: 20rpx; | ||
| 559 | +} | ||
| 560 | + | ||
| 542 | .bottomLimitation text { | 561 | .bottomLimitation text { |
| 543 | display: block; | 562 | display: block; |
| 544 | width: 8rpx; | 563 | width: 8rpx; |
| @@ -548,20 +567,20 @@ | @@ -548,20 +567,20 @@ | ||
| 548 | border-radius: 50%; | 567 | border-radius: 50%; |
| 549 | } | 568 | } |
| 550 | 569 | ||
| 551 | -.couponBox .certificateInfo { | 570 | +.couponBoxWrap .certificateInfo { |
| 552 | flex-direction: row; | 571 | flex-direction: row; |
| 553 | background: #FFF1E6; | 572 | background: #FFF1E6; |
| 554 | align-items: center; | 573 | align-items: center; |
| 555 | } | 574 | } |
| 556 | 575 | ||
| 557 | -.couponBox .couponBtn { | 576 | +.couponBoxWrap .couponBtn { |
| 558 | width: 100%; | 577 | width: 100%; |
| 559 | height: fit-content; | 578 | height: fit-content; |
| 560 | background: #D2541C; | 579 | background: #D2541C; |
| 561 | color: #fff; | 580 | color: #fff; |
| 562 | } | 581 | } |
| 563 | 582 | ||
| 564 | -.couponBox .certificateInfo .preferentialDetails { | 583 | +.couponBoxWrap .certificateInfo .preferentialDetails { |
| 565 | width: 100%; | 584 | width: 100%; |
| 566 | display: flex; | 585 | display: flex; |
| 567 | flex-direction: column; | 586 | flex-direction: column; |
| @@ -569,18 +588,18 @@ | @@ -569,18 +588,18 @@ | ||
| 569 | 588 | ||
| 570 | 589 | ||
| 571 | 590 | ||
| 572 | -.couponBox .information { | 591 | +.couponBoxWrap .information { |
| 573 | display: flex; | 592 | display: flex; |
| 574 | align-items: center; | 593 | align-items: center; |
| 575 | } | 594 | } |
| 576 | 595 | ||
| 577 | -.couponBox .certificateInfo .limitation { | 596 | +.couponBoxWrap .certificateInfo .limitation { |
| 578 | margin-right: 20rpx; | 597 | margin-right: 20rpx; |
| 579 | flex: 1; | 598 | flex: 1; |
| 580 | width: auto; | 599 | width: auto; |
| 581 | } | 600 | } |
| 582 | 601 | ||
| 583 | -.couponBox .discountInfo { | 602 | +.couponBoxWrap .discountInfo { |
| 584 | font-family: PingFang SC; | 603 | font-family: PingFang SC; |
| 585 | background: #FD4D59; | 604 | background: #FD4D59; |
| 586 | position: absolute; | 605 | position: absolute; |
| @@ -596,7 +615,7 @@ | @@ -596,7 +615,7 @@ | ||
| 596 | width: max-content; | 615 | width: max-content; |
| 597 | } | 616 | } |
| 598 | 617 | ||
| 599 | -.couponBox .certificateImg { | 618 | +.couponBoxWrap .certificateImg { |
| 600 | position: absolute; | 619 | position: absolute; |
| 601 | top: 0; | 620 | top: 0; |
| 602 | left: 0; | 621 | left: 0; |
| @@ -604,7 +623,7 @@ | @@ -604,7 +623,7 @@ | ||
| 604 | height: 28rpx; | 623 | height: 28rpx; |
| 605 | } | 624 | } |
| 606 | 625 | ||
| 607 | -.couponBox .limitationBtn { | 626 | +.couponBoxWrap .limitationBtn { |
| 608 | width: 40%; | 627 | width: 40%; |
| 609 | display: flex; | 628 | display: flex; |
| 610 | flex-direction: column; | 629 | flex-direction: column; |
| @@ -924,6 +943,145 @@ | @@ -924,6 +943,145 @@ | ||
| 924 | background: #E4E7E0; | 943 | background: #E4E7E0; |
| 925 | } | 944 | } |
| 926 | 945 | ||
| 946 | +#couponModal .titleModal { | ||
| 947 | + margin-top: 30%; | ||
| 948 | + position: relative; | ||
| 949 | +} | ||
| 950 | + | ||
| 951 | +#couponModal .titleModal2 { | ||
| 952 | + margin-top: 80%; | ||
| 953 | +} | ||
| 954 | + | ||
| 955 | +#couponModal .titleModal3 { | ||
| 956 | + margin-top: 60%; | ||
| 957 | +} | ||
| 958 | + | ||
| 959 | +#couponModal .titleModal4 { | ||
| 960 | + margin-top: 30%; | ||
| 961 | +} | ||
| 962 | + | ||
| 963 | +#couponModal .mymodal { | ||
| 964 | + background: rgba(0, 0, 0, 0.8); | ||
| 965 | + width: 100% !important; | ||
| 966 | + top: 0 !important; | ||
| 967 | + height: auto !important; | ||
| 968 | + z-index: 300; | ||
| 969 | +} | ||
| 970 | + | ||
| 971 | +.nameInfo { | ||
| 972 | + font-family: PingFang SC; | ||
| 973 | + font-weight: 400; | ||
| 974 | + font-size: 52rpx; | ||
| 975 | + line-height: 56rpx; | ||
| 976 | + color: #fff; | ||
| 977 | + margin-bottom: 40rpx; | ||
| 978 | + padding-top: 60rpx; | ||
| 979 | +} | ||
| 980 | + | ||
| 981 | +.couponTotal { | ||
| 982 | + color: #dfdfdf; | ||
| 983 | + font-family: PingFang SC; | ||
| 984 | + font-weight: 400; | ||
| 985 | + font-size: 40rpx; | ||
| 986 | + line-height: 48rpx; | ||
| 987 | + margin-bottom: 40rpx; | ||
| 988 | + display: flex; | ||
| 989 | + align-items: center; | ||
| 990 | + justify-content: center; | ||
| 991 | +} | ||
| 992 | + | ||
| 993 | +.couponTotal text { | ||
| 994 | + color: #ffc806; | ||
| 995 | + font-weight: 600; | ||
| 996 | + font-size: 80rpx; | ||
| 997 | + margin: 0 14rpx; | ||
| 998 | +} | ||
| 999 | + | ||
| 1000 | +.couponBox { | ||
| 1001 | + width: 80%; | ||
| 1002 | + margin: 0 auto; | ||
| 1003 | + display: flex; | ||
| 1004 | + flex-wrap: wrap; | ||
| 1005 | + justify-content: space-evenly; | ||
| 1006 | +} | ||
| 1007 | + | ||
| 1008 | +.couponItems { | ||
| 1009 | + width: 46%; | ||
| 1010 | + margin-bottom: 24rpx; | ||
| 1011 | + padding-bottom: 52rpx; | ||
| 1012 | + border-radius: 20rpx; | ||
| 1013 | + border: 2rpx solid #ff7e06; | ||
| 1014 | + background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%); | ||
| 1015 | +} | ||
| 1016 | + | ||
| 1017 | +.couponNum { | ||
| 1018 | + background: #727272; | ||
| 1019 | + border-radius: 50%; | ||
| 1020 | + color: #fff; | ||
| 1021 | + width: 40rpx; | ||
| 1022 | + height: 40rpx; | ||
| 1023 | + display: flex; | ||
| 1024 | + align-items: center; | ||
| 1025 | + justify-content: center; | ||
| 1026 | + margin: 8rpx 0 0 8rpx; | ||
| 1027 | +} | ||
| 1028 | + | ||
| 1029 | +.couponPrice { | ||
| 1030 | + display: flex; | ||
| 1031 | + align-items: center; | ||
| 1032 | + justify-content: center; | ||
| 1033 | + color: #F6231B; | ||
| 1034 | + font-weight: 500; | ||
| 1035 | +} | ||
| 1036 | + | ||
| 1037 | +.couponLines{ | ||
| 1038 | + width: 80%; | ||
| 1039 | + margin: 0 auto; | ||
| 1040 | + height: 2rpx; | ||
| 1041 | + border-bottom: 2rpx dashed #F6231B; | ||
| 1042 | +} | ||
| 1043 | + | ||
| 1044 | +.couponPrice text { | ||
| 1045 | + margin-left: 4rpx; | ||
| 1046 | + font-size: 76rpx; | ||
| 1047 | + font-weight: 700; | ||
| 1048 | +} | ||
| 1049 | + | ||
| 1050 | +.couponCondition { | ||
| 1051 | + color: #C36607; | ||
| 1052 | + display: flex; | ||
| 1053 | + align-items: center; | ||
| 1054 | + justify-content: center; | ||
| 1055 | + padding-top: 24rpx; | ||
| 1056 | +} | ||
| 1057 | + | ||
| 1058 | +.couponBtn { | ||
| 1059 | + width: 80%; | ||
| 1060 | + margin: 0 auto; | ||
| 1061 | + border-radius: 42rpx; | ||
| 1062 | + background: linear-gradient(90.98deg, #f41919 0.25%, #ff7426 120.07%); | ||
| 1063 | + font-weight: 400; | ||
| 1064 | + color: #fff; | ||
| 1065 | + text-align: center; | ||
| 1066 | + border: 4rpx solid #fff; | ||
| 1067 | + padding: 12rpx 0; | ||
| 1068 | + margin: 16rpx auto 20rpx auto; | ||
| 1069 | +} | ||
| 1070 | + | ||
| 1071 | +.couponText { | ||
| 1072 | + color: #fff; | ||
| 1073 | + text-decoration: underline; | ||
| 1074 | + text-align: center; | ||
| 1075 | +} | ||
| 1076 | + | ||
| 1077 | +.closeImg { | ||
| 1078 | + width: 60rpx; | ||
| 1079 | + height: 60rpx; | ||
| 1080 | + position: absolute; | ||
| 1081 | + right: 0; | ||
| 1082 | + top: 0; | ||
| 1083 | +} | ||
| 1084 | + | ||
| 927 | /* 商务宴会 */ | 1085 | /* 商务宴会 */ |
| 928 | .viewBox2 { | 1086 | .viewBox2 { |
| 929 | background: #fffef8; | 1087 | background: #fffef8; |
| @@ -1068,7 +1226,7 @@ | @@ -1068,7 +1226,7 @@ | ||
| 1068 | background: #854F1E; | 1226 | background: #854F1E; |
| 1069 | } | 1227 | } |
| 1070 | 1228 | ||
| 1071 | -.publicModalBox2 .couponBox .couponBtn, | 1229 | +.publicModalBox2 .couponBoxWrap .couponBtn, |
| 1072 | .publicModalBox2 .rechargeBtn view { | 1230 | .publicModalBox2 .rechargeBtn view { |
| 1073 | background: #854F1E; | 1231 | background: #854F1E; |
| 1074 | } | 1232 | } |
-
Please register or login to post a comment