diff --git a/packageB/pages/coupons/filter.wxs b/packageB/pages/coupons/filter.wxs new file mode 100644 index 0000000..94bb477 --- /dev/null +++ b/packageB/pages/coupons/filter.wxs @@ -0,0 +1,38 @@ +var numFr = { + getNum: function(x) { + var f = parseFloat(x); + if (isNaN(f)) { + return false; + } + var f = Math.round(x * 100) / 100; + var s = f.toString(); + var rs = s.indexOf('.'); + if (rs < 0) { + rs = s.length; + s += '.'; + } + while (s.length <= rs + 2) { + s += '0'; + } + return s; + }, + showBtnText: function(index) { + switch(index) { + case 1: { + return '已使用'; + break; + }; + case 2: { + return '已过期'; + break; + }; + default: { + return '立即使用'; + }; + }; + }, +} +module.exports = { + getNum: numFr.getNum, + showBtnText: numFr.showBtnText, +} \ No newline at end of file diff --git a/packageB/pages/coupons/query/index.js b/packageB/pages/coupons/query/index.js new file mode 100644 index 0000000..5fd4e33 --- /dev/null +++ b/packageB/pages/coupons/query/index.js @@ -0,0 +1,592 @@ +var t = getApp(), + a = t.request, + o = t.globalData.setting, + os = o, + i = require("../../../../utils/util.js"), + ut = i, + s = require("../../../../utils/common.js"); +var regeneratorRuntime = require('../../../../utils/runtime.js'); +const { + barcode, + qrcode +} = require('../../../../utils/index.js'); +let _this = null; + +Page({ + data: { + + val:false, + datet: "", + dates: "", + parameter: false, + details:[],//数据 + isBind:true,//控制清空时间日期的按钮 + isBinds: true, + select: false,//下拉框 + grade_name: '所有', + // grades: [ //old + // '所有', + // '已使用', + // '已过期', + // '未使用', + // ], + currentIndex: 0, //tab项当前指示器 + grades: [ + '未使用', + '已使用', + '已过期', + ], + display:false, + is_no_more: 0, + current_page:1, + by_list:[], + isloading:0, + pageNum: 1, + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + _this = this; + this.setData({ + details: [] + }); + this.wjquery(); + }, + /** + * 生命周期函数--监听页面显示 + */ + onShow: function (options) { + var th = this; + + wx.setNavigationBarTitle({ + title: "微券查询", + }); + + /** + * 控制显示微券兑换 + * by sty + */ + getApp().getConfig2(function (ee) { + var json_d = JSON.parse(ee.switch_list); + let is_show_dhwz = json_d.dhwz_switch; + let grades = th.data.grades; + // console.log('is_show_dhwz----------------------------',is_show_dhwz); + if(is_show_dhwz) { + grades.push('微券兑换'); + th.setData({ grades }); + }; + th.setData({ is_show_dhwz }); + },1); + }, + + + + + // 点击选中二维码 + click: function (e) { + var val = e.currentTarget.dataset.cashrepno; + getApp().globalData.val = val; + wx.navigateTo({ + url: '../qr_code/qr_code', + }) + }, + // 点击返回主页 + // clicks: function () { + // this.setData({ + // hide:true, display:false + // }) + // }, + //监听输入框显示清空按钮 + watchPassWord: function (event) { + var val = event.detail.value; + if (val != "" && val != null) { + var isBind = false; + this.setData({ isBind: isBind }); + + } + }, + /** + * 点击下拉框 + */ + bindShowMsg() { + this.setData({ + select: !this.data.select + }) + }, + /** + * 已选下拉框 + */ + // mySelect(e) { + // var name = e.currentTarget.dataset.name; + // this.setData({ + // grade_name: name, + // select: false + // }) + // }, + + /** + * 点击tab + * by sty + */ + clickTab(e) { + let index = e.target.dataset.index; + let name = e.target.dataset.name; + + this.setData({ + is_get: 0, + pageNum: 1, + grade_name: name, + currentIndex: index, + is_no_more: 0, + current_page: 1, + noMore: false, + details: [], + by_list: [], + }); + + + if(index == 3) {//微券兑换 + this.exchange(); + } else {//其他 + this.wjquery(); + }; + }, + + /** + * 点击"立即使用" + * by sty + */ + clickUse(e) { + let useIndex = e.currentTarget.dataset.index; + let val = e.currentTarget.dataset.cashrepno; + + this.setData({ + showQr: true, + useIndex, + }); + this.qrcode(val); + }, + + /** + * 关闭二维码 + * by sty + */ + closeQr() { + this.setData({ + showQr: false, + }); + }, + + /** + * 生成二维码 + * by sty + */ + qrcode:function(val){ + // console.log(val); + // barcode('barcode', val, 600,160); + qrcode('qrcode', val, 300, 300); + }, + + /** + * 请求微券列表 + * by sty + */ + async exchange() { + var result; + var user_id = getApp().globalData.user_id; + var store_id = os.stoid; + + + this.getData(true, '/api/weshop/users/listExchangeCoupons?pageSize=10', { + user_id: user_id, store_id: store_id, + }).then(()=>{ + _this.setData({ + result: _this.data.list.pageData, + }); + }); + + // await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", { + // data: { + // user_id: user_id, store_id: store_id, + // } + // }).then(res => { + // // var msg = res.data; + // // result = msg.data.pageData; + // }) + // e.setData({ + // result: result + // }) + }, + + /** + * 微券兑换对话框 + * by sty + */ + async clickExchange(e) { + var th=this; + var index = e.currentTarget.dataset.index; + var item = this.data.result[index]; + this.data.monye = item.ToSum; + this.data.integr = item.Integral; + this.data.number = item.Number; + + let content = `确定使用${th.data.integr}积分兑换面值${th.data.monye}元的代金券吗?`; + wx.showModal({ + title: '提示', + content: content, + success (res) { + if (res.confirm) { + console.log('用户点击确定'); + th.sure_pay(); + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }); + + + + // var my_con = this.selectComponent("#my_con"); //组件的id + // var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元"; + // my_con.open(title, "确定", "取消", th.sure_pay, null) + }, + + + /** + * 微券兑换 + * by sty + */ + sure_pay:function(){ + var monye=this.data.monye; + var integr=this.data.integr; + var number=this.data.number; + + var user_id = getApp().globalData.user_id; + console.log(integr,"是什么微卷",typeof integr,monye); + var store_id = os.stoid; + getApp().request.post("/api/weshop/users/saveInterToCash", { + data: { + user_id: user_id, + store_id: store_id, + money:monye, + integ:integr, + number:number, + }, + success: function (su) { + if (su.data.data!=null) { + // getApp().showWarning("兑换成功"); + wx.showToast({ + title: '兑换成功', + icon: 'success', + }); + }else{ + // getApp().showWarning("积分不足"); + wx.showToast({ + title: '积分不足', + icon: 'error', + }); + } + } + + }) + }, + + + //明细查询 + Gettime:function(e){ + var page = 0; + //开始获取时间 + var th = this; + var stime = th.data.datet; + var etime = th.data.dates; + var tpye = th.data.grade_name; + + //开始获取时间结束 + //删除字符中的—— + var datatk = stime.replace(/[-]/g, ""); + var dataj = etime.replace(/[-]/g, ""); + //转换类型 + var datak = parseInt(datatk); + var dataj = parseInt(dataj); + + //判断初始时间小于结束时间 + if (datak > dataj) { + getApp().showWarning("结束时间错误"); + } else { + this.setData({ details: [] }); + this.data.current_page=1; + this.data.is_no_more=0; + this.data.by_list=[]; + this.data.details=[]; + this.wjquery(); + } + + }, + + //微卷查询流水明细 + async wjquery() { + if(this.data.isloading) return; + if(this.data.is_no_more) return; + this.data.islading=1; + var th=this; + + var len = this.data.details.length; + + var e = this,sum, val, number; + var user_id = getApp().globalData.user_id; + var store_id = os.stoid; + + var stime = this.data.datet; + var etime = this.data.dates; + + var tpye = this.data.grade_name; + console.log("是什么类型",tpye); + var IsUse = 0; + var e = this; + var get_data = { + user_id: user_id, + store_id: store_id, + // pageSize: 10, + page: e.data.current_page, + }; + + var dd={ + user_id: user_id, + store_id: store_id, + // pageSize: 10, + }; + dd.isuse=0; + // 判断下拉框,添加类型 + if (tpye == "已使用"){ + get_data.IsUse = 1; + dd.isuse=1; + } else if (tpye == "已过期"){ + get_data.IsUse = 2; + } else if (tpye == "未使用"){ + get_data.IsUse = 0; + }; + if (etime != "" && etime != null) { + get_data.EndDate = etime; + + //时间要转成时间戳 + var new_t=new Date(etime)/1000; + dd.etime=new_t; + } + + if (stime != "" && stime != null) { + get_data.BeginDate= stime; + //时间要转成时间戳 + var new_t=new Date(stime)/1000; + dd.stime=new_t; + } + + var by_list=[]; + if(th.data.current_page==1){ + //先拿包邮券 + await getApp().request.promiseGet("/api/weshop/userfeemail/pageAndArea", { + data: dd, + }).then(res => { + + if(res.data.code == 0) { + th.setData({ + byTotal: res.data.data.total, + }); + }; + + if(res.data.code==0 && res.data.data && res.data.data.total>0){ + + by_list=res.data.data.pageData; + for(var i in by_list){ + by_list[i].isby=1; + //过滤是时间的范围 + if(get_data.IsUse == 2 && by_list[i].use_end_time>=ut.gettimestamp()){ + th.data.by_list.push(by_list[i]); + }else if(get_data.IsUse == 0 && by_list[i].use_end_time0) { + big_arr=th.data.by_list; + }; + + + await getApp().request.promiseGet("/api/weshop/users/listQuan", { + data: get_data, + isShowLoading: 1 + + }).then(res => { + + th.data.islading=0; + var a = res.data; + var len = e.data.details.length; + var details = a.data.pageData; + + th.setData({ + pageSize: a.data.pageSize, + wjTotal: a.data.total, + }); + + if (details.length == 0) { + // this.data.is_no_more = 1; + this.setData({ + is_no_more: 1, + }); + // getApp().showWarning("未找更多数据"); + if(th.data.by_list && th.data.current_page==1){ + th.setData({ val: val,details:th.data.by_list}); + details=th.data.by_list; + setTimeout(function () { + for (var i = 0; i < details.length; i++) { + var no = i + len; + qrcode('qrcode' + no, details[i].no,460, 460); + } + }, 100) + } + return false; + } + + th.data.current_page++; + val = a.data.total+th.data.by_list.length; + + big_arr=big_arr.concat(details); + this.setData({ + details: big_arr,val: val, + is_get: 1, + current_page: this.data.current_page, + }); + + setTimeout(function () { + if(by_list) details=big_arr; + for (var i = 0; i < details.length; i++) { + var no = i + len; + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no,460, 460); + } + }, 100) + }) + + + + }, + + + + //---加载更多是靠这个函数---- + onReachBottom: function () { + if(this.data.currentIndex != 3) { + this.wjquery(); + } else { + this.scrollToLower('/api/weshop/users/listExchangeCoupons?pageSize=10', { + user_id: getApp().globalData.user_id, + store_id: os.stoid, + }, function() { + console.log('!!!!!', _this.data.list.pageData); + _this.setData({ + result: _this.data.list.pageData, + }); + }); + }; + }, + + + //起始时间 + bindDateChenge: function(e) { + console.log("是什么", e.detail.value); + var isBind = false; + this.setData({ + datet: e.detail.value, isBind: isBind + }); + }, + // 结束时间 + bindDateChenges: function(e) { + console.log("是什么", e.detail.value); + var isBinds = false; + this.setData({ + dates: e.detail.value, isBinds: isBinds + }); + }, + //catchtap阻止冒泡,点击清除开始时间的按钮 + eliminate:function(){ + console.log("试试"); + var isBind= true; + var data=""; + this.setData({ datet: data, isBind: isBind}) + }, + //catchtap阻止冒泡,点击清除结束时间的按钮 + eliminates: function () { + console.log("试试"); + var isBinds = true; + var dates = ""; + this.setData({ dates: dates, isBinds: isBinds }) + }, + + + + + + + // 上拉加载请求数据 + getData: function(isInit, url, data) { + return getApp().request.promiseGet(url, {data: data, isShowLoading: true,}) + .then((res) => { + _this.data.isLoading = false; + if(res.data.code == 0) { + if(isInit) {// 第一次加载 + _this.setData({ + list: res.data.data + }); + } else { + _this.setData({ + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData) + }); + }; + + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { + _this.setData({ + noMore: true + }); + }; + }; + }); + }, + + + // 上拉加载 + scrollToLower(url, requestData, callback) { + // 页面数据 + // let pageData = this.data.list.pageData; + // 数据总量 + let total = this.data.list.total; + // 单页最大数据量 + let pageSize = this.data.list.pageSize; + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ + if((total != 0)&&(total <= pageSize)) { + this.setData({ + noMore: true + }); + }; + + if(!this.data.isloading && !this.data.noMore) { + this.setData({ + isLoading: true, + pageNum: this.data.pageNum + 1 + }); + requestData.page = this.data.pageNum; + this.getData(false, url, requestData).then(()=>{ + if(callback) { + callback(); + }; + }); + }; + }, + +}) \ No newline at end of file diff --git a/packageB/pages/coupons/query/index.json b/packageB/pages/coupons/query/index.json new file mode 100644 index 0000000..8851a02 --- /dev/null +++ b/packageB/pages/coupons/query/index.json @@ -0,0 +1,6 @@ +{ + "enablePullDownRefresh": false, + "usingComponents": { + "nodata": "/components/nodata/nodata" + } +} \ No newline at end of file diff --git a/packageB/pages/coupons/query/index.wxml b/packageB/pages/coupons/query/index.wxml new file mode 100644 index 0000000..5ea30f3 --- /dev/null +++ b/packageB/pages/coupons/query/index.wxml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + {{item}} + + + + + + + + + 20 + + + + 包邮券 + 微券来源: 微信商城 + + 立即使用 + + + 有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}}至{{ time.format_time(detail.use_end_time)}} + 有效期:不限 + + + + + + + 使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?',不包邮地区:'+detail.title:''}} + + + + + + + {{filter.getNum(detail.Sum)}} + + + + {{filter.getNum(detail.Sum)}}元微券 + 微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}} + + + {{filter.showBtnText(currentIndex)}} + + + + 有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}} + 有效期:不限 + + + + + + {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}} + 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} + + + + + + + + + + + {{filter.getNum(result.ToSum)}} + + + + {{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券 + + + 立即兑换 + + + + + + + + + + + + + + —— 已经到底了 —— + + —— 已经到底了 —— + + + + + + + + + + + + + + + + + + diff --git a/packageB/pages/coupons/query/index.wxss b/packageB/pages/coupons/query/index.wxss new file mode 100644 index 0000000..d67964c --- /dev/null +++ b/packageB/pages/coupons/query/index.wxss @@ -0,0 +1,631 @@ +/* 大边框 */ +.big-rim{ + margin-top: 15rpx; + width: 100%; + height: 310rpx; +border-bottom: 8px solid #EEEEEE; +} +.min-rim{ +display: flex; +width: 100%; +height: auto; +margin-left: 30rpx; +} + +/* 开始时间 */ +.kssj{ + +display: inline-block; +height: 50rpx; +background-color: #EEEEEE; +border: 1px solid #DADADA; +width:200rpx; +border-radius: 3px; +line-height:40rpx; +} +/* 开始时间的文字 */ +.wz{ + display: inline-block; +font-size: 25rpx; +color: #333; +} +/* 日期控件 */ +.pi{ + width:200rpx; + height:auto; + margin-left:20rpx; + +} + + + +/* 查询内容 */ +.cxnr{ + margin-left:30rpx; + font-size:28rpx; + font-family: 'SimHei',Arial; +} +.rq-rim{ +position:relative; +left:0; +top:0; +} +/* 至 */ +.zi{ + + margin-top:14rpx; + font-size:28rpx; + font-family: 'SimHei',Arial; + margin-left:20rpx; + +} +/* 结束时间 */ + +.jssj{ + padding-left: 10rpx; + margin-left: 30rpx; +padding-bottom: 10rpx; +height: 35rpx; +font-size: 25rpx; +color: #333; +background-color: #EEEEEE; +border: 1px solid #DADADA; +width:85%; +font-family: 'SimHei',Arial; +border-radius: 3px; +} +/* 查询内容的备考的边框 */ +.xknr-rim{ + display: flex; + width: 100%; + height: 55rpx; + line-height:105rpx; + margin-top:10rpx; + +} +/* 明细查询 */ +.botton{ + margin-left: 30rpx; + margin-top: 63rpx; + background-color: #C4182E; + width: 95%; + border-radius:10rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + color: #FFF; + font-size: 25rpx; + border: none; + font-family: '微软雅黑'; + } + /* 底部边框线 + .bottom{ + width: 100%; + border-bottom: 20rpx solid #eeeeee; + } */ + /* 清空按钮的 边框*/ +.qc-rim{ + position:absolute; + top:10rpx; + left:175rpx; +} + +/*开始时间清空输入框的按钮*/ +.empty{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:18rpx; +} +/* 结束时间清空输入框的按钮的边框 */ +.end-rim{ +position: absolute; + top: 11rpx; + left:173rpx; + width: 25rpx; + height: 25rpx; +} +/*结束时间清空输入框的按钮*/ +.end{ + + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:21rpx; + +} + +/* 顶部 */ +.top{ + width: 200rpx; + height: 50rpx; + padding: 0 10rpx; + line-height: 50rpx; + font-size: 34rpx; + margin-top: 25rpx; + + +} +.images{ + width:35rpx; +height:30rpx; +margin-top:10rpx; +margin-left:-14rpx; + +} +.rim-images{ + width: 45rpx; + height: 46rpx; + line-height: 37rpx; + /* border-style: inset;padding:4rpx;text-align: center; */ + background: #f1f1f1; + border-color:#000000; + border-width: 1rpx; + transform:translateX(28%); + margin-top:-3rpx; +border-radius:5rpx; + + +} +/* 下拉框 */ +.top-selected{ + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ccc; + padding: 0 10rpx; + font-size: 30rpx; + background:#eeeeee; + height:50rpx; + border-radius:6rpx; +} +.texts{ + margin:0 auto; + font-size: 25rpx; + +} +/* 下拉内容 */ +.select-box { + background-color: #eeeeee; + width:225rpx; + position: relative; + z-index:1; + overflow: hidden; + text-align: left; + animation: myfirst 0.5s; + font-size: 25rpx; +} +.select_one { + padding-left: 20rpx; + width: 100%; + height: 60rpx; + line-height: 60rpx; +} +/* 优惠券样式 */ +.body{ + text-align: center; + padding: 20rpx; + margin: 20rpx auto; + width: 80%; + max-width: 1000rpx; + font-size: 28rpx; + color: #333333; + border-bottom: 2rpx solid #EEEEEE; +} + +.b_iimg{ + background-color: red; + width: 400rpx; + height: 400rpx; +} + +.b_sz2{ + font-size: 40rpx; + color: #6fd137; + margin: 20rpx 0; + text-align: center; +} +/* 二维码列表查询 */ +/* 列表数据*/ +.data{ + width: 80%; + + height:auto; + margin-left:80rpx; + +} +.rim{ + position: relative; + top:0rpx; + left: 0rpx; +} +/* 二维码边框 */ +.code_rim{ + width: 100%; + height: auto; + text-align: center; + font-size: 25rpx; + padding-top: -30rpx; + margin-top:-20rpx; +padding-left:45rpx; + +} + +/* 二维码 */ +.code{ + height: 520rpx; + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + margin-left:40rpx; + +} +.car-rim{ +width:98%; +height:177rpx; +text-align:center; +border-bottom:2rpx solid #eee; +margin-left:22rpx; + +} +/* 二维码值 */ +.code_val{ + margin-top:-104rpx; +margin-left:-59rpx; +color:#999999; + +} +/* 金额 */ +.moneys{ + margin-top:20rpx; + height: 47rpx; + width: 100%; + color:#6fd137; + text-align: center; + font-size: 38rpx; + font-family: 'SimHei',Arial; + margin-bottom:20rpx; + margin-left:11rpx; + +} +/* 文字 */ +.text{ + width: 100%; + font-size: 25rpx; + text-align: center; + + height: 41rpx; + color: #999999; +} +/* 二维码和条形码的边框 */ +.barqrcode{ + width: 100%; + height: auto; + margin-top:50rpx; + +} +/* 日期 */ +.rq{ + height: 25rpx; + font-size: 28rpx; + margin-top:12rpx; + font-family:'SimHei',Arial; +} +/* 点击条形 */ +.barcode { + height: 320rpx; + flex-direction: column; + justify-content: center; + align-items: center; + margin-left: 30rpx; +} +/* 二维码边框*/ +.qrcode_rim { + width: 100%; + height: 420rpx; + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + margin-left: 80rpx; + margin-top:-210rpx; + +} +.qrcode{ + /* margin-left: 100rpx; */ +} +/* 使用说明 */ +.textss{ + width: 100%; + font-size: 25rpx; + text-align: center; + + min-height: 47rpx; + height:auto; + color: #999999; +} + + + + + + +page { + background-color: #f0f0f0; + scroll-behavior: smooth; +} + +.c-fe0000 { + color: #fe0000; +} + +.tab-head { + display: flex; + position: sticky; + top: 0; + background-color: white; + font-size: 28rpx; + z-index: 2; +} + +.tab-head-item { + flex: 1; + text-align: center; + padding: 30rpx 0; + position: relative; +} + +.tab-head-item.active { + color: #fe0000; +} + +.tab-head-item.active::after { + content: ''; + width: 60%; + height: 2rpx; + background-color: #fe0000; + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} + +.tab-body { + padding: 0 20rpx; + overflow: hidden; +} + + .tab-list-item { + border-radius: 10rpx; + overflow: hidden; + margin-top: 30rpx; + } + + + +.coupon { + position: relative; + + background: radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx no-repeat, + radial-gradient(transparent 6px, #fff 0), + radial-gradient(transparent 6px, #fff 0); +} + + +.coupon::after { + content: ''; + position: absolute; + height: 100%; + width:4px; + top: 0; + left: 0; + background-image: linear-gradient(to bottom, #FFD3D6 4px, transparent 4px, transparent), + radial-gradient(4px circle at 0px 8px, #f0f0f0 4px, #FFD3D6 4px); + background-size: 4px 12px; + background-repeat: repeat-y; + } + + + .coupon2 { + /* width: 300px; */ + padding: 40rpx 0; + position: relative; + background: radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, + radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, + radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, + radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; + /* filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2)); */ + } + + .coupon2::after { + content: ''; + height: 70%; + border: 2rpx dashed #fff; + position: absolute; + left: 198rpx; + top: 0; + bottom: 0; + margin: auto; + } + +/* .coupon2 .c-l, + .coupon2 .c-r { + border: 2rpx solid red; + padding: 20rpx 0; + } */ + + + + .c-l { + color: #fe0000; + width: 200rpx; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + } + + .rmb::before { + content: '¥'; + font-size: 28rpx; + } + + .c-r { + box-sizing: border-box; + padding: 20rpx; + flex: 1; + } + + .c-time { + color: #7b7b7b; + font-size: 24rpx; + padding-top: 10rpx; + word-break: break-all; + } + + .btn, .btn2 { + font-size: 26rpx; + padding: 10rpx 20rpx; + border: 2rpx solid #fe0000; + border-radius: 30rpx; + flex-shrink: 0; + } + + .btn { + color: #fe0000; + } + + .btn.gray { + color: #ccc; + border-color: #ccc; + } + + .btn2 { + color: white; + background-color: #fe0000; + } + + .c-info { + border-top: 2rpx dashed #f0f0f0; + padding: 10rpx 40rpx 10rpx 10rpx; + font-size: 22rpx; + background-color: #fefefe; + color: #7b7b7b; + position: relative; + } + + .arrow-down::after { + font-family: iconfont; + content: '\e600'; + font-size: 32rpx; + position: absolute; + right: 10rpx; + top: 50%; + transform: translateY(-50%); + } + + .mask { + position: fixed; + width: 100%; + height: 100%; + top: 0; + background-color: rgba(0,0,0,.7); + z-index: 1; + } + + .popup-container { + position: fixed; + width: 70%; + border-radius: 12rpx; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 3; + } + + .popup { + text-align: center; + border-radius: 12rpx; + background-color: white; + overflow: hidden; + /* width: 80%; */ + } + + .popup-container .icon-close { + color: rgba(255,255,255,.6); + } + + .popup-title { + padding: 40rpx 0; + color: #fe0000; + background-color: #FFD3D6; + position: relative; + } + + .popup-title::after { + content: ''; + position: absolute; + left: -20rpx; + bottom: -12rpx; + width: 130%; + height: 20rpx; + background-image: -webkit-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); + background-image: -moz-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); + background-image: radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); + background-size: 40rpx 40rpx; + transform: rotate(180deg); + -webkit-transform: rotate(180deg); + } + + + .popup .rmb::before { + font-size: 40rpx; + } + + .img-qr { + display: block; + width: 300rpx; + height: 300rpx; + margin: 0 auto; + background-color: pink; + } + + .qrcode { + width: 300rpx; + height: 300rpx; + margin: 0 auto; + } + + + .noMore { + padding: 20rpx; + color: #bbb; + text-align: center; + font-size: 22rpx; + } + + + + + + + + + + + + + + + +