Commit d580ec02527067f1555a5933022bb4114197b522

Authored by yiren
1 parent 307fe7bf

充值和购买代金券接口对接

@@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
12 {{detail.price}}元 12 {{detail.price}}元
13 </view> 13 </view>
14 <view class="operation"> 14 <view class="operation">
15 - <image class="countimgs" src="./bb.png" bindtap="subtraction"/> 15 + <image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction"/>
16 <input type="number" model:value="{{num}}" /> 16 <input type="number" model:value="{{num}}" />
17 - <image class="countimgs" src="./add.png" bindtap="addition" mode=""/> 17 + <image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode=""/>
18 </view> 18 </view>
19 </view> 19 </view>
20 </view> 20 </view>
@@ -46,9 +46,9 @@ @@ -46,9 +46,9 @@
46 <view class="info_left font32r"> 46 <view class="info_left font32r">
47 使用限制: 47 使用限制:
48 </view> 48 </view>
49 - <view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" > 49 + <text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" >
50 {{exp_date.week_show?exp_date.week_show+'可用':''}} 50 {{exp_date.week_show?exp_date.week_show+'可用':''}}
51 - </view> 51 + </text>
52 <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" > 52 <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" >
53 无限制 53 无限制
54 </view> 54 </view>
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 </view> 65 </view>
66 <view class="fixed_box"> 66 <view class="fixed_box">
67 <view class="shoppingCart_img"> 67 <view class="shoppingCart_img">
68 - <image src="../../pages/image/shoppingCart.png" mode="" /> 68 + <image src="https://qn.colorcun.com/WechatIMG711.png" mode="" />
69 <view wx:if="{{num}}">{{num}}</view> 69 <view wx:if="{{num}}">{{num}}</view>
70 </view> 70 </view>
71 <view class="content font24r"> 71 <view class="content font24r">
@@ -21,10 +21,12 @@ page { @@ -21,10 +21,12 @@ page {
21 } 21 }
22 22
23 .info2{ 23 .info2{
  24 + padding: 0 32rpx 32rpx 0;
24 border-bottom: 4rpx solid #DBDBDB; 25 border-bottom: 4rpx solid #DBDBDB;
25 } 26 }
26 27
27 .info_left { 28 .info_left {
  29 + width:200rpx ;
28 color: #515151; 30 color: #515151;
29 font-family: PingFang SC; 31 font-family: PingFang SC;
30 } 32 }
@@ -15,9 +15,11 @@ Page({ @@ -15,9 +15,11 @@ Page({
15 type: '', 15 type: '',
16 time: 300, 16 time: 300,
17 countdown: '', 17 countdown: '',
  18 + name:"",
18 date: "", 19 date: "",
  20 + phone:"",
  21 + calendarData:'',
19 sex:"先生", 22 sex:"先生",
20 - sexObj:{},  
21 index:0, 23 index:0,
22 sexList:[ 24 sexList:[
23 { 25 {
@@ -49,6 +51,19 @@ Page({ @@ -49,6 +51,19 @@ Page({
49 type:options.type, 51 type:options.type,
50 }) 52 })
51 console.log('onLoad',{...this.data.opt}); 53 console.log('onLoad',{...this.data.opt});
  54 + let obj=wx.getStorageSync('info')
  55 + console.log('objobjobjobj',{...obj})
  56 + this.setData({
  57 + name:obj.name,
  58 + date:obj.date,
  59 + phone:obj.phone,
  60 + index:obj.sex*1-1,
  61 + calendarData:obj.calendarData,
  62 + })
  63 + this.data.name=obj.name;
  64 + this.data.date=obj.date;
  65 + this.data.phone=obj.phone;
  66 + this.data.index=obj.sex*1-1;
52 this.countdown() 67 this.countdown()
53 this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件 68 this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件
54 }, 69 },
@@ -74,18 +89,42 @@ Page({ @@ -74,18 +89,42 @@ Page({
74 paySign: res.data.paySign, 89 paySign: res.data.paySign,
75 success (ress) { 90 success (ress) {
76 if (ress.errMsg == 'requestPayment:ok') { 91 if (ress.errMsg == 'requestPayment:ok') {
77 - that.showModal()  
78 console.log('支付成功',ress); 92 console.log('支付成功',ress);
  93 + return that.showModal()
79 } 94 }
80 console.log('支付失败',ress); 95 console.log('支付失败',ress);
  96 + wx.showToast({
  97 + title: '支付失败,请重新下单',
  98 + duration: 1000,
  99 + success: function () {
  100 + setTimeout(function () {
  101 + wx.reLaunch({
  102 + url: `/pages/customer/detail_owner_invitation_new?id=${that.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
  103 + })
  104 + }, 1000);
  105 + }
  106 + })
81 }, 107 },
82 fail (ress) { 108 fail (ress) {
83 console.log('支付失败',ress); 109 console.log('支付失败',ress);
  110 + wx.showToast({
  111 + title: '支付失败,请重新下单',
  112 + duration: 1000,
  113 + icon:'none',
  114 + success: function () {
  115 + setTimeout(function () {
  116 + wx.reLaunch({
  117 + url: `/pages/customer/detail_owner_invitation_new?id=${that.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
  118 + })
  119 + }, 1000);
  120 + }
  121 + })
84 }, 122 },
85 }) 123 })
86 } 124 }
87 }) 125 })
88 }, 126 },
  127 + // 充值后跳转
89 recharge(){ 128 recharge(){
90 console.log('充值完成跳转',this.data.opt.detail.oid); 129 console.log('充值完成跳转',this.data.opt.detail.oid);
91 this.closeModal() 130 this.closeModal()
@@ -93,8 +132,25 @@ Page({ @@ -93,8 +132,25 @@ Page({
93 url: `/pages/customer/detail_owner_invitation_new?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1` 132 url: `/pages/customer/detail_owner_invitation_new?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
94 }) 133 })
95 }, 134 },
  135 + // 绑定名称
  136 + bindKeyNameInput(event){
  137 + const value = event.detail.value.replace(/\s+/g, "");
  138 + this.setData({
  139 + name: value
  140 + })
  141 + console.log(value);
  142 + },
  143 + // 绑定电话
  144 + bindKeyPhoneInput(event){
  145 + const value = event.detail.value.replace(/\s+/g, "");
  146 + this.setData({
  147 + phone: value
  148 + })
  149 + console.log(value);
  150 + },
  151 + // 购买代金券后跳转
96 certificate(){ 152 certificate(){
97 - this.closeModal() 153 + console.log({...this.data.opt.detail});
98 wx.reLaunch({ 154 wx.reLaunch({
99 url: '/pages/me/coupon_news' 155 url: '/pages/me/coupon_news'
100 }) 156 })
@@ -103,21 +159,21 @@ Page({ @@ -103,21 +159,21 @@ Page({
103 this.modal.closeModal() //调用组件中关闭模态框方法 159 this.modal.closeModal() //调用组件中关闭模态框方法
104 }, 160 },
105 // 点击确认支付 161 // 点击确认支付
106 - formSubmit(e) { 162 + formSubmit() {
107 if(this.data.time==0){ 163 if(this.data.time==0){
108 return util.toast('当前订单已过期,请重新进入优惠券购买页面下单', 'none'); 164 return util.toast('当前订单已过期,请重新进入优惠券购买页面下单', 'none');
109 } 165 }
110 if(this.data.type=='2'){ 166 if(this.data.type=='2'){
111 - let form=e.detail.value  
112 - if (!form.name) { 167 + let data=this.data
  168 + if (!data.name) {
113 util.toast('未填写姓名', 'none') 169 util.toast('未填写姓名', 'none')
114 return; 170 return;
115 } 171 }
116 - if (!form.phone) { 172 + if (!data.phone) {
117 util.toast('未填写手机号码', 'none') 173 util.toast('未填写手机号码', 'none')
118 return; 174 return;
119 } 175 }
120 - if (!/^1\d{10}$/.test(form.phone)) { 176 + if (!/^1\d{10}$/.test(data.phone)) {
121 util.toast('手机号码错误', 'none') 177 util.toast('手机号码错误', 'none')
122 return; 178 return;
123 } 179 }
@@ -129,37 +185,57 @@ Page({ @@ -129,37 +185,57 @@ Page({
129 }, 3500); 185 }, 3500);
130 return 186 return
131 } 187 }
132 - this.addInfo(form) 188 + this.addInfo()
133 }else{ 189 }else{
134 this.confirmPayment() 190 this.confirmPayment()
135 } 191 }
136 }, 192 },
137 - addInfo(form){  
138 - App.GuestManage.InsGuest({ 193 + addInfo(){
  194 + let params={
139 sellerid:this.data.opt.sellerid, 195 sellerid:this.data.opt.sellerid,
140 - rname:form.name,  
141 - sex:this.data.sexObj.value,//1男 2女 3公司  
142 - phone:form.phone,  
143 - 196 + rname:this.data.name,
  197 + sex:this.data.index*1+1,//1男 2女 3公司
  198 + phone:this.data.phone,
  199 + c_day:this.data.calendarData
  200 + }
  201 + console.log({...params});
  202 + App.GuestManage.InsGuest(params).then(res=>{
  203 + console.log(res);
  204 + if(res.ret=='200'){
  205 + this.confirmPayment()
  206 + let obj={
  207 + name:this.data.name,
  208 + phone:this.data.phone,
  209 + sex:this.data.index*1+1,
  210 + calendarData:this.data.calendarData,
  211 + date:this.data.date,
  212 + }
  213 + wx.setStorageSync('info', obj)
  214 + }
144 }) 215 })
145 }, 216 },
146 // 选择日期 217 // 选择日期
147 bind_ChangeDate(event) { 218 bind_ChangeDate(event) {
148 let date = event.detail.value 219 let date = event.detail.value
  220 + let dateGl=event.detail.value.split('-');
  221 + let calendarData;
  222 + if(dateGl.length==3){
  223 + calendarData=dateGl[0]+'年'+dateGl[1]+'月'+dateGl[2]+'日(公历)';
  224 + console.log(dateGl);
  225 + console.log(calendarData);
  226 + }
149 this.setData({ 227 this.setData({
150 - date 228 + date,
  229 + calendarData
151 }) 230 })
152 }, 231 },
153 // 选择性别 232 // 选择性别
154 bind_Changesex(event){ 233 bind_Changesex(event){
155 console.log('event.detail',{...event.detail}); 234 console.log('event.detail',{...event.detail});
156 - let index = event.detail.value  
157 - let sexObj = this.data.sexList[index] 235 + let index = event.detail.value;
158 this.setData({ 236 this.setData({
159 - sexObj,  
160 index 237 index
161 }) 238 })
162 - console.log('sexsexsex',sexObj);  
163 console.log('index',index); 239 console.log('index',index);
164 }, 240 },
165 /** 241 /**
@@ -20,17 +20,17 @@ @@ -20,17 +20,17 @@
20 <view class="page-section"> 20 <view class="page-section">
21 <view class="page-section-title font32r">您的姓名</view> 21 <view class="page-section-title font32r">您的姓名</view>
22 <view class="weui-cells weui-cell__bd" style="margin: 30rpx 0"> 22 <view class="weui-cells weui-cell__bd" style="margin: 30rpx 0">
23 - <input class="weui-input name-input" name="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" /> 23 + <input class="weui-input name-input" value="{{name}}" data-params="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" bindinput="bindKeyNameInput"/>
24 </view> 24 </view>
25 <picker mode="selector" value="{{index}}" range-key="sex" data-sex='{{sexList[index].sex}}' range="{{sexList}}" bindchange="bind_Changesex" class="pickerSex"> 25 <picker mode="selector" value="{{index}}" range-key="sex" data-sex='{{sexList[index].sex}}' range="{{sexList}}" bindchange="bind_Changesex" class="pickerSex">
26 <text class="sexText">{{sexList[index].sex}}</text> 26 <text class="sexText">{{sexList[index].sex}}</text>
27 - <image src="./imgs.png" mode="" class="imgs"/> 27 + <image src="https://qn.colorcun.com/WechatIMG695.png" mode="" class="imgs"/>
28 </picker> 28 </picker>
29 </view> 29 </view>
30 <view class="page-section"> 30 <view class="page-section">
31 <view class="page-section-title font32r">联系电话</view> 31 <view class="page-section-title font32r">联系电话</view>
32 <view class="weui-cells weui-cell__bd" style="margin: 30rpx 0"> 32 <view class="weui-cells weui-cell__bd" style="margin: 30rpx 0">
33 - <input class="weui-input" type="number" name="phone" maxlength="11" placeholder="点击输入您的电话" placeholder-style="color:#999;" style="color: #999" /> 33 + <input class="weui-input" type="number" name="phone" value="{{phone}}" data-params="phone" maxlength="11" placeholder="点击输入您的电话" placeholder-style="color:#999;" bindinput="bindKeyPhoneInput" style="color: #999" />
34 </view> 34 </view>
35 </view> 35 </view>
36 <view class="page-section page-section1"> 36 <view class="page-section page-section1">
@@ -71,9 +71,9 @@ @@ -71,9 +71,9 @@
71 <view class="explain" wx:if="{{type=='2'}}"> 71 <view class="explain" wx:if="{{type=='2'}}">
72 您的会员充值已经在办理中,到店消费时请和收银核实,谢谢! 72 您的会员充值已经在办理中,到店消费时请和收银核实,谢谢!
73 </view> 73 </view>
74 - <button wx:if="{{type=='2'}}" class="font32r btnsPay" bindtap="recharge">完成 74 + <button wx:if="{{type=='2'}}" class="font32r btnsPay" bindtap="recharge">朕知道了
75 </button> 75 </button>
76 - <button wx:else class="font32r btnsPay" bindtap="certificate">朕知道了 76 + <button wx:else class="font32r btnsPay" bindtap="certificate">完成
77 </button> 77 </button>
78 </view> 78 </view>
79 </my-modal> 79 </my-modal>
1 // pack-activity/pack/examineCertificate.js 1 // pack-activity/pack/examineCertificate.js
  2 +import App from '../../utils/api'
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - explain: '预设文本预设文本预设文本预设文本',  
9 - type: 'group',  
10 - status: 'birthday', //none 无限制 birthday 生日当天 week 指定日期 9 + id:'',
  10 + detail:{
  11 + qrcode:null,
  12 + },
  13 + sellerObj:{
  14 + sellername:'',
  15 + seller_image:'',
  16 + real_address:'',
  17 + cateStr:'',
  18 + },
  19 + certificateDetail:{},
  20 + exp_date:{},
11 }, 21 },
12 22
13 /** 23 /**
14 * 生命周期函数--监听页面加载 24 * 生命周期函数--监听页面加载
15 */ 25 */
16 onLoad(options) { 26 onLoad(options) {
17 - 27 + this.setData({
  28 + id:options.id
  29 + })
  30 + console.log(this.data.id);
  31 + this.getDetail()
18 }, 32 },
19 33
20 /** 34 /**
@@ -30,6 +44,69 @@ Page({ @@ -30,6 +44,69 @@ Page({
30 onShow() { 44 onShow() {
31 45
32 }, 46 },
  47 + getDetail(){
  48 + App.Activity.GetOrderRechargeByid({
  49 + orderid:this.data.id
  50 + }).then(res=>{
  51 + if(res.data.length>0){
  52 + let detail=res.data[0];
  53 + let exp_date=detail.exp_date?JSON.parse(detail.exp_date):'';
  54 + this.setData({
  55 + detail,
  56 + exp_date
  57 + })
  58 + console.log('detaildetail',{...this.data.detail});
  59 + console.log('exp_date',{...this.data.exp_date});
  60 + this.getSeller(res.data[0].sellerid)
  61 + this.getCertificateDetail(res.data[0].recharge_id)
  62 + }
  63 +
  64 + })
  65 + },
  66 + getCertificateDetail(id){
  67 + App.Activity.GetActivityById({
  68 + id
  69 + }).then(res => {
  70 + if(res.data.length>0){
  71 + let certificateDetail =res.data[0];
  72 + let exp_date=certificateDetail.exp_date?JSON.parse(certificateDetail.exp_date):'';
  73 + this.setData({
  74 + certificateDetail,
  75 + exp_date,
  76 + })
  77 + console.log('certificateDetail',{...certificateDetail});
  78 + console.log('exp_date',{...exp_date});
  79 + }
  80 + })
  81 + },
  82 + getSeller(sid){
  83 + App.Customer.GetSellerDetail({
  84 + sid,
  85 + }).then(res=>{
  86 + let data=res.data;
  87 + let cate=data.cate;
  88 + let cateStr;
  89 + if(cate && cate.length>0){
  90 + cateStr=[];
  91 + cate.some(cate=>{
  92 + cateStr.push(cate);
  93 + if(cateStr.length>2){return true}
  94 + })
  95 + cateStr=cateStr.join('/')
  96 + }
  97 + let sellerObj={
  98 + sellername:data.sellername,
  99 + seller_image:data.seller_image,
  100 + real_address:data.real_address,
  101 + cateStr
  102 + }
  103 +
  104 + this.setData({
  105 + sellerObj
  106 + })
  107 + console.log({...sellerObj});
  108 + })
  109 + },
33 // 申请退款 110 // 申请退款
34 subscribeDrawback() { 111 subscribeDrawback() {
35 wx.navigateTo({ 112 wx.navigateTo({
1 <!--pack-activity/pack/examineCertificate.wxml 二维码验券页面--> 1 <!--pack-activity/pack/examineCertificate.wxml 二维码验券页面-->
2 -<nav>唐人街1号中餐厅</nav> 2 +<wxs src="../../utils/util.wxs" module="util" />
  3 +<nav>{{detail.sellername}}</nav>
3 <view class="box_wrap"> 4 <view class="box_wrap">
4 <view class="top_box"> 5 <view class="top_box">
5 <view class="discount_name font40r"> 6 <view class="discount_name font40r">
6 - 9折折扣券 7 + {{detail.aname}}
7 </view> 8 </view>
8 <view class="shop_name font28r"> 9 <view class="shop_name font28r">
9 - 唐人街1号中餐店 10 + {{detail.sellername}}
10 </view> 11 </view>
11 <view class="lineBox"> 12 <view class="lineBox">
12 <view class="line"></view> 13 <view class="line"></view>
13 - <image wx:if="{{type=='group2'}}" class="group" src="../../pages/image/group2.png" mode="" />  
14 - <image wx:if="{{type=='group'}}" class="group" src="../../pages/image/group.png" mode="" /> 14 + <image wx:if="{{type=='group2'}}" class="group" src="https://qn.colorcun.com/WechatIMG714.png" mode="" />
  15 + <image wx:if="{{type=='group'}}" class="group" src="https://qn.colorcun.com/WechatIMG713.png" mode="" />
15 </view> 16 </view>
16 - <image class="qcode" src="../../pages/image/qcode.png" mode="" /> 17 + <image class="qcode" src="{{detail.qrcode}}" mode="" />
17 <view class="orderNumber font28r"> 18 <view class="orderNumber font28r">
18 - NO.01774420230223150306 19 + {{detail.order_no}}
19 </view> 20 </view>
20 </view> 21 </view>
21 <view class="center_box"> 22 <view class="center_box">
@@ -24,7 +25,7 @@ @@ -24,7 +25,7 @@
24 券要求 25 券要求
25 </view> 26 </view>
26 <view class="info_right font32r"> 27 <view class="info_right font32r">
27 - 满200可用 28 + {{detail.desc}}
28 </view> 29 </view>
29 </view> 30 </view>
30 <view class="info"> 31 <view class="info">
@@ -32,7 +33,7 @@ @@ -32,7 +33,7 @@
32 有效期从 33 有效期从
33 </view> 34 </view>
34 <view class="info_right font32r"> 35 <view class="info_right font32r">
35 - 2023-08-28 36 + {{util.unixtoTime(detail.stime,'YYYY-MM-DD')}}
36 </view> 37 </view>
37 </view> 38 </view>
38 <view class="info"> 39 <view class="info">
@@ -40,10 +41,10 @@ @@ -40,10 +41,10 @@
40 有效期至 41 有效期至
41 </view> 42 </view>
42 <view class="info_right font32r"> 43 <view class="info_right font32r">
43 - 2023-08-28 44 + {{util.unixtoTime(detail.etime,'YYYY-MM-DD')}}
44 </view> 45 </view>
45 </view> 46 </view>
46 - <view wx:if="{{status=='none'}}" class="info"> 47 + <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info">
47 <view class="info_left font32r"> 48 <view class="info_left font32r">
48 使用限制: 49 使用限制:
49 </view> 50 </view>
@@ -51,7 +52,7 @@ @@ -51,7 +52,7 @@
51 无限制 52 无限制
52 </view> 53 </view>
53 </view> 54 </view>
54 - <view wx:if="{{status=='birthday'}}" class="info"> 55 + <view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info">
55 <view class="info_left font32r"> 56 <view class="info_left font32r">
56 使用限制: 57 使用限制:
57 </view> 58 </view>
@@ -59,7 +60,7 @@ @@ -59,7 +60,7 @@
59 会员生日当天 60 会员生日当天
60 </view> 61 </view>
61 </view> 62 </view>
62 - <view wx:if="{{status=='week'}}" class="week"> 63 + <view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="week">
63 <view class="week_top"> 64 <view class="week_top">
64 <view class="week_left font32r"> 65 <view class="week_left font32r">
65 充值日期限制: 66 充值日期限制:
@@ -68,29 +69,26 @@ @@ -68,29 +69,26 @@
68 每周指定日期餐段可用 69 每周指定日期餐段可用
69 </view> 70 </view>
70 </view> 71 </view>
71 - <view class="dateList texts font30r">  
72 - 午:周一 周二 周三 周四 周五 周六 周日  
73 - </view>  
74 - <view class="dateList texts font30r">  
75 - 晚:周一 周二 周三 周四 周五 周六 周日  
76 - </view> 72 + <text class="dateList texts font30r">
  73 + {{exp_date.week_show?exp_date.week_show+'可用':''}}
  74 + </text>
77 </view> 75 </view>
78 - <view class="info info1"> 76 + <view class="info info1" wx:if="{{detail.explain}}">
79 <view class="info_left font32r"> 77 <view class="info_left font32r">
80 券说明 78 券说明
81 </view> 79 </view>
82 </view> 80 </view>
83 - <view class="explain_news">{{explain}}</view> 81 + <view class="explain_news">{{detail.explain}}</view>
84 </view> 82 </view>
85 <view class="btns"> 83 <view class="btns">
86 <button class="font24r" plain="true" bindtap="subscribeDrawback">申请退费</button> 84 <button class="font24r" plain="true" bindtap="subscribeDrawback">申请退费</button>
87 </view> 85 </view>
88 <view class="canteen_box"> 86 <view class="canteen_box">
89 - <image src="http://nosqn.colorcun.com/20200214153224_561e1ca9088d9224782aeb4ef8002c45?imageView2/2/w/860/interlace/0/q/100" mode="heightFix" /> 87 + <image src="{{sellerObj.seller_image}}" mode="heightFix" />
90 <view class="info_right"> 88 <view class="info_right">
91 - <view class="font38r">唐人街1号中餐厅</view>  
92 - <view class="font24r">中餐/京菜鲁菜</view>  
93 - <view class="font28r">学院路长宁道路口南行100米</view> 89 + <view class="font38r">{{sellerObj.sellername}}</view>
  90 + <view class="font24r">{{sellerObj.cateStr}}</view>
  91 + <view class="font28r">{{sellerObj.real_address}}</view>
94 </view> 92 </view>
95 </view> 93 </view>
96 <view class="bottom_box"> 94 <view class="bottom_box">
@@ -192,6 +192,7 @@ @@ -192,6 +192,7 @@
192 192
193 .week_top { 193 .week_top {
194 padding: 24rpx 0; 194 padding: 24rpx 0;
  195 + padding-bottom: 0;
195 width: 100%; 196 width: 100%;
196 display: flex; 197 display: flex;
197 align-items: center; 198 align-items: center;
@@ -211,6 +212,8 @@ @@ -211,6 +212,8 @@
211 .dateList { 212 .dateList {
212 width: 100%; 213 width: 100%;
213 display: flex; 214 display: flex;
214 - justify-content: flex-end;  
215 padding-bottom: 24rpx; 215 padding-bottom: 24rpx;
  216 + position: relative;
  217 + top: -10rpx;
  218 + letter-spacing:2rpx;
216 } 219 }
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 无限制 59 无限制
60 </view> 60 </view>
61 </view> 61 </view>
62 - <view class="info info1"> 62 + <view class="info info1" wx:if="{{detail.explain}}">
63 <view class="info_left font32r"> 63 <view class="info_left font32r">
64 券说明 64 券说明
65 </view> 65 </view>
@@ -35,7 +35,8 @@ @@ -35,7 +35,8 @@
35 font-family: PingFang SC; 35 font-family: PingFang SC;
36 font-size: 32rpx; 36 font-size: 32rpx;
37 position: relative; 37 position: relative;
38 - top: -10rpx; 38 + top: -10rpx;
  39 + letter-spacing: 4rpx;
39 } 40 }
40 41
41 .info_left { 42 .info_left {
@@ -76,10 +76,10 @@ @@ -76,10 +76,10 @@
76 </view> 76 </view>
77 </view> 77 </view>
78 <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr"> 78 <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr">
79 - <image src="../add.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" /> 79 + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" />
80 </view> 80 </view>
81 <view wx:else class="algorithmImg flex-lr calculate"> 81 <view wx:else class="algorithmImg flex-lr calculate">
82 - <image src="../reduce.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="one" /> 82 + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="one" />
83 <view class="box flex-cc"> 83 <view class="box flex-cc">
84 <view class="num flex-cc"> 84 <view class="num flex-cc">
85 {{item.quantum}}<view>份</view> 85 {{item.quantum}}<view>份</view>
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 清蒸 88 清蒸
89 </view> 89 </view>
90 </view> 90 </view>
91 - <image src="../add.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" /> 91 + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="one" />
92 </view> 92 </view>
93 <view class="wrapIine"></view> 93 <view class="wrapIine"></view>
94 </view> 94 </view>
@@ -103,28 +103,28 @@ @@ -103,28 +103,28 @@
103 {{item.quantum}} 103 {{item.quantum}}
104 <image src="{{item.image}}" mode="aspectFill" /> 104 <image src="{{item.image}}" mode="aspectFill" />
105 <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg"> 105 <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">
106 - <image src="../add.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" /> 106 + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" />
107 </view> 107 </view>
108 <view wx:else class="algorithmImg flex-lr twoImgs"> 108 <view wx:else class="algorithmImg flex-lr twoImgs">
109 - <image src="../reduce.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="two" /> 109 + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-type="two" />
110 <view class="box flex-cc"> 110 <view class="box flex-cc">
111 <view class="num flex-cc"> 111 <view class="num flex-cc">
112 {{item.quantum}} 112 {{item.quantum}}
113 </view> 113 </view>
114 </view> 114 </view>
115 - <image src="../add.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" /> 115 + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-type="two" />
116 </view> 116 </view>
117 </view> 117 </view>
118 </view> 118 </view>
119 <view class="fixedBox flex-lr"> 119 <view class="fixedBox flex-lr">
120 <view class="left flex-cmc"> 120 <view class="left flex-cmc">
121 - <image src="../img1.png" mode="" /> 121 + <image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />
122 <view class="fixedName"> 122 <view class="fixedName">
123 菜品分类 123 菜品分类
124 </view> 124 </view>
125 </view> 125 </view>
126 <view class="right flex-cmc"> 126 <view class="right flex-cmc">
127 - <image src="../img2.png" mode="" /> 127 + <image src="https://qn.colorcun.com/WechatIMG701.png" mode="" />
128 <view class="fixedName"> 128 <view class="fixedName">
129 已选菜品 129 已选菜品
130 </view> 130 </view>
1 import util from '../../utils/util'; 1 import util from '../../utils/util';
2 import App from '../../utils/api'; 2 import App from '../../utils/api';
3 Page({ 3 Page({
  4 + data: {
  5 + list:[],
  6 + },
4 onLoad() { 7 onLoad() {
5 this.init(); 8 this.init();
6 this.getlist(); 9 this.getlist();
7 }, 10 },
8 getlist() { 11 getlist() {
9 - App.Activity.ActivityListByOpenid().then((json) => { 12 + App.Activity.GetNewRechargeListByOpenid().then((json) => {
10 console.log(json); 13 console.log(json);
11 if (json.ret == 200) { 14 if (json.ret == 200) {
12 this.setData({ 15 this.setData({
13 - list: json.data.concat(json.data) 16 + list: json.data
14 }) 17 })
15 } 18 }
16 }) 19 })
@@ -20,9 +23,10 @@ Page({ @@ -20,9 +23,10 @@ Page({
20 let reg = /ios/i; 23 let reg = /ios/i;
21 let pt = 20; //导航状态栏上内边距 24 let pt = 20; //导航状态栏上内边距
22 let h = 44; //导航状态栏高度 25 let h = 44; //导航状态栏高度
  26 + console.log(systemInfo.system);
23 if (reg.test(systemInfo.system)) { 27 if (reg.test(systemInfo.system)) {
24 pt = systemInfo.statusBarHeight; 28 pt = systemInfo.statusBarHeight;
25 - h = 44; 29 + h = 130;
26 } else { 30 } else {
27 pt = systemInfo.statusBarHeight; 31 pt = systemInfo.statusBarHeight;
28 h = 48; 32 h = 48;
1 <!--pages/taocan/coupon_news.wxml 用户端--我的--卡券--> 1 <!--pages/taocan/coupon_news.wxml 用户端--我的--卡券-->
2 -<nav>优惠券</nav> 2 +<wxs src="../../utils/util.wxs" module="util" />
  3 +<nav>卡券</nav>
3 <scroll-view class="list" style="height:{{contentHeight}}px;padding-bottom: 140rpx;" bindscrolltolower="getnext" scroll-y> 4 <scroll-view class="list" style="height:{{contentHeight}}px;padding-bottom: 140rpx;" bindscrolltolower="getnext" scroll-y>
4 <block wx:for="{{list}}"> 5 <block wx:for="{{list}}">
5 <view class="card bg-white {{mark}}" bindtap="todetail" data-id="{{item.aid}}"> 6 <view class="card bg-white {{mark}}" bindtap="todetail" data-id="{{item.aid}}">
6 <view class="flex-vl {{mark=='canuse' ? 'orange-font' : 'gray-font'}} card-main {{mark}}" style="justify-content:space-between;"> 7 <view class="flex-vl {{mark=='canuse' ? 'orange-font' : 'gray-font'}} card-main {{mark}}" style="justify-content:space-between;">
7 <view class="seller-info flex-ll"> 8 <view class="seller-info flex-ll">
8 - <view class="smooth font-siny font32r">{{item.sellername}}</view> 9 + <view class="smooth font-siny font32r" wx:if="{{item.recharge_name}}">{{item.recharge_name}}</view>
9 </view> 10 </view>
10 - <view class="font24r font-bold text1">{{item.aname}}</view>  
11 - <view class="font24r font-bold text1">NO.01774420230223150306</view> 11 + <view class="font24r font-bold text1" wx:if="{{item.sellername}}">{{item.sellername}}</view>
  12 + <view class="font24r font-bold text1" wx:if="{{item.order_no}}">{{item.order_no}}</view>
12 </view> 13 </view>
13 <button class="flex-cc card-info font30r font-bold smooth" style="color:{{mark=='canuse' ? '#F05522' : '#999999'}};">{{mark=='used' ? (item.status==1 ? '已使用' : '已过期') : '去使用'}}</button> 14 <button class="flex-cc card-info font30r font-bold smooth" style="color:{{mark=='canuse' ? '#F05522' : '#999999'}};">{{mark=='used' ? (item.status==1 ? '已使用' : '已过期') : '去使用'}}</button>
14 - <view class="{{mark=='canuse' ? 'orange-font' : 'gray-font'}} font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY.MM.DD HH:II')}}-{{util.unixtoTime(item.etime,'YYYY.MM.DD HH:II')}}</view> 15 + <view class="{{mark=='canuse' ? 'orange-font' : 'gray-font'}} font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}}-{{util.unixtoTime(item.etime,'YYYY-MM-DD')}}</view>
15 </view> 16 </view>
16 </block> 17 </block>
17 </scroll-view> 18 </scroll-view>
18 -<view class="card-used flex-cc bg-white gray-font font32r" bindtap="toused">查看卡券历史记录<view class="more" style="margin-left: 20rpx;"></view> 19 +<view class="card-used flex-cc bg-white gray-font font32r">
  20 + <view class="wananchi">
  21 + 关注<text>周到安排</text>公众号,及时获取更多优惠信息
  22 + </view>
  23 + <view class="more" style="margin-left: 20rpx;"></view>
19 </view> 24 </view>
20 <menu></menu> 25 <menu></menu>
21 <service></service> 26 <service></service>
@@ -58,8 +58,8 @@ @@ -58,8 +58,8 @@
58 58
59 .card-info { 59 .card-info {
60 padding: 0 26rpx; 60 padding: 0 26rpx;
61 - height: 40rpx;  
62 - line-height: 40rpx; 61 + height: 54rpx;
  62 + line-height: 54rpx;
63 box-sizing: border-box; 63 box-sizing: border-box;
64 margin: 0; 64 margin: 0;
65 position: absolute; 65 position: absolute;
@@ -125,19 +125,29 @@ @@ -125,19 +125,29 @@
125 } 125 }
126 126
127 .card-used { 127 .card-used {
128 - width: 100%; 128 + width: 90%;
  129 + box-sizing: border-box;
129 height: 120rpx; 130 height: 120rpx;
130 box-shadow: 0 0 8rpx #EEF0F2; 131 box-shadow: 0 0 8rpx #EEF0F2;
131 background: #FFFFFF; 132 background: #FFFFFF;
132 - position: fixed;  
133 - left: 0;  
134 - bottom: 0; 133 + display: flex;
  134 + align-items: center;
  135 + justify-content: center;
  136 + margin: 0 auto;
  137 + color: #999999;
  138 + font-family: PingFang SC;
  139 + font-weight: 500;
  140 + font-size: 28rpx;
  141 +}
  142 +
  143 +.wananchi text{
  144 + color: #515151;
135 } 145 }
136 146
137 .texts { 147 .texts {
138 width: 100%; 148 width: 100%;
139 height: 60rpx; 149 height: 60rpx;
140 - padding-left: 42rpx; 150 + padding-left: 24rpx;
141 box-sizing: border-box; 151 box-sizing: border-box;
142 display: flex; 152 display: flex;
143 align-items: center; 153 align-items: center;
@@ -651,4 +651,13 @@ export default { @@ -651,4 +651,13 @@ export default {
651 openid:'openid' 651 openid:'openid'
652 }, 652 },
653 653
  654 + // 未使用优惠券列表
  655 + 'App.Activity.GetNewRechargeListByOrderid':{
  656 + openid:'openid'
  657 + },
  658 +
  659 + // 未使用优惠券列表
  660 + 'App.Activity.GetNewRechargeListByOpenid':{
  661 + openid:'openid'
  662 + },
654 } 663 }