Showing
9 changed files
with
54 additions
and
27 deletions
| @@ -67,6 +67,7 @@ Page({ | @@ -67,6 +67,7 @@ Page({ | ||
| 67 | isPaymenBtn:'',//支付定金按钮 | 67 | isPaymenBtn:'',//支付定金按钮 |
| 68 | isShareItem:'',//转发客人按钮 | 68 | isShareItem:'',//转发客人按钮 |
| 69 | couponArr: [],//待领取的优惠券列表 | 69 | couponArr: [],//待领取的优惠券列表 |
| 70 | + couponList:[],//优惠券列表 | ||
| 70 | }, | 71 | }, |
| 71 | tablestr: '', | 72 | tablestr: '', |
| 72 | urlsValue: [], | 73 | urlsValue: [], |
| @@ -114,8 +115,9 @@ Page({ | @@ -114,8 +115,9 @@ Page({ | ||
| 114 | closeModal() { | 115 | closeModal() { |
| 115 | this.modal.closeModal() | 116 | this.modal.closeModal() |
| 116 | }, | 117 | }, |
| 117 | - // 关闭优惠券弹框 | 118 | + // 关闭优惠券弹框(更新已被领取数量) |
| 118 | closeCouponModal() { | 119 | closeCouponModal() { |
| 120 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 119 | this.couponModal.closeModal() | 121 | this.couponModal.closeModal() |
| 120 | }, | 122 | }, |
| 121 | // 页面滚动事件 | 123 | // 页面滚动事件 |
| @@ -699,6 +701,7 @@ Page({ | @@ -699,6 +701,7 @@ Page({ | ||
| 699 | themeSixteen, | 701 | themeSixteen, |
| 700 | lite_style:data.lite_style, | 702 | lite_style:data.lite_style, |
| 701 | timeList, | 703 | timeList, |
| 704 | + couponList, | ||
| 702 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 705 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 703 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 706 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 704 | } | 707 | } |
| @@ -907,7 +910,7 @@ Page({ | @@ -907,7 +910,7 @@ Page({ | ||
| 907 | }) | 910 | }) |
| 908 | }, | 911 | }, |
| 909 | // 根据券ID获取券详情 | 912 | // 根据券ID获取券详情 |
| 910 | - getActivityByIdFun(obj) { | 913 | + getActivityByIdFun(obj,setcoupon) { |
| 911 | App.Activity.GetActivityById({ | 914 | App.Activity.GetActivityById({ |
| 912 | id: obj.map(item => item.id).join(','), | 915 | id: obj.map(item => item.id).join(','), |
| 913 | }).then(res => { | 916 | }).then(res => { |
| @@ -951,7 +954,7 @@ Page({ | @@ -951,7 +954,7 @@ Page({ | ||
| 951 | return item.is_type == '3' | 954 | return item.is_type == '3' |
| 952 | }) | 955 | }) |
| 953 | // 免费券判断是否领取,弹框领取 | 956 | // 免费券判断是否领取,弹框领取 |
| 954 | - if (freeCoupons.length > 0) { | 957 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 955 | let length = freeCoupons.length - 1 | 958 | let length = freeCoupons.length - 1 |
| 956 | freeCoupons.forEach(i => { | 959 | freeCoupons.forEach(i => { |
| 957 | this.getCoupon(i, freeCoupons[length].id, obj) | 960 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -67,6 +67,7 @@ Page({ | @@ -67,6 +67,7 @@ Page({ | ||
| 67 | isPaymenBtn:'',//支付定金按钮 | 67 | isPaymenBtn:'',//支付定金按钮 |
| 68 | isShareItem:'',//转发客人按钮 | 68 | isShareItem:'',//转发客人按钮 |
| 69 | couponArr: [],//待领取的优惠券列表 | 69 | couponArr: [],//待领取的优惠券列表 |
| 70 | + couponList:[],//优惠券列表 | ||
| 70 | }, | 71 | }, |
| 71 | tablestr: '', | 72 | tablestr: '', |
| 72 | urlsValue: [], | 73 | urlsValue: [], |
| @@ -114,8 +115,9 @@ Page({ | @@ -114,8 +115,9 @@ Page({ | ||
| 114 | closeModal() { | 115 | closeModal() { |
| 115 | this.modal.closeModal() | 116 | this.modal.closeModal() |
| 116 | }, | 117 | }, |
| 117 | - // 关闭优惠券弹框 | 118 | + // 关闭优惠券弹框(更新已被领取数量) |
| 118 | closeCouponModal() { | 119 | closeCouponModal() { |
| 120 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 119 | this.couponModal.closeModal() | 121 | this.couponModal.closeModal() |
| 120 | }, | 122 | }, |
| 121 | // 页面滚动事件 | 123 | // 页面滚动事件 |
| @@ -654,6 +656,7 @@ Page({ | @@ -654,6 +656,7 @@ Page({ | ||
| 654 | themeColor, | 656 | themeColor, |
| 655 | lite_style:data.lite_style, | 657 | lite_style:data.lite_style, |
| 656 | timeList, | 658 | timeList, |
| 659 | + couponList, | ||
| 657 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 660 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 658 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 661 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 659 | } | 662 | } |
| @@ -862,7 +865,7 @@ Page({ | @@ -862,7 +865,7 @@ Page({ | ||
| 862 | }) | 865 | }) |
| 863 | }, | 866 | }, |
| 864 | // 根据券ID获取券详情 | 867 | // 根据券ID获取券详情 |
| 865 | - getActivityByIdFun(obj) { | 868 | + getActivityByIdFun(obj,setcoupon) { |
| 866 | App.Activity.GetActivityById({ | 869 | App.Activity.GetActivityById({ |
| 867 | id: obj.map(item => item.id).join(','), | 870 | id: obj.map(item => item.id).join(','), |
| 868 | }).then(res => { | 871 | }).then(res => { |
| @@ -906,7 +909,7 @@ Page({ | @@ -906,7 +909,7 @@ Page({ | ||
| 906 | return item.is_type == '3' | 909 | return item.is_type == '3' |
| 907 | }) | 910 | }) |
| 908 | // 免费券判断是否领取,弹框领取 | 911 | // 免费券判断是否领取,弹框领取 |
| 909 | - if (freeCoupons.length > 0) { | 912 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 910 | let length = freeCoupons.length - 1 | 913 | let length = freeCoupons.length - 1 |
| 911 | freeCoupons.forEach(i => { | 914 | freeCoupons.forEach(i => { |
| 912 | this.getCoupon(i, freeCoupons[length].id, obj) | 915 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -67,6 +67,7 @@ Page({ | @@ -67,6 +67,7 @@ Page({ | ||
| 67 | isPaymenBtn:'',//支付定金按钮 | 67 | isPaymenBtn:'',//支付定金按钮 |
| 68 | isShareItem:'',//转发客人按钮 | 68 | isShareItem:'',//转发客人按钮 |
| 69 | couponArr: [],//待领取的优惠券列表 | 69 | couponArr: [],//待领取的优惠券列表 |
| 70 | + couponList:[],//优惠券列表 | ||
| 70 | }, | 71 | }, |
| 71 | tablestr: '', | 72 | tablestr: '', |
| 72 | urlsValue: [], | 73 | urlsValue: [], |
| @@ -114,8 +115,9 @@ Page({ | @@ -114,8 +115,9 @@ Page({ | ||
| 114 | closeModal() { | 115 | closeModal() { |
| 115 | this.modal.closeModal() | 116 | this.modal.closeModal() |
| 116 | }, | 117 | }, |
| 117 | - // 关闭优惠券弹框 | 118 | + // 关闭优惠券弹框(更新已被领取数量) |
| 118 | closeCouponModal() { | 119 | closeCouponModal() { |
| 120 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 119 | this.couponModal.closeModal() | 121 | this.couponModal.closeModal() |
| 120 | }, | 122 | }, |
| 121 | // 页面滚动事件 | 123 | // 页面滚动事件 |
| @@ -654,6 +656,7 @@ Page({ | @@ -654,6 +656,7 @@ Page({ | ||
| 654 | themeColor, | 656 | themeColor, |
| 655 | lite_style:data.lite_style, | 657 | lite_style:data.lite_style, |
| 656 | timeList, | 658 | timeList, |
| 659 | + couponList, | ||
| 657 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 660 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 658 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 661 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 659 | } | 662 | } |
| @@ -862,7 +865,7 @@ Page({ | @@ -862,7 +865,7 @@ Page({ | ||
| 862 | }) | 865 | }) |
| 863 | }, | 866 | }, |
| 864 | // 根据券ID获取券详情 | 867 | // 根据券ID获取券详情 |
| 865 | - getActivityByIdFun(obj) { | 868 | + getActivityByIdFun(obj,setcoupon) { |
| 866 | App.Activity.GetActivityById({ | 869 | App.Activity.GetActivityById({ |
| 867 | id: obj.map(item => item.id).join(','), | 870 | id: obj.map(item => item.id).join(','), |
| 868 | }).then(res => { | 871 | }).then(res => { |
| @@ -906,7 +909,7 @@ Page({ | @@ -906,7 +909,7 @@ Page({ | ||
| 906 | return item.is_type == '3' | 909 | return item.is_type == '3' |
| 907 | }) | 910 | }) |
| 908 | // 免费券判断是否领取,弹框领取 | 911 | // 免费券判断是否领取,弹框领取 |
| 909 | - if (freeCoupons.length > 0) { | 912 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 910 | let length = freeCoupons.length - 1 | 913 | let length = freeCoupons.length - 1 |
| 911 | freeCoupons.forEach(i => { | 914 | freeCoupons.forEach(i => { |
| 912 | this.getCoupon(i, freeCoupons[length].id, obj) | 915 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -66,6 +66,7 @@ Page({ | @@ -66,6 +66,7 @@ Page({ | ||
| 66 | isPaymenBtn:'',//支付定金按钮 | 66 | isPaymenBtn:'',//支付定金按钮 |
| 67 | isShareItem:'',//转发客人按钮 | 67 | isShareItem:'',//转发客人按钮 |
| 68 | couponArr: [],//待领取的优惠券列表 | 68 | couponArr: [],//待领取的优惠券列表 |
| 69 | + couponList:[],//优惠券列表 | ||
| 69 | }, | 70 | }, |
| 70 | tablestr: '', | 71 | tablestr: '', |
| 71 | urlsValue: [], | 72 | urlsValue: [], |
| @@ -113,8 +114,9 @@ Page({ | @@ -113,8 +114,9 @@ Page({ | ||
| 113 | closeModal() { | 114 | closeModal() { |
| 114 | this.modal.closeModal() | 115 | this.modal.closeModal() |
| 115 | }, | 116 | }, |
| 116 | - // 关闭优惠券弹框 | 117 | + // 关闭优惠券弹框(更新已被领取数量) |
| 117 | closeCouponModal() { | 118 | closeCouponModal() { |
| 119 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 118 | this.couponModal.closeModal() | 120 | this.couponModal.closeModal() |
| 119 | }, | 121 | }, |
| 120 | // 页面滚动事件 | 122 | // 页面滚动事件 |
| @@ -653,6 +655,7 @@ Page({ | @@ -653,6 +655,7 @@ Page({ | ||
| 653 | themeColor, | 655 | themeColor, |
| 654 | lite_style:data.lite_style, | 656 | lite_style:data.lite_style, |
| 655 | timeList, | 657 | timeList, |
| 658 | + couponList, | ||
| 656 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 659 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 657 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 660 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 658 | } | 661 | } |
| @@ -861,7 +864,7 @@ Page({ | @@ -861,7 +864,7 @@ Page({ | ||
| 861 | }) | 864 | }) |
| 862 | }, | 865 | }, |
| 863 | // 根据券ID获取券详情 | 866 | // 根据券ID获取券详情 |
| 864 | - getActivityByIdFun(obj) { | 867 | + getActivityByIdFun(obj,setcoupon) { |
| 865 | App.Activity.GetActivityById({ | 868 | App.Activity.GetActivityById({ |
| 866 | id: obj.map(item => item.id).join(','), | 869 | id: obj.map(item => item.id).join(','), |
| 867 | }).then(res => { | 870 | }).then(res => { |
| @@ -905,7 +908,7 @@ Page({ | @@ -905,7 +908,7 @@ Page({ | ||
| 905 | return item.is_type == '3' | 908 | return item.is_type == '3' |
| 906 | }) | 909 | }) |
| 907 | // 免费券判断是否领取,弹框领取 | 910 | // 免费券判断是否领取,弹框领取 |
| 908 | - if (freeCoupons.length > 0) { | 911 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 909 | let length = freeCoupons.length - 1 | 912 | let length = freeCoupons.length - 1 |
| 910 | freeCoupons.forEach(i => { | 913 | freeCoupons.forEach(i => { |
| 911 | this.getCoupon(i, freeCoupons[length].id, obj) | 914 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -68,6 +68,7 @@ Page({ | @@ -68,6 +68,7 @@ Page({ | ||
| 68 | isPaymenBtn:'',//支付定金按钮 | 68 | isPaymenBtn:'',//支付定金按钮 |
| 69 | isShareItem:'',//转发客人按钮 | 69 | isShareItem:'',//转发客人按钮 |
| 70 | couponArr: [],//待领取的优惠券列表 | 70 | couponArr: [],//待领取的优惠券列表 |
| 71 | + couponList:[],//优惠券列表 | ||
| 71 | }, | 72 | }, |
| 72 | screenHeight: '', | 73 | screenHeight: '', |
| 73 | attentionAnim: {}, | 74 | attentionAnim: {}, |
| @@ -113,8 +114,9 @@ Page({ | @@ -113,8 +114,9 @@ Page({ | ||
| 113 | closeModal() { | 114 | closeModal() { |
| 114 | this.modal.closeModal() | 115 | this.modal.closeModal() |
| 115 | }, | 116 | }, |
| 116 | - // 关闭优惠券弹框 | 117 | + // 关闭优惠券弹框(更新已被领取数量) |
| 117 | closeCouponModal() { | 118 | closeCouponModal() { |
| 119 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 118 | this.couponModal.closeModal() | 120 | this.couponModal.closeModal() |
| 119 | }, | 121 | }, |
| 120 | // 页面滚动事件 | 122 | // 页面滚动事件 |
| @@ -610,6 +612,7 @@ Page({ | @@ -610,6 +612,7 @@ Page({ | ||
| 610 | whiteBj, | 612 | whiteBj, |
| 611 | lite_style:data.lite_style, | 613 | lite_style:data.lite_style, |
| 612 | timeList, | 614 | timeList, |
| 615 | + couponList, | ||
| 613 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 616 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 614 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 617 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 615 | } | 618 | } |
| @@ -818,7 +821,7 @@ Page({ | @@ -818,7 +821,7 @@ Page({ | ||
| 818 | }) | 821 | }) |
| 819 | }, | 822 | }, |
| 820 | // 根据券ID获取券详情 | 823 | // 根据券ID获取券详情 |
| 821 | - getActivityByIdFun(obj) { | 824 | + getActivityByIdFun(obj,setcoupon) { |
| 822 | App.Activity.GetActivityById({ | 825 | App.Activity.GetActivityById({ |
| 823 | id: obj.map(item => item.id).join(','), | 826 | id: obj.map(item => item.id).join(','), |
| 824 | }).then(res => { | 827 | }).then(res => { |
| @@ -862,7 +865,7 @@ Page({ | @@ -862,7 +865,7 @@ Page({ | ||
| 862 | return item.is_type == '3' | 865 | return item.is_type == '3' |
| 863 | }) | 866 | }) |
| 864 | // 免费券判断是否领取,弹框领取 | 867 | // 免费券判断是否领取,弹框领取 |
| 865 | - if (freeCoupons.length > 0) { | 868 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 866 | let length = freeCoupons.length - 1 | 869 | let length = freeCoupons.length - 1 |
| 867 | freeCoupons.forEach(i => { | 870 | freeCoupons.forEach(i => { |
| 868 | this.getCoupon(i, freeCoupons[length].id, obj) | 871 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -67,6 +67,7 @@ Page({ | @@ -67,6 +67,7 @@ Page({ | ||
| 67 | isPaymenBtn:'',//支付定金按钮 | 67 | isPaymenBtn:'',//支付定金按钮 |
| 68 | isShareItem:'',//转发客人按钮 | 68 | isShareItem:'',//转发客人按钮 |
| 69 | couponArr: [],//待领取的优惠券列表 | 69 | couponArr: [],//待领取的优惠券列表 |
| 70 | + couponList:[],//优惠券列表 | ||
| 70 | }, | 71 | }, |
| 71 | tablestr: '', | 72 | tablestr: '', |
| 72 | urlsValue: [], | 73 | urlsValue: [], |
| @@ -114,8 +115,9 @@ Page({ | @@ -114,8 +115,9 @@ Page({ | ||
| 114 | closeModal() { | 115 | closeModal() { |
| 115 | this.modal.closeModal() | 116 | this.modal.closeModal() |
| 116 | }, | 117 | }, |
| 117 | - // 关闭优惠券弹框 | 118 | + // 关闭优惠券弹框(更新已被领取数量) |
| 118 | closeCouponModal() { | 119 | closeCouponModal() { |
| 120 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 119 | this.couponModal.closeModal() | 121 | this.couponModal.closeModal() |
| 120 | }, | 122 | }, |
| 121 | // 页面滚动事件 | 123 | // 页面滚动事件 |
| @@ -654,6 +656,7 @@ Page({ | @@ -654,6 +656,7 @@ Page({ | ||
| 654 | themeColor, | 656 | themeColor, |
| 655 | lite_style:data.lite_style, | 657 | lite_style:data.lite_style, |
| 656 | timeList, | 658 | timeList, |
| 659 | + couponList, | ||
| 657 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 660 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 658 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 661 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 659 | } | 662 | } |
| @@ -862,7 +865,7 @@ Page({ | @@ -862,7 +865,7 @@ Page({ | ||
| 862 | }) | 865 | }) |
| 863 | }, | 866 | }, |
| 864 | // 根据券ID获取券详情 | 867 | // 根据券ID获取券详情 |
| 865 | - getActivityByIdFun(obj) { | 868 | + getActivityByIdFun(obj,setcoupon) { |
| 866 | App.Activity.GetActivityById({ | 869 | App.Activity.GetActivityById({ |
| 867 | id: obj.map(item => item.id).join(','), | 870 | id: obj.map(item => item.id).join(','), |
| 868 | }).then(res => { | 871 | }).then(res => { |
| @@ -906,7 +909,7 @@ Page({ | @@ -906,7 +909,7 @@ Page({ | ||
| 906 | return item.is_type == '3' | 909 | return item.is_type == '3' |
| 907 | }) | 910 | }) |
| 908 | // 免费券判断是否领取,弹框领取 | 911 | // 免费券判断是否领取,弹框领取 |
| 909 | - if (freeCoupons.length > 0) { | 912 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 910 | let length = freeCoupons.length - 1 | 913 | let length = freeCoupons.length - 1 |
| 911 | freeCoupons.forEach(i => { | 914 | freeCoupons.forEach(i => { |
| 912 | this.getCoupon(i, freeCoupons[length].id, obj) | 915 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -67,6 +67,7 @@ Page({ | @@ -67,6 +67,7 @@ Page({ | ||
| 67 | isPaymenBtn:'',//支付定金按钮 | 67 | isPaymenBtn:'',//支付定金按钮 |
| 68 | isShareItem:'',//转发客人按钮 | 68 | isShareItem:'',//转发客人按钮 |
| 69 | couponArr: [],//待领取的优惠券列表 | 69 | couponArr: [],//待领取的优惠券列表 |
| 70 | + couponList:[],//优惠券列表 | ||
| 70 | }, | 71 | }, |
| 71 | tablestr: '', | 72 | tablestr: '', |
| 72 | urlsValue: [], | 73 | urlsValue: [], |
| @@ -114,8 +115,9 @@ Page({ | @@ -114,8 +115,9 @@ Page({ | ||
| 114 | closeModal() { | 115 | closeModal() { |
| 115 | this.modal.closeModal() | 116 | this.modal.closeModal() |
| 116 | }, | 117 | }, |
| 117 | - // 关闭优惠券弹框 | 118 | + // 关闭优惠券弹框(更新已被领取数量) |
| 118 | closeCouponModal() { | 119 | closeCouponModal() { |
| 120 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 119 | this.couponModal.closeModal() | 121 | this.couponModal.closeModal() |
| 120 | }, | 122 | }, |
| 121 | // 页面滚动事件 | 123 | // 页面滚动事件 |
| @@ -653,6 +655,7 @@ Page({ | @@ -653,6 +655,7 @@ Page({ | ||
| 653 | themeColor, | 655 | themeColor, |
| 654 | lite_style:data.lite_style, | 656 | lite_style:data.lite_style, |
| 655 | timeList, | 657 | timeList, |
| 658 | + couponList, | ||
| 656 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 659 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 657 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 660 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 658 | } | 661 | } |
| @@ -861,7 +864,7 @@ Page({ | @@ -861,7 +864,7 @@ Page({ | ||
| 861 | }) | 864 | }) |
| 862 | }, | 865 | }, |
| 863 | // 根据券ID获取券详情 | 866 | // 根据券ID获取券详情 |
| 864 | - getActivityByIdFun(obj) { | 867 | + getActivityByIdFun(obj,setcoupon) { |
| 865 | App.Activity.GetActivityById({ | 868 | App.Activity.GetActivityById({ |
| 866 | id: obj.map(item => item.id).join(','), | 869 | id: obj.map(item => item.id).join(','), |
| 867 | }).then(res => { | 870 | }).then(res => { |
| @@ -905,7 +908,7 @@ Page({ | @@ -905,7 +908,7 @@ Page({ | ||
| 905 | return item.is_type == '3' | 908 | return item.is_type == '3' |
| 906 | }) | 909 | }) |
| 907 | // 免费券判断是否领取,弹框领取 | 910 | // 免费券判断是否领取,弹框领取 |
| 908 | - if (freeCoupons.length > 0) { | 911 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 909 | let length = freeCoupons.length - 1 | 912 | let length = freeCoupons.length - 1 |
| 910 | freeCoupons.forEach(i => { | 913 | freeCoupons.forEach(i => { |
| 911 | this.getCoupon(i, freeCoupons[length].id, obj) | 914 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -75,6 +75,7 @@ Page({ | @@ -75,6 +75,7 @@ Page({ | ||
| 75 | isPaymenBtn:'',//支付定金按钮 | 75 | isPaymenBtn:'',//支付定金按钮 |
| 76 | isShareItem:'',//转发客人按钮 | 76 | isShareItem:'',//转发客人按钮 |
| 77 | couponArr: [],//待领取的优惠券列表 | 77 | couponArr: [],//待领取的优惠券列表 |
| 78 | + couponList:[],//优惠券列表 | ||
| 78 | }, | 79 | }, |
| 79 | tablestr: '', | 80 | tablestr: '', |
| 80 | urlsValue: [], | 81 | urlsValue: [], |
| @@ -122,8 +123,9 @@ Page({ | @@ -122,8 +123,9 @@ Page({ | ||
| 122 | closeModal() { | 123 | closeModal() { |
| 123 | this.modal.closeModal() | 124 | this.modal.closeModal() |
| 124 | }, | 125 | }, |
| 125 | - // 关闭优惠券弹框 | 126 | + // 关闭优惠券弹框(更新已被领取数量) |
| 126 | closeCouponModal() { | 127 | closeCouponModal() { |
| 128 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 127 | this.couponModal.closeModal() | 129 | this.couponModal.closeModal() |
| 128 | }, | 130 | }, |
| 129 | // 页面滚动事件 | 131 | // 页面滚动事件 |
| @@ -687,6 +689,7 @@ Page({ | @@ -687,6 +689,7 @@ Page({ | ||
| 687 | colors, | 689 | colors, |
| 688 | lite_style:data.lite_style, | 690 | lite_style:data.lite_style, |
| 689 | timeList, | 691 | timeList, |
| 692 | + couponList, | ||
| 690 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 693 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 691 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 694 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 692 | } | 695 | } |
| @@ -895,7 +898,7 @@ Page({ | @@ -895,7 +898,7 @@ Page({ | ||
| 895 | }) | 898 | }) |
| 896 | }, | 899 | }, |
| 897 | // 根据券ID获取券详情 | 900 | // 根据券ID获取券详情 |
| 898 | - getActivityByIdFun(obj) { | 901 | + getActivityByIdFun(obj,setcoupon) { |
| 899 | App.Activity.GetActivityById({ | 902 | App.Activity.GetActivityById({ |
| 900 | id: obj.map(item => item.id).join(','), | 903 | id: obj.map(item => item.id).join(','), |
| 901 | }).then(res => { | 904 | }).then(res => { |
| @@ -939,7 +942,7 @@ Page({ | @@ -939,7 +942,7 @@ Page({ | ||
| 939 | return item.is_type == '3' | 942 | return item.is_type == '3' |
| 940 | }) | 943 | }) |
| 941 | // 免费券判断是否领取,弹框领取 | 944 | // 免费券判断是否领取,弹框领取 |
| 942 | - if (freeCoupons.length > 0) { | 945 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 943 | let length = freeCoupons.length - 1 | 946 | let length = freeCoupons.length - 1 |
| 944 | freeCoupons.forEach(i => { | 947 | freeCoupons.forEach(i => { |
| 945 | this.getCoupon(i, freeCoupons[length].id, obj) | 948 | this.getCoupon(i, freeCoupons[length].id, obj) |
| @@ -36,6 +36,7 @@ Page({ | @@ -36,6 +36,7 @@ Page({ | ||
| 36 | dataStr: Date.now() * 1 / 1000, | 36 | dataStr: Date.now() * 1 / 1000, |
| 37 | StyleType:'', | 37 | StyleType:'', |
| 38 | couponArr: [],//待领取的优惠券列表 | 38 | couponArr: [],//待领取的优惠券列表 |
| 39 | + couponList:[],//优惠券列表 | ||
| 39 | }, | 40 | }, |
| 40 | couponModal: '', | 41 | couponModal: '', |
| 41 | /** | 42 | /** |
| @@ -55,8 +56,9 @@ Page({ | @@ -55,8 +56,9 @@ Page({ | ||
| 55 | this.couponModal = this.selectComponent("#couponModal"); | 56 | this.couponModal = this.selectComponent("#couponModal"); |
| 56 | this.couponModal.showModal() | 57 | this.couponModal.showModal() |
| 57 | }, | 58 | }, |
| 58 | - // 关闭优惠券弹框 | 59 | + // 关闭优惠券弹框(更新已被领取数量) |
| 59 | closeCouponModal() { | 60 | closeCouponModal() { |
| 61 | + this.getActivityByIdFun(this.data.couponList,'1') | ||
| 60 | this.couponModal.closeModal() | 62 | this.couponModal.closeModal() |
| 61 | }, | 63 | }, |
| 62 | // 获取商家是否收藏状态 | 64 | // 获取商家是否收藏状态 |
| @@ -201,6 +203,7 @@ Page({ | @@ -201,6 +203,7 @@ Page({ | ||
| 201 | couponList, | 203 | couponList, |
| 202 | StyleType, | 204 | StyleType, |
| 203 | titleType, | 205 | titleType, |
| 206 | + couponList, | ||
| 204 | } | 207 | } |
| 205 | console.log('获取数据', { | 208 | console.log('获取数据', { |
| 206 | ...obj | 209 | ...obj |
| @@ -248,7 +251,7 @@ Page({ | @@ -248,7 +251,7 @@ Page({ | ||
| 248 | }) | 251 | }) |
| 249 | }, | 252 | }, |
| 250 | // 根据券ID获取券详情 | 253 | // 根据券ID获取券详情 |
| 251 | - getActivityByIdFun(obj) { | 254 | + getActivityByIdFun(obj,setcoupon) { |
| 252 | App.Activity.GetActivityById({ | 255 | App.Activity.GetActivityById({ |
| 253 | id: obj.map(item => item.id).join(','), | 256 | id: obj.map(item => item.id).join(','), |
| 254 | }).then(res => { | 257 | }).then(res => { |
| @@ -292,7 +295,7 @@ Page({ | @@ -292,7 +295,7 @@ Page({ | ||
| 292 | return item.is_type == '3' | 295 | return item.is_type == '3' |
| 293 | }) | 296 | }) |
| 294 | // 免费券判断是否领取,弹框领取 | 297 | // 免费券判断是否领取,弹框领取 |
| 295 | - if (freeCoupons.length > 0) { | 298 | + if (freeCoupons.length > 0 && setcoupon!='1') { |
| 296 | let length = freeCoupons.length - 1 | 299 | let length = freeCoupons.length - 1 |
| 297 | freeCoupons.forEach(i => { | 300 | freeCoupons.forEach(i => { |
| 298 | this.getCoupon(i, freeCoupons[length].id, obj) | 301 | this.getCoupon(i, freeCoupons[length].id, obj) |
-
Please register or login to post a comment