Commit 384f643dedf2ef48879e51b65779c6b63f147dc2

Authored by pengye
1 parent b7909fb4

新增付费券、免费券(商家详情页、商家有礼页、付费券详情、免费券详情)

... ... @@ -27,13 +27,16 @@
{{use.dish}}
</text>
</view>
<view class="info">
<view class="info" wx:if="{{detail.desc && detail.desc!='0'}}">
<view class="info_left font32r">
券要求
</view>
<view class="info_right text_info font32r">
<view wx:if="{{detail.is_type == '1' || detail.is_type == '2'}}" class="info_right text_info font32r">
{{detail.desc}}
</view>
<view wx:else class="info_right text_info font32r">
消费满{{detail.desc}}元可用
</view>
</view>
<view class="info">
<view class="info_left font32r">
... ... @@ -53,21 +56,26 @@
</view>
<view class="info info2">
<view class="info_left font32r">
使用限制:
</view>
<view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" >
无限制
</view>
<view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" >
每周指定日期可用
</view>
<view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" >
会员生日当天
</view>
{{(detail.is_type == '1' || detail.is_type == '2' || exp_date.week_show=='无') ? '使用限制:' : '不可用日期:'}}
</view>
<block wx:if="{{detail.is_type == '1' || detail.is_type == '2'}}">
<view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" >
无限制
</view>
<view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" >
每周指定日期可用
</view>
<text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" >
{{exp_date.week_show?exp_date.week_show:''}}
</text>
<view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" >
会员生日当天
</view>
</block>
<block wx:if="{{detail.is_type == '3' || detail.is_type == '4'}}">
<text wx:if="{{exp_date.week_show}}" class="info_right text_info font32r" >{{exp_date.week_show!='无'?exp_date.week_show:'无使用时间限制'}}</text>
</block>
</view>
<text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" >
{{exp_date.week_show?exp_date.week_show:''}}
</text>
<!-- is_type 1店铺优惠券 需要判断优惠券剩余数量 2个人优惠券不需要判断数量 -->
<view class="info" wx:if="{{detail.grant_last && detail.grant_last>0 && detail.is_type=='1'}}">
<view class="info_left font32r">
... ...
... ... @@ -25,7 +25,7 @@ page {
}
.info_left {
width:40% ;
flex-shrink:0;
color: #515151;
font-family: PingFang SC;
}
... ...
// pack-activity/pack/receiveCoupon.js
import util from '../../utils/util';
import App from '../../utils/api';
Page({
/**
* 页面的初始数据
*/
data: {
opt: {},
dataStr: Date.now() * 1 / 1000,
detail: {},
exp_date: {},
resultCoupon: '', //0未领取 1已领取
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('options', options);
var obj = {};
if (options.scene) {
let scene = decodeURIComponent(options.scene);
console.log('scene', scene);
for (var i = 0; i < scene.split('&').length; i++) {
var arr = scene.split('&')[i].split('=');
obj[arr[0]] = arr[1];
}
}
console.log('obj', {
...obj
});
this.setData({
opt: {
id: options.id || obj.id,
sid: options.sid || obj.sid,
oid: options.oid,
types: options.types || obj.types, //1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是提前点餐 3是商家APP分享的或者短信的链接
rid: options.rid ? options.rid : '',
}
})
console.log('opt', {
...this.data.opt
});
},
// 购买完成券之后关注公众号
wananchi() {
wx.navigateTo({
url: '/pages/me/wananchi'
})
},
// 提交订单
submitOrder: util.throttle(function () {
if (this.data.dataStr > (this.data.detail.etime * 1)) {
return wx.showToast({
title: '优惠券已过期,不可购买!',
duration: 2000,
mask: true,
icon: 'none'
})
}
// is_type 1店铺优惠券 需要判断优惠券剩余数量 2个人优惠券不需要判断数量 3免费券 4付费券
if (this.data.detail.grant_last == '0' && this.data.detail.is_type == '3') {
return wx.showToast({
title: '您来晚了,当前优惠券已经售罄,请与商家联系!',
duration: 2000,
mask: true,
icon: 'none'
})
}
let detail = this.data.detail
detail.name = this.data.sellername;
detail.oid = this.data.opt.oid;
App.Activity.SetActivityAsReserve({
aid: this.data.opt.id,
rid: this.data.opt.oid,
}).then((json) => {
if (json.ret == 200) {
util.toast('领取成功', 'none');
} else {
wx.showToast({
title: res.msg,
duration: 2000,
mask: true
})
}
})
}, 3000),
// 获取券信息
getDetail() {
App.Activity.GetActivityById({
id: this.data.opt.id
}).then(res => {
if (res.data.length > 0) {
let detail = res.data[0];
let exp_date = util.determine(detail.exp_date);
detail.arule = detail.arule ? util.determine(detail.arule) : '';
if (exp_date && exp_date.week_data) {
let noon = this.hasConsecutiveSelect(exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(exp_date.week_data, '2').rArr.join('、')
if (noon) noon = '午餐:' + noon
if (nig) nig = '晚餐:' + nig
detail.noonText = noon;
detail.nigText = nig;
}
if (detail.arule && detail.arule.is_share_lose == '0') {
wx.hideShareMenu()
}
this.setData({
detail,
exp_date,
})
}
})
},
// 获取店铺名称
getSellerDetail() {
App.Customer.GetSellerDetail({
sid: this.data.opt.sid
}).then(res => {
this.setData({
sellername: res.data.sellername
})
})
},
// 处理优惠券不可用日期数据
hasConsecutiveSelect(arr, type) {
let firstTitle = null;
let lastTitle = null;
let rArr = []
let num = 0
for (let i = 0; i < arr.length; i++) {
let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig
if (str) {
rArr.push(arr[i].title)
num++
if (num == 1) {
firstTitle = arr[i].title
}
if (num >= 5) {
lastTitle = arr[i].title
}
if (num >= 5 && i >= (arr.length - 1)) {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
} else {
if (num < 5) {
num = 0
firstTitle = null;
lastTitle = null;
} else {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
}
}
return {
rArr,
lastTitle,
firstTitle
};
},
sharesetting() {
let data = this.data.opt;
let detail = this.data.detail;
return {
title: `送你${this.data.sellername}${detail.price}元代金券,点击查看详情,领取到卡包吧!`,
path: `/pack-activity/pack/receiveCoupon?id=${data.id}&oid=${data.oid}&rid=${data.rid}&sid=${data.sid}&types=${data.types}`,
imageUrl: 'https://nosqn.colorcun.com/share_money.png',
}
},
// 是否已领取
getCoupon() {
App.Activity.ActivityListByOpenid({
aid: this.data.opt.id
}).then(res => {
if (res.ret === 200) {
this.setData({
resultCoupon: res.data.length > 0 ? '1' : '0',
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
this.getDetail();
this.getSellerDetail();
this.getCoupon()
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
return this.sharesetting();
}
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"usingComponents": {
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pack-activity/pack/receiveCoupon.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav>代金券详情</nav>
<view class="top_box">
<image src="https://qn.colorcun.com/voucherIcon1.png" mode="" />
<view class="texts">
<view class="font36r textName">{{detail.aname}}</view>
<view class="font24r threshold">¥<text class="priceText">{{detail.price}}</text><text class="font24r" wx:if="{{detail.desc!='0'}}">满{{detail.desc}}元可用</text></view>
</view>
<view class="font24r receive" wx:if="{{resultCoupon == '1'}}">已领取</view>
</view>
<view class="center_box">
<view class="centerMain">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
<text class="font28r">有效期</text>
</view>
<view class="info font24r">{{util.unixtoTime(detail.stime,'YYYY-MM-DD')}}<text>至</text>{{util.unixtoTime(detail.etime,'YYYY-MM-DD')}}</view>
</view>
<view class="centerMain">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_2.png" mode="" />
<text class="font28r">不可用日期</text>
</view>
<view wx:if="{{detail.noonText}}" class="info font24r">{{detail.noonText}}</view>
<view wx:if="{{detail.nigText}}" class="info font24r">{{detail.nigText}}</view>
<view wx:if="{{!detail.noonText && !detail.nigText}}" class="info font24r">无限制</view>
</view>
<view class="centerMain centerMain3" wx:if="{{detail.aexpiration}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
<text class="font28r">使用规则</text>
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_same_day == '1' ? '领取当日可用' : '领取当日不可用'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_accumulation == '1' ? '可以叠加使用其他优惠券' : '不可以叠加使用其他优惠券'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_compartment == '1' ? '可用于包间消费' : '不可用于包间消费'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_eatin == '1' ? '堂食可用' : '不可用于堂食消费'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_takeout == '1' ? '外带可用' : '不可用于外带'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.is_appointment == '1' ? '需要提前预约' : '不需要提前预约'}}
</view>
</view>
<view class="centerMain">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_4.png" mode="" />
<text class="font28r">分享规则</text>
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.arule.is_share_lose == '1'? '可以分享给好友' : '不能分享给好友'}}
</view>
<view class="info font24r">
<view class="drop"></view>{{detail.arule.is_share_have == '1'? '分享给好友后继续拥有此券' : '分享给好友后不再拥有此券'}}
</view>
<view class="info font24r" wx:if="{{detail.arule.commission != '0'}}">
<view class="drop"></view>分享给好友领券核销后,获得实际消费{{detail.arule.commission}}%佣金
</view>
</view>
<view class="centerMain" wx:if="{{detail.explain}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_5.png" mode="" />
<text class="font28r">其他说明</text>
</view>
<view class="info font24r">{{detail.explain}}</view>
</view>
</view>
<view class="bottom_box_wrap">
<view class="bottom_box">
<view class="font24r">温馨提示:</view>
<view class="font24r">到店消费时,请您扫描商家二维码付款时,可以直接识别并使用优惠券</view>
<view class="font24r">2、从<text class="bold_box">周到安排</text>微信小程序,<text class="bold_box">“我的-卡券”</text>中,可以找到您的卡券。</view>
<view class="font24r">3、您也可以关注<text class="bold_box">周到安排</text>公众号,获取更多优惠券信息</view>
<view class="font28r publicity" bindtap="wananchi">关注<text class="bold_box">周到安排</text>公众号,及时获取更多优惠券动态<view class="more" style="margin-left: 20rpx;"></view>
</view>
</view>
</view>
<view class="sharewidth" wx:if="{{resultCoupon == '0' || detail.arule.is_share_lose == '1'}}">
<button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
<image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
<text class="font24r">分享</text>
</button>
<view class="btns">
<view wx:if="{{resultCoupon == '0'}}" class="btn font36r" bindtap="submitOrder">领取到卡包</view>
</view>
</view>
\ No newline at end of file
... ...
/* pack-activity/pack/receiveCoupon.wxss */
page {
background: #F5F5F5;
}
.top_box {
background: #fff;
display: flex;
padding: 20rpx 40rpx;
margin-bottom: 2rpx;
}
.top_box image {
width: 120rpx;
height: 120rpx;
}
.textName {
font-weight: 600;
margin-bottom: 26rpx;
}
.threshold .priceText {
font-size: 56rpx;
font-weight: 600;
margin-right: 12rpx;
}
.top_box .texts {
flex: 1;
margin-left: 32rpx;
}
.threshold {
color: #FD4D59;
font-weight: 400;
}
.receive {
display: flex;
align-items: flex-end;
color: #999999;
}
.center_box {
border-radius: 20rpx;
background: #ffffff;
padding: 40rpx;
margin: 20rpx;
}
.title {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.title text {
letter-spacing: 2rpx;
}
.title image {
width: 26rpx;
height: 26rpx;
margin-right: 14rpx;
}
.centerMain3 image {
width: 22rpx;
}
.centerMain {
margin-bottom: 40rpx;
}
.centerMain .drop {
width: 8rpx;
height: 8rpx;
background: #575757;
border-radius: 50%;
position: absolute;
left: -23rpx;
top: 45%;
}
.centerMain:nth-last-of-type(1) {
margin-bottom: 0;
}
.title text {
font-weight: 600;
}
.info {
margin-left: 44rpx;
color: #575757;
letter-spacing: 2rpx;
position: relative;
line-height: 40rpx;
}
.bottom_box {
border-radius: 16rpx;
background: #fff;
padding: 40rpx 40rpx 36rpx 40rpx;
box-sizing: border-box;
margin: 0 20rpx;
}
.bottom_box_wrap {
padding-bottom: 180rpx;
}
.bottom_box view {
color: #515151;
font-family: PingFang SC;
line-height: 40rpx;
}
.bold_box {
font-size: 28rpx;
font-weight: bold;
color: #000;
}
.publicity {
margin-top: 14rpx;
display: flex;
align-items: center;
padding: 20rpx 0;
}
.sharewidth {
position: fixed;
left: 0;
bottom: 0;
height: 160rpx;
padding: 40rpx 32rpx;
background: #fff;
box-sizing: border-box;
z-index: 100;
width: 100%;
display: flex;
}
.btns {
flex: 1;
display: flex;
justify-content: flex-end;
}
.shareBtn {
display: flex;
flex-direction: column;
font-weight: 600;
margin-left: 40rpx;
background: transparent;
}
.shareBtn image {
width: 40rpx;
height: 40rpx;
}
.btn {
color: #fff;
padding: 0 60rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
background: linear-gradient(90.98deg, #f41919 0.25%, #ff7426 120.07%);
}
\ No newline at end of file
... ...
... ... @@ -116,54 +116,43 @@ Page({
let data = res.data
console.log('data', data);
let couponList = []
let StyleType, marketing, coupon, is_comments;
let StyleType, marketing, coupon, coupon_data_pay, coupon_data_free, is_comments;
marketing = util.determine(data.marketing);
StyleType = data.type;
if (marketing) {
is_comments = marketing.is_comments ? marketing.is_comments : '';
coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : '';
coupon = (marketing.coupon_data && marketing.is_coupon == '1') ? util.determine(marketing.coupon_data) : '';
coupon_data_pay = (marketing.coupon_data_pay && marketing.is_coupon_pay == '1') ? util.determine(marketing.coupon_data_pay) : '';
marketing.coupon_data_payList = coupon_data_pay
coupon_data_free = (marketing.coupon_data_free && marketing.is_coupon_free == '1') ? util.determine(marketing.coupon_data_free) : '';
marketing.coupon_data_freeList = coupon_data_free
let info = marketing.coupon_data_comments ? util.determine(marketing.coupon_data_comments) : '';
let couponDataId = info && info.length > 0 ? info[0].id : {}
// 根据券ID获取评价赠送的券详情
if(couponDataId) this.getEvaluateFun(couponDataId)
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
couponList.push({
id: coupon.id
});
}
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
couponList.push({
id: item.id
})
})
}
// 获取全部的优惠券(商家券、个人券、免费券、付费券)
couponList = this.addCoupons(coupon,couponList);
couponList = this.addCoupons(coupon_data_pay,couponList);
couponList = this.addCoupons(coupon_data_free,couponList);
// 根据券ID获取券详情
this.getActivityByIdFun(couponList)
// 根据充值ID获取充值详情
if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) {
this.getRechargeDetail(marketing.recharge_data.id)
}
let obj = {
marketing,
coupon,
couponList,
is_comments,
StyleType,
}
console.log('获取数据', {
...obj
});
// 根据券ID获取券详情
this.getActivityByIdFun(couponList, couponList.length)
// 根据充值ID获取充值详情
if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) {
this.getRechargeDetail(marketing.recharge_data.id)
}
this.setData({
marketing,
coupon,
is_comments,
couponList,
StyleType,
...obj
})
}).catch(res => {
console.log('GetSellerTemplateConf请求失败');
... ... @@ -217,14 +206,15 @@ Page({
})
},
// 根据券ID获取券详情
getActivityByIdFun(ids, length) {
let coupon_dataList = [];
ids.forEach(i => {
App.Activity.GetActivityById({
id: i.id
}).then(res => {
if (res.data.length > 0) {
let detail = res.data[0];
getActivityByIdFun(obj) {
App.Activity.GetActivityById({
id: obj.map(item => item.id).join(','),
}).then(res => {
if (res.data.length > 0) {
let list = res.data.filter(item => {
return this.data.dataStr < (item.etime * 1) && item.is_open == '1'
})
list.forEach(detail => {
detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
... ... @@ -233,18 +223,97 @@ Page({
let price = detail.price * 1;
detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
coupon_dataList.push(detail);
if (length === coupon_dataList.length) {
coupon_dataList = coupon_dataList.filter(item=>{return this.data.dataStr<(item.etime*1) && item.is_open == '1'})
console.log('邀请函--------------------优惠券',coupon_dataList);
this.setData({
coupon_dataList,
})
}
}
})
let num = detail.receiveNum;
if (num > 0) {
detail.receiveNumText = ''
if (num >= 0 && num <= 100) {
detail.receiveNumText = num.toString();
} else if (num >= 101 && num <= 199) {
detail.receiveNumText = '100+';
} else if (num >= 200 && num <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
if (noon) noon = '午餐:' + noon
if (nig) nig = '晚餐:' + nig
detail.noonText = noon;
detail.nigText = nig;
}
})
console.log('邀请函--------------------优惠券', list);
this.setData({
coupon_dataList: list,
})
}
})
},
// 获取所有的券并且展示
addCoupons(coupons, couponList) {
if (coupons && util.getType(coupons) == 'object') {
couponList.push({
id: coupon.id,
number: coupon.number
});
}
if (coupons && util.getType(coupons) === 'array' && coupons.length > 0) {
coupons.forEach(item => {
couponList.push({
id: item.id,
number: item.number
});
});
}
return couponList
},
// 处理优惠券不可用日期数据
hasConsecutiveSelect(arr, type) {
let firstTitle = null;
let lastTitle = null;
let rArr = []
let num = 0
for (let i = 0; i < arr.length; i++) {
let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig
if (str) {
rArr.push(arr[i].title)
num++
if (num == 1) {
firstTitle = arr[i].title
}
if (num >= 5) {
lastTitle = arr[i].title
}
if (num >= 5 && i >= (arr.length - 1)) {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
} else {
if (num < 5) {
num = 0
firstTitle = null;
lastTitle = null;
} else {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
}
}
return {
rArr,
lastTitle,
firstTitle
};
},
/**
* 生命周期函数--监听页面隐藏
*/
... ...
<!--pages/reserve/sellerGift.wxml-->
<import src="../tpl/invitation"></import>
<nav id='nav'>商家有礼</nav>
<view class="box" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<view class="title">
<view class="box" wx:if="{{hasValueCertificate && coupon_dataList.length>0}}">
<view class="title" wx:if="{{options.form == '1'}}">
<view class="sign"></view><text class="font32r">专属优惠券</text>
</view>
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{options.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
<text wx:if="{{item.use.is_dish=='1'}}" class="discountText font24r">特惠菜品</text>
<text wx:if="{{item.use.is_discount=='1'}}" class="discountText font24r">超值折扣</text>
<view class="priceText" wx:if="{{item.price}}">
<text class="icons font40r">¥</text><text>{{item.price}}</text>
</view>
</view>
<view class="itemRight">
<view class="btns">
<text class="font40r">{{item.aname}}</text>
<view class="font24r orderingFood">
抢购
<navigator url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{options.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="couponWrap">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text>
</view>
<view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view>
</view>
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font40r">{{item.aname}}</text>
<block wx:if="{{item.is_type == '1' || item.is_type == '2'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r">{{item.nigText}}</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottom font24r">消费满{{item.desc}}元可用</view>
</block>
</view>
<view class="btnBox" wx:if="{{item.is_type == '3'}}" >
<view class="font24r orderingFood orderingFood1">已领取</view>
<view class="grantNum" wx:if="{{item.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r"><text>{{item.receiveNumText}}</text>张</view>
</view>
</view>
<view wx:if="{{item.is_type != '3'}}" class="font24r orderingFood">
立即抢购
</view>
</view>
</view>
</view>
</navigator>
</block>
</view>
<view class="box" wx:if="{{hasValueRecharge && marketing && marketing.is_recharge=='1' && recharge_data}}">
<view class="box" wx:if="{{options.form == '1' && hasValueRecharge && recharge_data}}">
<view class="title">
<view class="sign"></view><text class="font32r">会员充值优惠</text>
</view>
... ... @@ -62,7 +79,7 @@
</navigator>
</view>
<!-- 启用评价 && 是否评价过 && 评价赠送优惠券 && 赠送的优惠券有数据-->
<view class="box" wx:if="{{is_comments=='1' && !is_user_comments && marketing.is_comments_coupon=='1' && couponData && couponData.showCoupon =='1'}}">
<view class="box" wx:if="{{options.form == '1' && is_comments=='1' && !is_user_comments && marketing.is_comments_coupon=='1' && couponData && couponData.showCoupon =='1'}}">
<view class="title">
<view class="sign"></view><text class="font32r">反馈有礼</text>
</view>
... ...
... ... @@ -39,6 +39,120 @@ page {
background: #F8F9FD;
}
.couponWrap {
display: flex;
background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%);
margin-bottom: 20rpx;
min-height: 160rpx;
padding-bottom: 10rpx;
border-radius: 20rpx;
border: 2rpx solid #ff7e06;
}
.couponWrap .itemRight {
width: 74%;
display: flex;
align-items: center;
flex-direction:row;
}
.couponWrap .bottom {
margin-top: 10rpx;
width: 100%;
color: #C36607;
font-family: PingFang SC;
font-weight: 500;
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: left;
}
.couponWrap .itemLeft {
width: 26%;
}
.couponWrap .couponLine{
margin: 24rpx 0;
border-right: 2rpx dashed #f6231b;
}
.couponWrap .orderingFood {
padding: 0 20rpx;
color: #fff !important;
border: none !important;
text-align: center;
border-radius: 20rpx;
line-height: 44rpx;
height: 44rpx;
width: max-content;
flex-shrink: 0;
background: linear-gradient(94.4deg, #f41919 2.72%, #ff7426 122.17%);
}
.couponWrap .icons {
color: #F6231B !important;
text-align: center;
}
.couponWrap .priceText {
display: flex;
align-items: baseline;
justify-content: center;
font-family: PingFang SC;
color: #F6231B;
font-weight: 600;
font-size: 48rpx;
margin-top: 6rpx;
}
.couponWrap .priceText text {
font-size: 48rpx;
}
.couponWrap .btns {
flex: 1;
margin: 24rpx 20rpx 0 0;
display: flex;
justify-content: space-between;
align-items: baseline;
flex-direction: column;
}
.couponWrap .btnBox {
display: flex;
flex-direction: column;
}
.couponWrap .grantNum {
display: flex;
flex-direction: column;
align-items: center;
color: #C36607;
margin-top: 10rpx;
}
.couponWrap .grantNum text {
color: #F6231B;
margin-right: 10rpx;
}
.couponWrap .btns text {
font-weight: 600;
}
.couponWrap .orderingFood1 {
border: 2rpx solid #fa4b20 !important;
background: transparent !important;
color: #fa4b20 !important;
}
.couponWrap .itemLeft {
background: transparent;
}
.couponWrap .discountText {
background: #F6231B;
}
.itemLeft {
width: 30%;
display: flex;
... ...
... ... @@ -35,8 +35,9 @@ Page({
coupon_dataList:[],
dataStr: Date.now() * 1 / 1000,
StyleType:'',
couponArr: [],//待领取的优惠券列表
},
couponModal: '',
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -51,6 +52,12 @@ Page({
this.getIsCollectionSellerFun(sid)
this.getSellerVersionFun(sid)
}
this.couponModal = this.selectComponent("#couponModal");
this.couponModal.showModal()
},
// 关闭优惠券弹框
closeCouponModal() {
this.couponModal.closeModal()
},
// 获取商家是否收藏状态
getIsCollectionSellerFun(sid) {
... ... @@ -150,7 +157,7 @@ Page({
let data = res.data
console.log('data', data);
let couponList = []
let titleType, home, chef, signboard, store, marketing, coupon, reserve, StyleType;
let titleType, home, chef, signboard, store, marketing, coupon, coupon_data_pay, coupon_data_free, reserve, StyleType;
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
signboard = util.determine(data.signboard);
... ... @@ -158,30 +165,27 @@ Page({
home = util.determine(data.home);
marketing = util.determine(data.marketing);
titleType = data.title_class || '1';
StyleType = data.type;if (store) store.content = (store.is_introduce_all == '1' && store.content) ? util.determine(store.content) : '';
StyleType = data.type;
if (store) store.content = (store.is_introduce_all == '1' && store.content) ? util.determine(store.content) : '';
if (chef) chef.content = (chef.is_introduce_all == '1' && chef.content) ? util.determine(chef.content) : '';
if (signboard) signboard.content = (signboard.is_introduce_all == '1' && signboard.content) ? util.determine(signboard.content) : '';
if (reserve) reserve.content = (reserve.is_introduce_all == '1' && reserve.content) ? util.determine(reserve.content) : '';
if (home) home.image = (home && home.image && (!home.id_first_image || home.id_first_image!='0')) ? home.image : '';
if (marketing) {
marketing.logo = (marketing.logo && (!marketing.is_logo || marketing.is_logo!='0')) ? marketing.logo : '';
coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : '';
coupon = (marketing.coupon_data && marketing.is_coupon == '1') ? util.determine(marketing.coupon_data) : '';
coupon_data_pay = (marketing.coupon_data_pay && marketing.is_coupon_pay == '1') ? util.determine(marketing.coupon_data_pay) : '';
marketing.coupon_data_payList = coupon_data_pay
coupon_data_free = (marketing.coupon_data_free && marketing.is_coupon_free == '1') ? util.determine(marketing.coupon_data_free) : '';
marketing.coupon_data_freeList = coupon_data_free
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
couponList.push({
id: coupon.id
});
}
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
couponList.push({
id: item.id
})
})
}
}
// 获取全部的优惠券(商家券、个人券、免费券、付费券)
couponList = this.addCoupons(coupon,couponList);
couponList = this.addCoupons(coupon_data_pay,couponList);
couponList = this.addCoupons(coupon_data_free,couponList);
// 根据券ID获取券详情
this.getActivityByIdFun(couponList)
if (store && store.images && store.images.length > 0) store.images = util.determine(store.images);
if (reserve && reserve.park_info_images && reserve.park_info_images.length > 0) reserve.park_info_images = util.determine(reserve.park_info_images);
if (signboard && signboard.images) signboard.images = util.determine(signboard.images);
... ... @@ -201,8 +205,6 @@ Page({
console.log('获取数据', {
...obj
});
// 根据券ID获取券详情
this.getActivityByIdFun(couponList, couponList.length)
// 根据充值ID获取充值详情
if (marketing && marketing.is_recharge == '1' && marketing.recharge_data) {
this.getRechargeDetail(marketing.recharge_data.id)
... ... @@ -245,35 +247,172 @@ Page({
})
})
},
// 根据券ID获取券详情
getActivityByIdFun(ids, length) {
let coupon_dataList = [];
ids.forEach(i => {
App.Activity.GetActivityById({
id: i.id
}).then(res => {
if (res.data.length > 0) {
let detail = res.data[0];
detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) {
let cash = detail.use.cash * 1;
let price = detail.price * 1;
detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
coupon_dataList.push(detail);
if (length === coupon_dataList.length) {
coupon_dataList = coupon_dataList.filter(item=>{return this.data.dataStr<(item.etime*1) && item.is_open == '1'})
console.log('商家详情--------------------优惠券',coupon_dataList);
this.setData({
coupon_dataList,
})
}
}
})
})
},
// 根据券ID获取券详情
getActivityByIdFun(obj) {
App.Activity.GetActivityById({
id: obj.map(item => item.id).join(','),
}).then(res => {
if (res.data.length > 0) {
let list = res.data.filter(item => {
return this.data.dataStr < (item.etime * 1) && item.is_open == '1'
})
list.forEach(detail => {
detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) {
let cash = detail.use.cash * 1;
let price = detail.price * 1;
detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
let num = detail.receiveNum;
if (num > 0) {
detail.receiveNumText = ''
if (num >= 0 && num <= 100) {
detail.receiveNumText = num.toString();
} else if (num >= 101 && num <= 199) {
detail.receiveNumText = '100+';
} else if (num >= 200 && num <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
if (noon) noon = '午餐:' + noon
if (nig) nig = '晚餐:' + nig
detail.noonText = noon;
detail.nigText = nig;
}
})
let freeCoupons = list.filter(item => {
return item.is_type == '3'
})
// 免费券判断是否领取,弹框领取
if (freeCoupons.length > 0) {
let length = freeCoupons.length - 1
freeCoupons.forEach(i => {
this.getCoupon(i, freeCoupons[length].id, obj)
})
}
console.log('邀请函--------------------优惠券', list);
this.setData({
coupon_dataList: list,
})
}
})
},
// 获取所有的券并且展示
addCoupons(coupons, couponList) {
if (coupons && util.getType(coupons) == 'object') {
couponList.push({
id: coupon.id,
number: coupon.number
});
}
if (coupons && util.getType(coupons) === 'array' && coupons.length > 0) {
coupons.forEach(item => {
couponList.push({
id: item.id,
number: item.number
});
});
}
return couponList
},
// 弹框领取免费券
setcouponFun(arr) {
let str = arr.flatMap(item => Array(item.number).fill(item.id)).join(',');
console.log('弹框领取免费券id', str);
// App.Activity.SetActivityAsReserve({
// aid: str,
// rid: this.id,
// }).then((json) => {
// if (json.ret != 200) {
// wx.showToast({
// title: res.msg,
// duration: 2000,
// mask: true
// })
// }
// })
},
// 免费券 0未领取 1已领取 获取未领取的组成数组couponArr
getCoupon(item, id, obj) {
let couponArr = this.data.couponArr;
let totalPrice = this.data.totalPrice;
App.Activity.ActivityListByOpenid({
aid: item.id
}).then(res => {
if (res.ret == 200) {
if (res.data.length == 0) {
couponArr.push(item)
}
if (item.id == id && couponArr.length > 0) {
couponArr.forEach(item => {
let match = obj.find(b => b.id === item.id);
if (match) {
item.number = match.number;
}
});
totalPrice = couponArr.reduce((sum, item) => sum + item.price * item.number, 0);
this.setcouponFun(couponArr)
this.couponModal.showModal()
}
console.log('未领取的券列表-----------', couponArr);
this.setData({
couponArr,
totalPrice
})
}
})
},
// 处理优惠券不可用日期数据
hasConsecutiveSelect(arr, type) {
let firstTitle = null;
let lastTitle = null;
let rArr = []
let num = 0
for (let i = 0; i < arr.length; i++) {
let str = type == '1' ? arr[i].selectNoon : arr[i].selectNig
if (str) {
rArr.push(arr[i].title)
num++
if (num == 1) {
firstTitle = arr[i].title
}
if (num >= 5) {
lastTitle = arr[i].title
}
if (num >= 5 && i >= (arr.length - 1)) {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
} else {
if (num < 5) {
num = 0
firstTitle = null;
lastTitle = null;
} else {
let fi = rArr.findIndex((item) => {
return item == firstTitle
})
rArr.splice(fi, num, firstTitle + '至' + lastTitle)
num = 0
}
}
}
return {
rArr,
lastTitle,
firstTitle
};
},
// 导航
looklocation: function () {
wx.reportMonitor('1015', 1)
... ...
... ... @@ -4,6 +4,7 @@
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav",
"titleStyle":"/components/titleStyle/titleStyle"
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal"
}
}
\ No newline at end of file
... ...
... ... @@ -19,6 +19,54 @@
</view>
</view>
</view>
<view class="preferential" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.sellName}}&use={{item.stringifyUse}}&sid={{sid}}&types=3&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="couponWrap">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text>
</view>
<view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view>
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font40r">{{item.aname}}</text>
<block wx:if="{{item.is_type == '1' || item.is_type == '2'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r">{{item.nigText}}</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottom font24r">消费满{{item.desc}}元可用</view>
</block>
</view>
<view class="btnBox" wx:if="{{item.is_type == '3'}}" >
<view class="font24r orderingFood orderingFood1">已领取</view>
<view class="grantNum" wx:if="{{item.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r"><text>{{item.receiveNumText}}</text>张</view>
</view>
</view>
<view wx:if="{{item.is_type != '3'}}" class="font24r orderingFood">
立即抢购
</view>
</view>
</view>
</navigator>
</block>
</view>
<view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.sellName}}&use={{item.stringifyUse}}&sid={{sid}}&types=3&StyleType={{StyleType}}" hover-class="navigator-hover">
... ... @@ -208,4 +256,23 @@
<navigator url="/pages/reserve/reserve?id={{sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
</block>
</view>
</view>
\ No newline at end of file
</view>
<my-modal id="couponModal" fadeStyle="slideUp" height="240px">
<view slot="modalName" class="titleModal {{(couponArr.length == '2' || couponArr.length < '2') ? 'titleModal2 ' : (couponArr.length == '4' || couponArr.length < '4') ? 'titleModal3 ' : (couponArr.length > '4') ? 'titleModal4' : '' }}">
<image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/>
<view class="nameInfo">{{seller.sellName}}</view>
<view class="couponTotal">赠送给您<text>{{totalPrice}}元</text>代金券</view>
</view>
<view slot="modalContent">
<view class="couponBox">
<view wx:for="{{couponArr}}" class="couponItems">
<view class="couponNum font20r">×{{item.number}}</view>
<view class="font36r couponPrice">¥<text>{{item.price}}</text></view>
<view class="couponLines"></view>
<view class="font28r couponCondition" wx:if="{{item.desc!='0'}}">消费满{{item.desc}}元可用</view>
<view class="font28r couponCondition" wx:else>无门槛</view>
</view>
</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -323,4 +323,272 @@
.videoBox video{
width: 100%;
box-sizing: border-box;
}
.couponWrap {
display: flex;
background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%);
min-height: 160rpx;
padding-bottom: 10rpx;
border-radius: 20rpx;
border: 2rpx solid #ff7e06;
margin: 0 20rpx 20rpx 20rpx;
}
.couponWrap .itemRight {
width: 74%;
display: flex;
align-items: center;
flex-direction:row;
padding-right: 10rpx;
margin-left: 18rpx;
}
.couponWrap .bottom {
margin-top: 10rpx;
width: 100%;
color: #C36607;
font-family: PingFang SC;
font-weight: 500;
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: left;
}
.couponWrap .itemLeft {
width: 26%;
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
border-top-left-radius: 20rpx;
border-bottom-left-radius: 20rpx;
}
.couponWrap .couponLine{
margin: 24rpx 0;
border-right: 2rpx dashed #f6231b;
}
.couponWrap .orderingFood {
padding: 0 20rpx;
color: #fff !important;
border: none !important;
text-align: center;
border-radius: 20rpx;
line-height: 44rpx;
height: 44rpx;
width: max-content;
flex-shrink: 0;
background: linear-gradient(94.4deg, #f41919 2.72%, #ff7426 122.17%);
}
.couponWrap .icons {
color: #F6231B !important;
text-align: center;
}
.couponWrap .priceText {
display: flex;
align-items: baseline;
justify-content: center;
font-family: PingFang SC;
color: #F6231B;
font-weight: 600;
font-size: 48rpx;
margin-top: 6rpx;
}
.couponWrap .priceText text {
font-size: 48rpx;
}
.couponWrap .btns {
flex: 1;
margin: 24rpx 20rpx 0 0;
display: flex;
justify-content: space-between;
align-items: baseline;
flex-direction: column;
}
.couponWrap .btnBox {
display: flex;
flex-direction: column;
}
.couponWrap .grantNum {
display: flex;
flex-direction: column;
align-items: center;
color: #C36607;
margin-top: 10rpx;
}
.couponWrap .grantNum text {
color: #F6231B;
margin-right: 10rpx;
}
.couponWrap .btns text {
font-weight: 600;
}
.couponWrap .orderingFood1 {
border: 2rpx solid #fa4b20 !important;
background: transparent !important;
color: #fa4b20 !important;
}
.couponWrap .discountText {
background: #F6231B;
text-align: center;
color: #FFEFC5;
border-radius: 6rpx;
font-family: PingFang SC;
background: #FD4D59;
width: max-content;
padding: 6rpx;
position: absolute;
left: 16rpx;
top: 12rpx;
}
#couponModal .titleModal {
margin-top: 30%;
position: relative;
}
#couponModal .titleModal2 {
margin: 80% auto 0 auto;
}
#couponModal .titleModal3 {
margin-top: 60%;
}
#couponModal .titleModal4 {
margin-top: 30%;
}
#couponModal .mymodal {
background: rgba(0, 0, 0, 0.8);
width: 100% !important;
top: 0 !important;
height: auto !important;
z-index: 300;
}
.nameInfo {
font-family: PingFang SC;
font-weight: 400;
font-size: 52rpx;
line-height: 56rpx;
color: #fff;
margin-bottom: 40rpx;
padding-top: 60rpx;
}
.couponTotal {
color: #dfdfdf;
font-family: PingFang SC;
font-weight: 400;
font-size: 40rpx;
line-height: 48rpx;
margin-bottom: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.couponTotal text {
color: #ffc806;
font-weight: 600;
font-size: 80rpx;
margin: 0 14rpx;
}
.couponBox {
width: 80%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
}
.couponItems {
width: 46%;
margin-bottom: 24rpx;
padding-bottom: 52rpx;
border-radius: 20rpx;
border: 2rpx solid #ff7e06;
background: linear-gradient(180deg, #ffefd0 0%, #ffdc9b 100%);
}
.couponNum {
background: #727272;
border-radius: 50%;
color: #fff;
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 8rpx 0 0 8rpx;
}
.couponPrice {
display: flex;
align-items: center;
justify-content: center;
color: #F6231B;
font-weight: 500;
}
.couponLines{
width: 80%;
margin: 0 auto;
height: 2rpx;
border-bottom: 2rpx dashed #F6231B;
}
.couponPrice text {
margin-left: 4rpx;
font-size: 76rpx;
font-weight: 700;
}
.couponCondition {
color: #C36607;
display: flex;
align-items: center;
justify-content: center;
padding-top: 24rpx;
}
.couponBtn {
width: 80%;
margin: 0 auto;
border-radius: 42rpx;
background: linear-gradient(90.98deg, #f41919 0.25%, #ff7426 120.07%);
font-weight: 400;
color: #fff;
text-align: center;
border: 4rpx solid #fff;
padding: 12rpx 0;
margin: 16rpx auto 20rpx auto;
}
.couponText {
color: #fff;
text-decoration: underline;
text-align: center;
}
.closeImg {
width: 60rpx;
height: 60rpx;
position: absolute;
right: 0;
top: 0;
}
\ No newline at end of file
... ...