Commit 307fe7bfba7fed91f9b98708f328db391e9d209c

Authored by yiren
1 parent 39697eeb

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

@@ -11,9 +11,9 @@ Page({ @@ -11,9 +11,9 @@ Page({
11 name: '', 11 name: '',
12 id:'', 12 id:'',
13 oid:'', 13 oid:'',
14 - use:{},  
15 sid:'', 14 sid:'',
16 }, 15 },
  16 + use:{},
17 detail:{}, 17 detail:{},
18 exp_date:{}, 18 exp_date:{},
19 num: 1, 19 num: 1,
@@ -26,12 +26,12 @@ Page({ @@ -26,12 +26,12 @@ Page({
26 */ 26 */
27 onLoad(options) { 27 onLoad(options) {
28 this.setData({ 28 this.setData({
  29 + use:JSON.parse(options.use),
29 opt:{ 30 opt:{
30 id:options.id, 31 id:options.id,
31 name:options.name, 32 name:options.name,
32 sid:options.sid, 33 sid:options.sid,
33 oid:options.oid, 34 oid:options.oid,
34 - use:JSON.parse(options.use)  
35 } 35 }
36 }) 36 })
37 console.log('onLoad',{...this.data.opt}); 37 console.log('onLoad',{...this.data.opt});
@@ -108,6 +108,14 @@ Page({ @@ -108,6 +108,14 @@ Page({
108 }).then(res=>{ 108 }).then(res=>{
109 console.log(res); 109 console.log(res);
110 if(res.ret=='200'){ 110 if(res.ret=='200'){
  111 + let totalize=this.data.totalize*1;
  112 + if(totalize==0){
  113 + util.toast('购买成功','none');
  114 + wx.reLaunch({
  115 + url: '/pages/me/coupon_news'
  116 + })
  117 + return
  118 + }
111 wx.navigateTo({ 119 wx.navigateTo({
112 url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&orderId=${res.data.id}&totalize=${this.data.totalize}`, 120 url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&orderId=${res.data.id}&totalize=${this.data.totalize}`,
113 }) 121 })
@@ -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 - <text class="font30r" bindtap="subtraction">-</text> 15 + <image class="countimgs" src="./bb.png" bindtap="subtraction"/>
16 <input type="number" model:value="{{num}}" /> 16 <input type="number" model:value="{{num}}" />
17 - <text class="font30r" bindtap="addition">+</text> 17 + <image class="countimgs" src="./add.png" bindtap="addition" mode=""/>
18 </view> 18 </view>
19 </view> 19 </view>
20 </view> 20 </view>
@@ -42,21 +42,21 @@ @@ -42,21 +42,21 @@
42 {{util.unixtoTime(detail.etime,'YYYY-MM-DD')}} 42 {{util.unixtoTime(detail.etime,'YYYY-MM-DD')}}
43 </view> 43 </view>
44 </view> 44 </view>
45 - <view class="info"> 45 + <view class="info info2">
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*1}}" class="info_right text_info font32r" > 49 + <view 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 </view>
52 - <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none*1}}" 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>
55 - <view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday*1}}" class="info_right text_info font32r" >  
56 - 生日当天可用 55 + <view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" >
  56 + 会员生日当天
57 </view> 57 </view>
58 </view> 58 </view>
59 - <view class="info"> 59 + <view wx:if="{{detail.explain}}" class="info">
60 <view class="info_left font32r"> 60 <view class="info_left font32r">
61 券说明 61 券说明
62 </view> 62 </view>
@@ -10,14 +10,18 @@ page { @@ -10,14 +10,18 @@ page {
10 justify-content: space-between; 10 justify-content: space-between;
11 align-items: center; 11 align-items: center;
12 margin-left: 32rpx; 12 margin-left: 32rpx;
13 - border-bottom: 2rpx solid #E7E7E7; 13 + border-bottom:2rpx solid #E7E7E7;
14 } 14 }
15 15
16 .info1 { 16 .info1 {
17 padding: 28rpx 40rpx; 17 padding: 28rpx 40rpx;
18 padding-right: 24rpx; 18 padding-right: 24rpx;
19 margin-left: 0; 19 margin-left: 0;
20 - border-bottom: 2rpx solid #dbdbdb; 20 + border-bottom: 4rpx solid #DBDBDB;
  21 +}
  22 +
  23 +.info2{
  24 + border-bottom: 4rpx solid #DBDBDB;
21 } 25 }
22 26
23 .info_left { 27 .info_left {
@@ -53,8 +57,9 @@ page { @@ -53,8 +57,9 @@ page {
53 margin: 0 14rpx; 57 margin: 0 14rpx;
54 } 58 }
55 59
56 -.operation text {  
57 - padding: 16rpx; 60 +.countimgs {
  61 + width: 32rpx;
  62 + height: 32rpx;
58 } 63 }
59 64
60 .text_info { 65 .text_info {
@@ -92,7 +97,6 @@ page { @@ -92,7 +97,6 @@ page {
92 .shoppingCart_img { 97 .shoppingCart_img {
93 position: relative; 98 position: relative;
94 } 99 }
95 -  
96 .shoppingCart_img view { 100 .shoppingCart_img view {
97 width: 38rpx; 101 width: 38rpx;
98 height: 38rpx; 102 height: 38rpx;
1 // pack-activity/pack/confirmPayment.js 1 // pack-activity/pack/confirmPayment.js
2 -import util from '../../utils/util'; 2 +import util, { unixtoTime } from '../../utils/util';
3 import App from '../../utils/api'; 3 import App from '../../utils/api';
4 Page({ 4 Page({
5 5
@@ -13,14 +13,28 @@ Page({ @@ -13,14 +13,28 @@ Page({
13 totalize:'', 13 totalize:'',
14 }, 14 },
15 type: '', 15 type: '',
16 - price:'',  
17 - detail:{},  
18 time: 300, 16 time: 300,
19 countdown: '', 17 countdown: '',
20 - tip: '',  
21 date: "", 18 date: "",
  19 + sex:"先生",
  20 + sexObj:{},
  21 + index:0,
  22 + sexList:[
  23 + {
  24 + sex:'先生',
  25 + value:'1',
  26 + },
  27 + {
  28 + sex:'女士',
  29 + value:'2',
  30 + },
  31 + {
  32 + sex:'公司',
  33 + value:'3',
  34 + }
  35 + ]
22 }, 36 },
23 - 37 +
24 /** 38 /**
25 * 生命周期函数--监听页面加载 39 * 生命周期函数--监听页面加载
26 */ 40 */
@@ -29,9 +43,10 @@ Page({ @@ -29,9 +43,10 @@ Page({
29 opt:{ 43 opt:{
30 detail:options.detail?JSON.parse(options.detail):'', 44 detail:options.detail?JSON.parse(options.detail):'',
31 orderId:options.orderId, 45 orderId:options.orderId,
32 - totalize:options.totalize?options.totalize:'' 46 + totalize:options.totalize?options.totalize:'',
  47 + sellerid:options.sellerid?options.sellerid:'',
33 }, 48 },
34 - type:options.type 49 + type:options.type,
35 }) 50 })
36 console.log('onLoad',{...this.data.opt}); 51 console.log('onLoad',{...this.data.opt});
37 this.countdown() 52 this.countdown()
@@ -40,31 +55,17 @@ Page({ @@ -40,31 +55,17 @@ Page({
40 showModal() { 55 showModal() {
41 this.modal.showModal() //调用组件中打开模态框方法 56 this.modal.showModal() //调用组件中打开模态框方法
42 }, 57 },
43 - recharge(){  
44 - console.log('11111111111111111',this.data.opt.detail.oid);  
45 - this.closeModal()  
46 - wx.reLaunch({  
47 - url: `/miniprogram/pages/customer/detail_owner_invitation_new.wxml?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`  
48 - })  
49 - },  
50 - certificate(){  
51 - console.log('11111111111111111',this.data.opt.detail.oid);  
52 - this.closeModal()  
53 - wx.reLaunch({  
54 - url: '/miniprogram/pages/me/coupon_news'  
55 - })  
56 - },  
57 confirmPayment(){ 58 confirmPayment(){
58 - console.log(11111);  
59 App.PayOnline.CombineTransactionsByRecharge({ 59 App.PayOnline.CombineTransactionsByRecharge({
60 id:this.data.opt.orderId 60 id:this.data.opt.orderId
61 }).then(res=>{ 61 }).then(res=>{
62 - console.log(res.ret); 62 + console.log(res.data);
  63 + let that=this;
  64 + if(res.ret!='200'){
  65 + return util.toast(res.msg,'none');
  66 + }
63 if(res.ret=='200'){ 67 if(res.ret=='200'){
64 console.log(res.ret); 68 console.log(res.ret);
65 - this.setData({  
66 - price:res.data.price  
67 - })  
68 wx.requestPayment({ 69 wx.requestPayment({
69 timeStamp: res.data.timeStamp+'', 70 timeStamp: res.data.timeStamp+'',
70 nonceStr: res.data.nonceStr, 71 nonceStr: res.data.nonceStr,
@@ -72,22 +73,40 @@ Page({ @@ -72,22 +73,40 @@ Page({
72 signType: res.data.signType, 73 signType: res.data.signType,
73 paySign: res.data.paySign, 74 paySign: res.data.paySign,
74 success (ress) { 75 success (ress) {
75 - this.showModal() 76 + if (ress.errMsg == 'requestPayment:ok') {
  77 + that.showModal()
  78 + console.log('支付成功',ress);
  79 + }
  80 + console.log('支付失败',ress);
76 }, 81 },
77 fail (ress) { 82 fail (ress) {
78 - console.log(ress);  
79 - } 83 + console.log('支付失败',ress);
  84 + },
80 }) 85 })
81 } 86 }
82 }) 87 })
83 - 88 + },
  89 + recharge(){
  90 + console.log('充值完成跳转',this.data.opt.detail.oid);
  91 + this.closeModal()
  92 + wx.reLaunch({
  93 + url: `/pages/customer/detail_owner_invitation_new?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
  94 + })
  95 + },
  96 + certificate(){
  97 + this.closeModal()
  98 + wx.reLaunch({
  99 + url: '/pages/me/coupon_news'
  100 + })
84 }, 101 },
85 closeModal() { 102 closeModal() {
86 this.modal.closeModal() //调用组件中关闭模态框方法 103 this.modal.closeModal() //调用组件中关闭模态框方法
87 }, 104 },
88 - // 充值————点击确认支付 105 + // 点击确认支付
89 formSubmit(e) { 106 formSubmit(e) {
90 - console.log(this.data.type); 107 + if(this.data.time==0){
  108 + return util.toast('当前订单已过期,请重新进入优惠券购买页面下单', 'none');
  109 + }
91 if(this.data.type=='2'){ 110 if(this.data.type=='2'){
92 let form=e.detail.value 111 let form=e.detail.value
93 if (!form.name) { 112 if (!form.name) {
@@ -102,18 +121,47 @@ Page({ @@ -102,18 +121,47 @@ Page({
102 util.toast('手机号码错误', 'none') 121 util.toast('手机号码错误', 'none')
103 return; 122 return;
104 } 123 }
  124 + let recharge_money=this.data.opt.detail.recharge_money*1;
  125 + if(recharge_money==0){
  126 + setTimeout(() => {
  127 + util.toast('您的会员充值已经在办理中,到店消费时请和收银核实,谢谢!','none',3000);
  128 + wx.navigateBack(1)
  129 + }, 3500);
  130 + return
  131 + }
  132 + this.addInfo(form)
  133 + }else{
  134 + this.confirmPayment()
105 } 135 }
106 - console.log(1111);  
107 - this.confirmPayment() 136 + },
  137 + addInfo(form){
  138 + App.GuestManage.InsGuest({
  139 + sellerid:this.data.opt.sellerid,
  140 + rname:form.name,
  141 + sex:this.data.sexObj.value,//1男 2女 3公司
  142 + phone:form.phone,
  143 +
  144 + })
108 }, 145 },
109 // 选择日期 146 // 选择日期
110 bind_ChangeDate(event) { 147 bind_ChangeDate(event) {
111 - console.log();  
112 let date = event.detail.value 148 let date = event.detail.value
113 this.setData({ 149 this.setData({
114 date 150 date
115 }) 151 })
116 }, 152 },
  153 + // 选择性别
  154 + bind_Changesex(event){
  155 + console.log('event.detail',{...event.detail});
  156 + let index = event.detail.value
  157 + let sexObj = this.data.sexList[index]
  158 + this.setData({
  159 + sexObj,
  160 + index
  161 + })
  162 + console.log('sexsexsex',sexObj);
  163 + console.log('index',index);
  164 + },
117 /** 165 /**
118 * 生命周期函数--监听页面初次渲染完成 166 * 生命周期函数--监听页面初次渲染完成
119 */ 167 */
@@ -129,15 +177,24 @@ Page({ @@ -129,15 +177,24 @@ Page({
129 }, 177 },
130 // 倒计时 178 // 倒计时
131 countdown() { 179 countdown() {
132 - var minute = Math.floor(this.data.time / 60);  
133 - var second = this.data.time % 60 180 + var minute = Math.floor(this.data.time*1 / 60);
  181 + var second = this.data.time % 60;
134 second < 10 ? second = '0' + second : ''; 182 second < 10 ? second = '0' + second : '';
135 this.setData({ 183 this.setData({
136 countdown: minute + ':' + second, 184 countdown: minute + ':' + second,
137 time: this.data.time - 1 185 time: this.data.time - 1
138 }) 186 })
  187 + if(this.data.time==0){
  188 + this.setData({
  189 + countdown: '0:00'
  190 + })
  191 + return false;
  192 + }
139 setTimeout(this.countdown, 1000); 193 setTimeout(this.countdown, 1000);
140 }, 194 },
  195 + navEvent(){
  196 + wx.navigateBack(2);
  197 + },
141 /** 198 /**
142 * 生命周期函数--监听页面隐藏 199 * 生命周期函数--监听页面隐藏
143 */ 200 */
1 <!--pack-activity/pack/confirmPayment.wxml 代金券和充值支付页面--> 1 <!--pack-activity/pack/confirmPayment.wxml 代金券和充值支付页面-->
2 -<nav>{{opt.detail.name}}</nav> 2 +<nav bindNavEvent="navEvent">{{opt.detail.name}}</nav>
3 <view class="box_wrap"> 3 <view class="box_wrap">
4 <view wx:if="{{type=='1'}}" class="box"> 4 <view wx:if="{{type=='1'}}" class="box">
5 <view class="countdown font24r"> 5 <view class="countdown font24r">
6 支付剩余时间 {{countdown}} 6 支付剩余时间 {{countdown}}
7 </view> 7 </view>
8 <view class="money_text"> 8 <view class="money_text">
9 - {{opt.detail.aname}} 9 + {{opt.totalize}}
10 </view> 10 </view>
11 <view class="nameText font24r"> 11 <view class="nameText font24r">
12 {{opt.detail.totalize}} 12 {{opt.detail.totalize}}
@@ -20,8 +20,12 @@ @@ -20,8 +20,12 @@
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="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" /> 23 + <input class="weui-input name-input" name="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" />
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">
  26 + <text class="sexText">{{sexList[index].sex}}</text>
  27 + <image src="./imgs.png" mode="" class="imgs"/>
  28 + </picker>
25 </view> 29 </view>
26 <view class="page-section"> 30 <view class="page-section">
27 <view class="page-section-title font32r">联系电话</view> 31 <view class="page-section-title font32r">联系电话</view>
@@ -44,19 +48,25 @@ @@ -44,19 +48,25 @@
44 {{opt.detail.recharge_money}}元 48 {{opt.detail.recharge_money}}元
45 </view> 49 </view>
46 </view> 50 </view>
  51 + <view class="page-section">
  52 + <view class="page-section-title font32r">支付剩余时间 </view>
  53 + <view class="weui-cells weui-cell__bd sum colorSty">
  54 + {{countdown}}
  55 + </view>
  56 + </view>
  57 + <view wx:if="{{type=='2'}}" class="fixed_box">
  58 + <button class="font32r btns" formType="submit">确认支付
  59 + </button>
  60 + </view>
47 </form> 61 </form>
48 </view> 62 </view>
49 </view> 63 </view>
50 -<view wx:if="{{type=='2'}}" class="fixed_box">  
51 - <button class="font32r btns" formType="submit">确认支付  
52 - </button>  
53 -</view>  
54 <view wx:if="{{type=='1'}}" class="fixed_box"> 64 <view wx:if="{{type=='1'}}" class="fixed_box">
55 <button class="font32r btns" bindtap="formSubmit">确认支付 65 <button class="font32r btns" bindtap="formSubmit">确认支付
56 </button> 66 </button>
57 </view> 67 </view>
58 <my-modal id="payModal" fadeStyle="slideUp" height="380px"> 68 <my-modal id="payModal" fadeStyle="slideUp" height="380px">
59 - <view slot="modalName" class="titleModal">成功支付{{price}}元</view> 69 + <view slot="modalName" class="titleModal">成功支付{{opt.totalize}}元</view>
60 <view slot="modalContent"> 70 <view slot="modalContent">
61 <view class="explain" wx:if="{{type=='2'}}"> 71 <view class="explain" wx:if="{{type=='2'}}">
62 您的会员充值已经在办理中,到店消费时请和收银核实,谢谢! 72 您的会员充值已经在办理中,到店消费时请和收银核实,谢谢!
@@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
112 .page-section-title { 112 .page-section-title {
113 color: #515151; 113 color: #515151;
114 font-family: PingFang SC; 114 font-family: PingFang SC;
115 - margin-right: 30rpx; 115 + margin-right: 32rpx;
116 } 116 }
117 117
118 .weui-input { 118 .weui-input {
@@ -120,6 +120,11 @@ @@ -120,6 +120,11 @@
120 margin-right: 30rpx; 120 margin-right: 30rpx;
121 font-size: 32rpx; 121 font-size: 32rpx;
122 } 122 }
  123 +.name-input{
  124 + margin-right: 0;
  125 + text-align: left;
  126 +}
  127 +
123 128
124 .pickerBox { 129 .pickerBox {
125 display: flex; 130 display: flex;
@@ -145,3 +150,13 @@ @@ -145,3 +150,13 @@
145 color: #999999; 150 color: #999999;
146 font-size: 32rpx; 151 font-size: 32rpx;
147 } 152 }
  153 +
  154 +.pickerSex image{
  155 + width: 48rpx;
  156 + height: 48rpx;
  157 + margin-right: 30rpx;
  158 +}
  159 +.sexText{
  160 + position: relative;
  161 + top: -10rpx;
  162 +}
@@ -13,6 +13,7 @@ Page({ @@ -13,6 +13,7 @@ Page({
13 }, 13 },
14 stime: '', 14 stime: '',
15 etime:'', 15 etime:'',
  16 + exp_date:{},
16 }, 17 },
17 18
18 /** 19 /**
@@ -46,14 +47,17 @@ Page({ @@ -46,14 +47,17 @@ Page({
46 id: this.data.opt.id 47 id: this.data.opt.id
47 }).then(res => { 48 }).then(res => {
48 let detail=res.data[0]; 49 let detail=res.data[0];
49 - let stime=util.unixtoTime(detail.stime,'YYYY-MM-DD');  
50 - let etime=util.unixtoTime(detail.etime,'YYYY-MM-DD'); 50 + let stime=util.unixtoTime(detail.stime,'YYYY.MM.DD HH:II');
  51 + let etime=util.unixtoTime(detail.etime,'YYYY.MM.DD HH:II');
  52 + let exp_date=detail.exp_date?JSON.parse(detail.exp_date):'';
51 this.setData({ 53 this.setData({
52 detail, 54 detail,
53 stime, 55 stime,
54 - etime 56 + etime,
  57 + exp_date
55 }) 58 })
56 console.log('detail',{...detail}); 59 console.log('detail',{...detail});
  60 + console.log('exp_date',exp_date);
57 }) 61 })
58 }, 62 },
59 /** 63 /**
@@ -30,12 +30,33 @@ @@ -30,12 +30,33 @@
30 {{etime}} 30 {{etime}}
31 </view> 31 </view>
32 </view> 32 </view>
33 - <view class="info"> 33 + <view wx:if="{{exp_date.is_week==='1' || exp_date.is_week===true}}" class="info infoWeek">
  34 + <view class="flex-lr infoWeek1">
  35 + <view class="info_left font32r">
  36 + 使用限制:
  37 + </view>
  38 + <view class="info_right text_info font32r">
  39 + 每周指定日期餐段可用
  40 + </view>
  41 + </view>
  42 + <text class="weekShow">
  43 + {{exp_date.week_show}}
  44 + </text>
  45 + </view>
  46 + <view wx:if="{{exp_date.is_birthday==='1' || exp_date.is_birthday===true}}" class="info">
  47 + <view class="info_left font32r">
  48 + 使用限制:
  49 + </view>
  50 + <view class="info_right text_info font32r">
  51 + 会员生日当天
  52 + </view>
  53 + </view>
  54 + <view wx:if="{{exp_date.is_none==='1' || exp_date.is_none===true}}" class="info">
34 <view class="info_left font32r"> 55 <view class="info_left font32r">
35 使用限制: 56 使用限制:
36 </view> 57 </view>
37 <view class="info_right text_info font32r"> 58 <view class="info_right text_info font32r">
38 - <!-- 没做 --> 59 + 无限制
39 </view> 60 </view>
40 </view> 61 </view>
41 <view class="info info1"> 62 <view class="info info1">
@@ -17,6 +17,27 @@ @@ -17,6 +17,27 @@
17 border-bottom: none; 17 border-bottom: none;
18 } 18 }
19 19
  20 +.infoWeek {
  21 + width: 100%;
  22 + flex-direction: column;
  23 + padding-bottom: 0 !important;
  24 +}
  25 +
  26 +.infoWeek1 {
  27 + box-sizing: border-box;
  28 + width: 100%;
  29 + padding-right: 32rpx;
  30 +}
  31 +
  32 +.weekShow {
  33 + width: 100%;
  34 + color: #999999;
  35 + font-family: PingFang SC;
  36 + font-size: 32rpx;
  37 + position: relative;
  38 + top: -10rpx;
  39 +}
  40 +
20 .info_left { 41 .info_left {
21 color: #515151; 42 color: #515151;
22 font-family: PingFang SC; 43 font-family: PingFang SC;
@@ -88,10 +88,9 @@ Page({ @@ -88,10 +88,9 @@ Page({
88 price:this.data.detail.recharge_money, 88 price:this.data.detail.recharge_money,
89 type:'2', 89 type:'2',
90 }).then(res=>{ 90 }).then(res=>{
91 - console.log(res);  
92 if(res.ret=='200'){ 91 if(res.ret=='200'){
93 wx.navigateTo({ 92 wx.navigateTo({
94 - url: `./confirmPayment?type=2&detail=${JSON.stringify(detail)}&orderId=${res.data.id}`, 93 + url: `./confirmPayment?type=2&detail=${JSON.stringify(detail)}&sellerid=${this.data.opt.sid}&orderId=${res.data.id}&totalize=${this.data.detail.recharge_money}`,
95 }) 94 })
96 }else{ 95 }else{
97 wx.showToast({ 96 wx.showToast({
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 {{item.aname}} 51 {{item.aname}}
52 </view> 52 </view>
53 </view> 53 </view>
54 - <view class="week" wx:if="{{exp_date.is_week=='1'}}"> 54 + <view class="week" wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}">
55 <view class="week_top"> 55 <view class="week_top">
56 <view class="week_left font32r"> 56 <view class="week_left font32r">
57 充值日期限制: 57 充值日期限制:
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 {{exp_date.week_date_show}} 64 {{exp_date.week_date_show}}
65 </view> 65 </view>
66 </view> 66 </view>
67 - <view class="week" wx:if="{{exp_date.is_birthday=='1'}}"> 67 + <view class="week" wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}">
68 <view class="week_top"> 68 <view class="week_top">
69 <view class="week_left font32r"> 69 <view class="week_left font32r">
70 充值日期限制: 70 充值日期限制:
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 </view> 74 </view>
75 </view> 75 </view>
76 </view> 76 </view>
77 - <view class="week" wx:if="{{exp_date.is_fix=='1'}}"> 77 + <view class="week" wx:if="{{exp_date.is_fix=='1' || exp_date.is_fix===true}}">
78 <view class="week_top"> 78 <view class="week_top">
79 <view class="week_left font32r"> 79 <view class="week_left font32r">
80 充值日期限制: 80 充值日期限制:
@@ -102,9 +102,9 @@ page { @@ -102,9 +102,9 @@ page {
102 102
103 .list { 103 .list {
104 margin: 0 32rpx; 104 margin: 0 32rpx;
105 - padding-bottom: 24rpx;  
106 display: flex; 105 display: flex;
107 align-items: center; 106 align-items: center;
  107 + flex-wrap: wrap;
108 border-bottom: 2rpx solid #dbdbdb; 108 border-bottom: 2rpx solid #dbdbdb;
109 } 109 }
110 110
@@ -112,6 +112,7 @@ page { @@ -112,6 +112,7 @@ page {
112 color: #0143a3; 112 color: #0143a3;
113 font-family: PingFang SC; 113 font-family: PingFang SC;
114 margin-right: 18rpx; 114 margin-right: 18rpx;
  115 + padding-bottom: 24rpx;
115 } 116 }
116 117
117 .week { 118 .week {
@@ -27,7 +27,7 @@ Page({ @@ -27,7 +27,7 @@ Page({
27 recharge_data:{}, 27 recharge_data:{},
28 coupon_data:{}, 28 coupon_data:{},
29 homeColor: '', 29 homeColor: '',
30 - use:'', 30 + stringifyUse:'',
31 current: 0, 31 current: 0,
32 theme: 'blackGold', //blue green blackGold 32 theme: 'blackGold', //blue green blackGold
33 seller: { 33 seller: {
@@ -270,7 +270,7 @@ Page({ @@ -270,7 +270,7 @@ Page({
270 store = data.store ? JSON.parse(data.store) : ''; 270 store = data.store ? JSON.parse(data.store) : '';
271 home = data.home ? JSON.parse(data.home) : ''; 271 home = data.home ? JSON.parse(data.home) : '';
272 coupon_data=marketing.coupon_data; 272 coupon_data=marketing.coupon_data;
273 - let use=JSON.stringify(marketing.coupon_data.use) 273 + let stringifyUse=JSON.stringify(marketing.coupon_data.use)
274 if(marketing.is_recharge=='1' && marketing.recharge_data){ 274 if(marketing.is_recharge=='1' && marketing.recharge_data){
275 let recharge_data=marketing.recharge_data 275 let recharge_data=marketing.recharge_data
276 recharge_list=marketing.recharge_data.recharge_list 276 recharge_list=marketing.recharge_data.recharge_list
@@ -284,7 +284,7 @@ Page({ @@ -284,7 +284,7 @@ Page({
284 } 284 }
285 this.setData({ 285 this.setData({
286 coupon_data, 286 coupon_data,
287 - use 287 + stringifyUse
288 }) 288 })
289 // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 289 // is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
290 if(marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){ 290 if(marketing.is_coupon=='1' && coupon_data && (!coupon_data.use.is_cash || coupon_data.use.is_cash=='1')){
@@ -295,8 +295,7 @@ Page({ @@ -295,8 +295,7 @@ Page({
295 console.log('price',price); 295 console.log('price',price);
296 console.log('discount',discount); 296 console.log('discount',discount);
297 this.setData({ 297 this.setData({
298 - discount,  
299 - coupon_data 298 + discount
300 }) 299 })
301 } 300 }
302 if(store && store.images.length>0) store.images =store.images?JSON.parse(store.images):''; 301 if(store && store.images.length>0) store.images =store.images?JSON.parse(store.images):'';
@@ -311,6 +310,8 @@ Page({ @@ -311,6 +310,8 @@ Page({
311 }else{ 310 }else{
312 homeColor ='67,142,147,1' 311 homeColor ='67,142,147,1'
313 } 312 }
  313 + console.log('coupon_data', coupon_data);
  314 + console.log('stringifyUse', stringifyUse);
314 console.log('chef', chef); 315 console.log('chef', chef);
315 console.log('reserve', reserve); 316 console.log('reserve', reserve);
316 console.log('signboard', signboard); 317 console.log('signboard', signboard);
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <view class="introduce" wx:if="{{store && store.style=='1'}}"> 84 <view class="introduce" wx:if="{{store && store.style=='1'}}">
85 <view class="IntroductionItems" wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex"> 85 <view class="IntroductionItems" wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
86 <view class="imgMask"> 86 <view class="imgMask">
87 - <image src="{{item}}" mode="aspectFill" /> 87 + <!-- <image src="{{item}}" mode="aspectFill" /> -->
88 <view class="IntroduceColor chief Introducepublic {{theme+'chief'}}" wx:if="{{arryIndex=='0'}}"> 88 <view class="IntroduceColor chief Introducepublic {{theme+'chief'}}" wx:if="{{arryIndex=='0'}}">
89 <view class="englishText">Introduce</view> 89 <view class="englishText">Introduce</view>
90 <view class="chefText">品牌介绍</view> 90 <view class="chefText">品牌介绍</view>
@@ -117,7 +117,7 @@ @@ -117,7 +117,7 @@
117 </text> 117 </text>
118 </view> 118 </view>
119 </view> 119 </view>
120 - <image src="{{item}}" mode="aspectFill"/> 120 + <!-- <image src="{{item}}" mode="aspectFill"/> -->
121 </view> 121 </view>
122 </view> 122 </view>
123 </view> 123 </view>
@@ -198,19 +198,19 @@ @@ -198,19 +198,19 @@
198 <text>{{coupon_data.aname}}</text> 198 <text>{{coupon_data.aname}}</text>
199 <text class="price" wx:if="{{coupon_data.price}}">¥{{coupon_data.price}}</text> 199 <text class="price" wx:if="{{coupon_data.price}}">¥{{coupon_data.price}}</text>
200 <!-- is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 --> 200 <!-- is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 -->
201 - <text wx:if="{{coupon_data.use.is_cash=='1' || coupon_data.use.is_cash}}" class="discount">{{discount}}折</text> 201 + <text wx:if="{{discount!='0.00' && (coupon_data.use.is_cash=='1' || coupon_data.use.is_cash)}}" class="discount">{{discount}}折</text>
202 </view> 202 </view>
203 - <view wx:if="{{coupon_data.exp_date.is_week=='1' || coupon_data.exp_date.is_week}}" class="bottom" > 203 + <view wx:if="{{coupon_data.exp_date.is_week=='1' || coupon_data.exp_date.is_week===true}}" class="bottom" >
204 {{coupon_data.exp_date.week_show?coupon_data.exp_date.week_show+'可用':''}}{{coupon_data.desc?','+coupon_data.desc+'。':'。'}} 204 {{coupon_data.exp_date.week_show?coupon_data.exp_date.week_show+'可用':''}}{{coupon_data.desc?','+coupon_data.desc+'。':'。'}}
205 </view> 205 </view>
206 - <view wx:if="{{coupon_data.exp_date.is_none=='1' || coupon_data.exp_date.is_none}}" class="bottom" > 206 + <view wx:if="{{coupon_data.exp_date.is_none=='1' || coupon_data.exp_date.is_none===true}}" class="bottom" >
207 无限制{{coupon_data.desc?','+coupon_data.desc+'。':'。'}} 207 无限制{{coupon_data.desc?','+coupon_data.desc+'。':'。'}}
208 </view> 208 </view>
209 - <view wx:if="{{coupon_data.exp_date.is_birthday=='1' || coupon_data.exp_date.is_birthday}}" class="bottom" >  
210 - 生日当天可用{{coupon_data.desc?','+coupon_data.desc+'。':'。'}} 209 + <view wx:if="{{coupon_data.exp_date.is_birthday=='1' || coupon_data.exp_date.is_birthday===true}}" class="bottom" >
  210 + 会员生日当天可用{{coupon_data.desc?','+coupon_data.desc+'。':'。'}}
211 </view> 211 </view>
212 </view> 212 </view>
213 - <navigator url="/pack-activity/pack/buyCoupon?id={{coupon_data.id}}&name={{seller.name}}&use={{use}}&sid={{seller.sid}}&oid={{detail.id}}" hover-class="navigator-hover"> 213 + <navigator url="/pack-activity/pack/buyCoupon?id={{coupon_data.id}}&name={{seller.name}}&use={{stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}" hover-class="navigator-hover">
214 <view class="font24r orderingFood"> 214 <view class="font24r orderingFood">
215 去抢购 215 去抢购
216 </view> 216 </view>
@@ -644,5 +644,11 @@ export default { @@ -644,5 +644,11 @@ export default {
644 //合单支付 644 //合单支付
645 'App.PayOnline.CombineTransactionsByRecharge':{ 645 'App.PayOnline.CombineTransactionsByRecharge':{
646 openid:'openid' 646 openid:'openid'
647 - } 647 + },
  648 +
  649 + //新增客户信息
  650 + 'App.GuestManage.InsGuest':{
  651 + openid:'openid'
  652 + },
  653 +
648 } 654 }