Showing
15 changed files
with
98 additions
and
51 deletions
| 1 | <!--components/modal.wxml--> | 1 | <!--components/modal.wxml--> |
| 2 | <!--遮罩层--> | 2 | <!--遮罩层--> |
| 3 | -<view class='mask' wx:if="{{showModalStatus}}" bindtap='closeModal' style="opacity:{{opacity}}"></view> | 3 | +<view class='mask' wx:if="{{showModalStatus}}" style="opacity:{{opacity}}"></view> |
| 4 | <!--弹出模态框--> | 4 | <!--弹出模态框--> |
| 5 | <view class='mymodal' wx:if="{{showModalStatus}}" style='width:{{width}};height:{{height}};top:{{top}};bottom:{{bottom}};left:{{left}};right:{{right}}'> | 5 | <view class='mymodal' wx:if="{{showModalStatus}}" style='width:{{width}};height:{{height}};top:{{top}};bottom:{{bottom}};left:{{left}};right:{{right}}'> |
| 6 | <!-- 模态框title --> | 6 | <!-- 模态框title --> |
| @@ -16,6 +16,10 @@ Component({ | @@ -16,6 +16,10 @@ Component({ | ||
| 16 | type: Boolean, | 16 | type: Boolean, |
| 17 | value: false | 17 | value: false |
| 18 | }, | 18 | }, |
| 19 | + back: { | ||
| 20 | + type: String, | ||
| 21 | + value: false | ||
| 22 | + }, | ||
| 19 | place:{ | 23 | place:{ |
| 20 | type:Boolean, | 24 | type:Boolean, |
| 21 | value:true | 25 | value:true |
| @@ -39,7 +43,11 @@ Component({ | @@ -39,7 +43,11 @@ Component({ | ||
| 39 | methods: { | 43 | methods: { |
| 40 | back(){ | 44 | back(){ |
| 41 | this.triggerEvent('NavEvent'); | 45 | this.triggerEvent('NavEvent'); |
| 42 | - wx.navigateBack(); | 46 | + if(this.data.back=='none'){ |
| 47 | + console.log('back none'); | ||
| 48 | + }else{ | ||
| 49 | + wx.navigateBack() | ||
| 50 | + } | ||
| 43 | }, | 51 | }, |
| 44 | home(){ | 52 | home(){ |
| 45 | if (!this.data.disHome) return; | 53 | if (!this.data.disHome) return; |
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <block wx:for="{{roomlist}}" wx:key="{{index}}"> | 2 | <block wx:for="{{roomlist}}" wx:key="{{index}}"> |
| 3 | <block wx:if="{{item.status==1}}"> | 3 | <block wx:if="{{item.status==1}}"> |
| 4 | <view class="room-item black-font {{((item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1)) && false ? 'bg-gray' : 'bg-yellow'}} {{item.selectnum>0?'border-yellow':''}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="selectroom"> | 4 | <view class="room-item black-font {{((item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1)) && false ? 'bg-gray' : 'bg-yellow'}} {{item.selectnum>0?'border-yellow':''}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="selectroom"> |
| 5 | - <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view> | 5 | + <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view> |
| 6 | <block wx:if="{{item.max && item.max!=0}}"> | 6 | <block wx:if="{{item.max && item.max!=0}}"> |
| 7 | <view class="font24r room-more">最多可坐{{item.max}}人</view> | 7 | <view class="font24r room-more">最多可坐{{item.max}}人</view> |
| 8 | </block> | 8 | </block> |
| @@ -12,6 +12,7 @@ Page({ | @@ -12,6 +12,7 @@ Page({ | ||
| 12 | id:'', | 12 | id:'', |
| 13 | oid:'', | 13 | oid:'', |
| 14 | sid:'', | 14 | sid:'', |
| 15 | + types:'1',//1是邀请函过来的 | ||
| 15 | }, | 16 | }, |
| 16 | use:{}, | 17 | use:{}, |
| 17 | detail:{}, | 18 | detail:{}, |
| @@ -32,6 +33,7 @@ Page({ | @@ -32,6 +33,7 @@ Page({ | ||
| 32 | name:options.name, | 33 | name:options.name, |
| 33 | sid:options.sid, | 34 | sid:options.sid, |
| 34 | oid:options.oid, | 35 | oid:options.oid, |
| 36 | + types:options.types | ||
| 35 | } | 37 | } |
| 36 | }) | 38 | }) |
| 37 | console.log('onLoad',{...this.data.opt}); | 39 | console.log('onLoad',{...this.data.opt}); |
| @@ -117,7 +119,7 @@ Page({ | @@ -117,7 +119,7 @@ Page({ | ||
| 117 | return | 119 | return |
| 118 | } | 120 | } |
| 119 | wx.navigateTo({ | 121 | wx.navigateTo({ |
| 120 | - url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}`, | 122 | + url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=${this.data.opt.types}`, |
| 121 | }) | 123 | }) |
| 122 | }else{ | 124 | }else{ |
| 123 | wx.showToast({ | 125 | wx.showToast({ |
| @@ -46,16 +46,19 @@ | @@ -46,16 +46,19 @@ | ||
| 46 | <view class="info_left font32r"> | 46 | <view class="info_left font32r"> |
| 47 | 使用限制: | 47 | 使用限制: |
| 48 | </view> | 48 | </view> |
| 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+'可用':''}} | ||
| 51 | - </text> | ||
| 52 | <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" > | 49 | <view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" > |
| 53 | 无限制 | 50 | 无限制 |
| 54 | </view> | 51 | </view> |
| 52 | + <view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" > | ||
| 53 | + 每周指定日期可用 | ||
| 54 | + </view> | ||
| 55 | <view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" > | 55 | <view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" > |
| 56 | 会员生日当天 | 56 | 会员生日当天 |
| 57 | </view> | 57 | </view> |
| 58 | </view> | 58 | </view> |
| 59 | + <text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" > | ||
| 60 | + {{exp_date.week_show?exp_date.week_show:''}} | ||
| 61 | + </text> | ||
| 59 | <view wx:if="{{detail.explain}}" class="info"> | 62 | <view wx:if="{{detail.explain}}" class="info"> |
| 60 | <view class="info_left font32r"> | 63 | <view class="info_left font32r"> |
| 61 | 券说明 | 64 | 券说明 |
| @@ -21,7 +21,6 @@ page { | @@ -21,7 +21,6 @@ page { | ||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | .info2{ | 23 | .info2{ |
| 24 | - padding: 0 32rpx 32rpx 0; | ||
| 25 | border-bottom: 4rpx solid #DBDBDB; | 24 | border-bottom: 4rpx solid #DBDBDB; |
| 26 | } | 25 | } |
| 27 | 26 | ||
| @@ -32,6 +31,7 @@ page { | @@ -32,6 +31,7 @@ page { | ||
| 32 | } | 31 | } |
| 33 | 32 | ||
| 34 | .info_right { | 33 | .info_right { |
| 34 | + padding-top: 0; | ||
| 35 | display: flex; | 35 | display: flex; |
| 36 | align-items: center; | 36 | align-items: center; |
| 37 | } | 37 | } |
| @@ -62,6 +62,7 @@ page { | @@ -62,6 +62,7 @@ page { | ||
| 62 | .countimgs { | 62 | .countimgs { |
| 63 | width: 32rpx; | 63 | width: 32rpx; |
| 64 | height: 32rpx; | 64 | height: 32rpx; |
| 65 | + padding: 16rpx; | ||
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | .text_info { | 68 | .text_info { |
| @@ -69,6 +70,10 @@ page { | @@ -69,6 +70,10 @@ page { | ||
| 69 | font-family: PingFang SC; | 70 | font-family: PingFang SC; |
| 70 | } | 71 | } |
| 71 | 72 | ||
| 73 | +.text_info1{ | ||
| 74 | + letter-spacing:2rpx; | ||
| 75 | +} | ||
| 76 | + | ||
| 72 | .explain_news { | 77 | .explain_news { |
| 73 | padding: 24rpx 32rpx; | 78 | padding: 24rpx 32rpx; |
| 74 | color: #999999; | 79 | color: #999999; |
| @@ -11,6 +11,7 @@ Page({ | @@ -11,6 +11,7 @@ Page({ | ||
| 11 | detail:{}, | 11 | detail:{}, |
| 12 | combine_out_trade_no:'', | 12 | combine_out_trade_no:'', |
| 13 | totalize:'', | 13 | totalize:'', |
| 14 | + types:'', | ||
| 14 | }, | 15 | }, |
| 15 | type: '', | 16 | type: '', |
| 16 | time: 300, | 17 | time: 300, |
| @@ -20,7 +21,7 @@ Page({ | @@ -20,7 +21,7 @@ Page({ | ||
| 20 | phone:"", | 21 | phone:"", |
| 21 | calendarData:'', | 22 | calendarData:'', |
| 22 | sex:"先生", | 23 | sex:"先生", |
| 23 | - index:0, | 24 | + indexs:0, |
| 24 | sexList:[ | 25 | sexList:[ |
| 25 | { | 26 | { |
| 26 | sex:'先生', | 27 | sex:'先生', |
| @@ -47,23 +48,22 @@ Page({ | @@ -47,23 +48,22 @@ Page({ | ||
| 47 | combine_out_trade_no:options.combine_out_trade_no, | 48 | combine_out_trade_no:options.combine_out_trade_no, |
| 48 | totalize:options.totalize?options.totalize:'', | 49 | totalize:options.totalize?options.totalize:'', |
| 49 | sellerid:options.sellerid?options.sellerid:'', | 50 | sellerid:options.sellerid?options.sellerid:'', |
| 51 | + types:options.types, | ||
| 50 | }, | 52 | }, |
| 51 | type:options.type, | 53 | type:options.type, |
| 52 | }) | 54 | }) |
| 53 | console.log('onLoad',{...this.data.opt}); | 55 | console.log('onLoad',{...this.data.opt}); |
| 54 | let obj=wx.getStorageSync('info') | 56 | let obj=wx.getStorageSync('info') |
| 55 | console.log('objobjobjobj',{...obj}) | 57 | 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; | 58 | + if(obj){ |
| 59 | + this.setData({ | ||
| 60 | + name:obj.name, | ||
| 61 | + date:obj.date, | ||
| 62 | + phone:obj.phone, | ||
| 63 | + indexs:obj.sex*1-1, | ||
| 64 | + calendarData:obj.calendarData, | ||
| 65 | + }) | ||
| 66 | + } | ||
| 67 | this.countdown() | 67 | this.countdown() |
| 68 | this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件 | 68 | this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件 |
| 69 | }, | 69 | }, |
| @@ -194,7 +194,7 @@ Page({ | @@ -194,7 +194,7 @@ Page({ | ||
| 194 | let params={ | 194 | let params={ |
| 195 | sellerid:this.data.opt.sellerid, | 195 | sellerid:this.data.opt.sellerid, |
| 196 | rname:this.data.name, | 196 | rname:this.data.name, |
| 197 | - sex:this.data.index*1+1,//1男 2女 3公司 | 197 | + sex:this.data.indexs*1+1,//1男 2女 3公司 |
| 198 | phone:this.data.phone, | 198 | phone:this.data.phone, |
| 199 | c_day:this.data.calendarData | 199 | c_day:this.data.calendarData |
| 200 | } | 200 | } |
| @@ -206,7 +206,7 @@ Page({ | @@ -206,7 +206,7 @@ Page({ | ||
| 206 | let obj={ | 206 | let obj={ |
| 207 | name:this.data.name, | 207 | name:this.data.name, |
| 208 | phone:this.data.phone, | 208 | phone:this.data.phone, |
| 209 | - sex:this.data.index*1+1, | 209 | + sex:this.data.indexs*1+1, |
| 210 | calendarData:this.data.calendarData, | 210 | calendarData:this.data.calendarData, |
| 211 | date:this.data.date, | 211 | date:this.data.date, |
| 212 | } | 212 | } |
| @@ -217,13 +217,7 @@ Page({ | @@ -217,13 +217,7 @@ Page({ | ||
| 217 | // 选择日期 | 217 | // 选择日期 |
| 218 | bind_ChangeDate(event) { | 218 | bind_ChangeDate(event) { |
| 219 | 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 | - } | 220 | + var calendarData = new Date(date)*1; |
| 227 | this.setData({ | 221 | this.setData({ |
| 228 | date, | 222 | date, |
| 229 | calendarData | 223 | calendarData |
| @@ -232,11 +226,11 @@ Page({ | @@ -232,11 +226,11 @@ Page({ | ||
| 232 | // 选择性别 | 226 | // 选择性别 |
| 233 | bind_Changesex(event){ | 227 | bind_Changesex(event){ |
| 234 | console.log('event.detail',{...event.detail}); | 228 | console.log('event.detail',{...event.detail}); |
| 235 | - let index = event.detail.value; | 229 | + let indexs = event.detail.value; |
| 236 | this.setData({ | 230 | this.setData({ |
| 237 | - index | 231 | + indexs |
| 238 | }) | 232 | }) |
| 239 | - console.log('index',index); | 233 | + console.log('indexs',indexs); |
| 240 | }, | 234 | }, |
| 241 | /** | 235 | /** |
| 242 | * 生命周期函数--监听页面初次渲染完成 | 236 | * 生命周期函数--监听页面初次渲染完成 |
| @@ -269,7 +263,11 @@ Page({ | @@ -269,7 +263,11 @@ Page({ | ||
| 269 | setTimeout(this.countdown, 1000); | 263 | setTimeout(this.countdown, 1000); |
| 270 | }, | 264 | }, |
| 271 | navEvent(){ | 265 | navEvent(){ |
| 272 | - wx.navigateBack(2); | 266 | + if(this.data.opt.types=='1'){ |
| 267 | + wx.reLaunch({ | ||
| 268 | + url: '/pages/customer/detail_owner_invitation_new?id='+this.data.opt.detail.oid, | ||
| 269 | + }) | ||
| 270 | + } | ||
| 273 | }, | 271 | }, |
| 274 | /** | 272 | /** |
| 275 | * 生命周期函数--监听页面隐藏 | 273 | * 生命周期函数--监听页面隐藏 |
| 1 | <!--pack-activity/pack/confirmPayment.wxml 代金券和充值支付页面--> | 1 | <!--pack-activity/pack/confirmPayment.wxml 代金券和充值支付页面--> |
| 2 | -<nav bindNavEvent="navEvent">{{opt.detail.name}}</nav> | 2 | +<nav bindNavEvent="navEvent" back="none">{{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"> |
| @@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
| 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" value="{{name}}" data-params="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" bindinput="bindKeyNameInput"/> | 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"> | ||
| 26 | - <text class="sexText">{{sexList[index].sex}}</text> | 25 | + <picker mode="selector" value="{{indexs}}" range-key="sex" data-sex='{{sexList[indexs].sex}}' range="{{sexList}}" bindchange="bind_Changesex" class="pickerSex"> |
| 26 | + <text class="sexText">{{sexList[indexs].sex}}</text> | ||
| 27 | <image src="https://qn.colorcun.com/WechatIMG695.png" mode="" class="imgs"/> | 27 | <image src="https://qn.colorcun.com/WechatIMG695.png" mode="" class="imgs"/> |
| 28 | </picker> | 28 | </picker> |
| 29 | </view> | 29 | </view> |
| @@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
| 80 | </view> | 80 | </view> |
| 81 | <view class="explain_news">{{detail.activity.explain}}</view> | 81 | <view class="explain_news">{{detail.activity.explain}}</view> |
| 82 | </view> | 82 | </view> |
| 83 | - <view class="btns" wx:if="{{detail.is_examine!='1' && detail.is_expire!='1'}}"> | 83 | + <view class="btns" wx:if="{{detail.is_examine!='1' && detail.is_expire!='1' && detail.price!='0'}}"> |
| 84 | <button class="font24r" plain="true" bindtap="subscribeDrawback">申请退费</button> | 84 | <button class="font24r" plain="true" bindtap="subscribeDrawback">申请退费</button> |
| 85 | </view> | 85 | </view> |
| 86 | <view class="canteen_box" bindtap="getReserve"> | 86 | <view class="canteen_box" bindtap="getReserve"> |
| @@ -12,6 +12,7 @@ Page({ | @@ -12,6 +12,7 @@ Page({ | ||
| 12 | id:'', | 12 | id:'', |
| 13 | sid:'', | 13 | sid:'', |
| 14 | oid:'', | 14 | oid:'', |
| 15 | + types:'', | ||
| 15 | }, | 16 | }, |
| 16 | exp_date:{}, | 17 | exp_date:{}, |
| 17 | detail:{}, | 18 | detail:{}, |
| @@ -27,7 +28,8 @@ Page({ | @@ -27,7 +28,8 @@ Page({ | ||
| 27 | id:options.id, | 28 | id:options.id, |
| 28 | name:options.name, | 29 | name:options.name, |
| 29 | sid:options.sid, | 30 | sid:options.sid, |
| 30 | - oid:options.oid | 31 | + oid:options.oid, |
| 32 | + types:options.types, | ||
| 31 | } | 33 | } |
| 32 | }) | 34 | }) |
| 33 | console.log('onLoad',{...this.data.opt}); | 35 | console.log('onLoad',{...this.data.opt}); |
| @@ -90,7 +92,7 @@ Page({ | @@ -90,7 +92,7 @@ Page({ | ||
| 90 | }).then(res=>{ | 92 | }).then(res=>{ |
| 91 | if(res.ret=='200'){ | 93 | if(res.ret=='200'){ |
| 92 | wx.navigateTo({ | 94 | wx.navigateTo({ |
| 93 | - url: `./confirmPayment?type=2&detail=${JSON.stringify(detail)}&sellerid=${this.data.opt.sid}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.detail.recharge_money}`, | 95 | + url: `./confirmPayment?type=2&detail=${JSON.stringify(detail)}&sellerid=${this.data.opt.sid}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.detail.recharge_money}&types=${this.data.opt.types}`, |
| 94 | }) | 96 | }) |
| 95 | }else{ | 97 | }else{ |
| 96 | wx.showToast({ | 98 | wx.showToast({ |
| @@ -210,7 +210,7 @@ | @@ -210,7 +210,7 @@ | ||
| 210 | 会员生日当天可用{{coupon_data.desc?','+coupon_data.desc+'。':'。'}} | 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={{stringifyUse}}&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}}&types=1" hover-class="navigator-hover"> |
| 214 | <view class="font24r orderingFood"> | 214 | <view class="font24r orderingFood"> |
| 215 | 去抢购 | 215 | 去抢购 |
| 216 | </view> | 216 | </view> |
| @@ -232,7 +232,7 @@ | @@ -232,7 +232,7 @@ | ||
| 232 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送优惠券':''}}。 | 232 | {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送优惠券':''}}。 |
| 233 | </view> | 233 | </view> |
| 234 | </view> | 234 | </view> |
| 235 | - <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}" hover-class="navigator-hover"> | 235 | + <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> |
| 236 | <view class="font24r orderingFood"> | 236 | <view class="font24r orderingFood"> |
| 237 | 去充值 | 237 | 去充值 |
| 238 | </view> | 238 | </view> |
| @@ -8,7 +8,11 @@ Page({ | @@ -8,7 +8,11 @@ Page({ | ||
| 8 | page:1, | 8 | page:1, |
| 9 | size:10, | 9 | size:10, |
| 10 | hasMore:true, | 10 | hasMore:true, |
| 11 | - onLoad() { | 11 | + isShow:false, |
| 12 | + onShow() { | ||
| 13 | + this.setData({ | ||
| 14 | + list:[] | ||
| 15 | + }) | ||
| 12 | this.init(); | 16 | this.init(); |
| 13 | this.getlist(); | 17 | this.getlist(); |
| 14 | }, | 18 | }, |
| @@ -36,6 +40,7 @@ Page({ | @@ -36,6 +40,7 @@ Page({ | ||
| 36 | this.setData({ | 40 | this.setData({ |
| 37 | list | 41 | list |
| 38 | }) | 42 | }) |
| 43 | + this.isShow=true | ||
| 39 | 44 | ||
| 40 | } | 45 | } |
| 41 | }) | 46 | }) |
| @@ -12,15 +12,18 @@ | @@ -12,15 +12,18 @@ | ||
| 12 | <view class="font24r font-bold text1" wx:if="{{item.order_no}}">{{item.order_no}}</view> | 12 | <view class="font24r font-bold text1" wx:if="{{item.order_no}}">{{item.order_no}}</view> |
| 13 | </view> | 13 | </view> |
| 14 | <!-- status 状态 1 待支付 2 已支付 3 支付失败 4 退款中 5 已退款 is_expire 1未失效 --> | 14 | <!-- status 状态 1 待支付 2 已支付 3 支付失败 4 退款中 5 已退款 is_expire 1未失效 --> |
| 15 | - <image wx:if="{{item.is_examine=='1'}}" src="https://qn.colorcun.com/WechatIMG713.png" class="imgs1" mode="" /> | 15 | + <image wx:if="{{item.is_examine=='1' && item.is_comment!='1'}}" src="https://qn.colorcun.com/WechatIMG713.png" class="imgs1" mode="" /> |
| 16 | <image wx:if="{{item.is_expire=='1'}}" src="https://qn.colorcun.com/WechatIMG714.png" class="imgs1" mode="" /> | 16 | <image wx:if="{{item.is_expire=='1'}}" src="https://qn.colorcun.com/WechatIMG714.png" class="imgs1" mode="" /> |
| 17 | <image wx:if="{{item.status=='4'}}" src="https://qn.colorcun.com/WechatIMG1.png" class="imgs1" mode="" /> | 17 | <image wx:if="{{item.status=='4'}}" src="https://qn.colorcun.com/WechatIMG1.png" class="imgs1" mode="" /> |
| 18 | <image wx:if="{{item.status=='5'}}" src="https://qn.colorcun.com/WechatIMG2.png" class="imgs1" mode="" /> | 18 | <image wx:if="{{item.status=='5'}}" src="https://qn.colorcun.com/WechatIMG2.png" class="imgs1" mode="" /> |
| 19 | - <button wx:if="{{item.is_examine=='1' || (item.is_expire=='0'&& item.is_examine=='0' && item.status!='4' && item.status!='5')}}" class="flex-cc card-info font30r font-bold smooth">{{item.is_examine=='1' ? '去评价' : (item.is_expire=='0'&& item.is_examine=='0') ?'去使用': ''}}</button> | 19 | + <image wx:if="{{item.is_examine=='1' && item.is_comment=='1'}}" src="https://qn.colorcun.com/A1.png" class="imgs1" mode="" /> |
| 20 | + <!-- is_comment 1已评论 is_examine 1已核销 is_expire 1已过期--> | ||
| 21 | + <button wx:if="{{item.is_examine=='0' && item.is_expire=='0' && item.is_examine=='0' && item.status!='4' && item.status!='5'}}" class="flex-cc card-info font30r font-bold smooth">去使用</button> | ||
| 22 | + <button wx:if="{{item.is_examine=='1' && item.is_expire=='0' && item.status!='4' && item.status!='5' && item.is_comment!='1'}}" class="flex-cc card-info font30r font-bold smooth">去评价</button> | ||
| 20 | <view class="font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}} 至 {{util.unixtoTime(item.etime,'YYYY-MM-DD')}}</view> | 23 | <view class="font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}} 至 {{util.unixtoTime(item.etime,'YYYY-MM-DD')}}</view> |
| 21 | </view> | 24 | </view> |
| 22 | </block> | 25 | </block> |
| 23 | - <block wx:else> | 26 | + <block wx:if="{{list.length=='0' && isShow}}"> |
| 24 | <view class="flex-vc"> | 27 | <view class="flex-vc"> |
| 25 | <view class="empty-img"></view> | 28 | <view class="empty-img"></view> |
| 26 | <view class="empty-txt">暂时没有优惠券哦~</view> | 29 | <view class="empty-txt">暂时没有优惠券哦~</view> |
| @@ -58,7 +58,7 @@ Page({ | @@ -58,7 +58,7 @@ Page({ | ||
| 58 | onLoad: function (options) { | 58 | onLoad: function (options) { |
| 59 | console.log('options',{...options}); | 59 | console.log('options',{...options}); |
| 60 | this.options=options | 60 | this.options=options |
| 61 | - this.data.types=options.options?options.types:'1'; | 61 | + this.data.types=options.types?options.types:'1'; |
| 62 | this.initPage() | 62 | this.initPage() |
| 63 | }, | 63 | }, |
| 64 | async initPage(){ | 64 | async initPage(){ |
| @@ -202,19 +202,35 @@ Page({ | @@ -202,19 +202,35 @@ Page({ | ||
| 202 | enclosure:JSON.stringify(enclosure), | 202 | enclosure:JSON.stringify(enclosure), |
| 203 | identity:1, | 203 | identity:1, |
| 204 | text:this.text||'', | 204 | text:this.text||'', |
| 205 | - types:this.data.types, | 205 | + types:this.data.types,//types为1时 rid就是预订ID types为2时 rid就是套餐ID types为3时 rid就是卡券ID |
| 206 | grade:this.statVal, | 206 | grade:this.statVal, |
| 207 | - isnoshow:this.data.isnoshow | 207 | + isnoshow:this.data.isnoshow |
| 208 | } | 208 | } |
| 209 | App.User.SetComment(params).then(res=>{ | 209 | App.User.SetComment(params).then(res=>{ |
| 210 | if(res.ret!=200){ | 210 | if(res.ret!=200){ |
| 211 | - return util.toast(res.msg,''); | 211 | + return util.toast(res.msg,'none'); |
| 212 | } | 212 | } |
| 213 | + // types 3卡券验券评论 | ||
| 214 | + if(this.data.types=='3'){ | ||
| 215 | + this.commentFun() | ||
| 216 | + }else{ | ||
| 217 | + wx.redirectTo({ | ||
| 218 | + url:'./success?sellername='+this.options.sellername | ||
| 219 | + }) | ||
| 220 | + } | ||
| 221 | + }).catch(e=>{ | ||
| 222 | + this.submitIng=false | ||
| 223 | + }) | ||
| 224 | + }, | ||
| 225 | + // 设置券订单评论状态 | ||
| 226 | + commentFun(){ | ||
| 227 | + App.Activity.SetNewRechargeOrderByIsComment({ | ||
| 228 | + id:this.options.oid | ||
| 229 | + }).then(res=>{ | ||
| 230 | + console.log(res); | ||
| 213 | wx.redirectTo({ | 231 | wx.redirectTo({ |
| 214 | url:'./success?sellername='+this.options.sellername | 232 | url:'./success?sellername='+this.options.sellername |
| 215 | }) | 233 | }) |
| 216 | - }).catch(e=>{ | ||
| 217 | - this.submitIng=false | ||
| 218 | }) | 234 | }) |
| 219 | }, | 235 | }, |
| 220 | setnoshow(){ | 236 | setnoshow(){ |
| @@ -675,4 +675,9 @@ export default { | @@ -675,4 +675,9 @@ export default { | ||
| 675 | 'App.PayOnline.CombineTransactionsByNewRecharge':{ | 675 | 'App.PayOnline.CombineTransactionsByNewRecharge':{ |
| 676 | openid:'openid' | 676 | openid:'openid' |
| 677 | }, | 677 | }, |
| 678 | + | ||
| 679 | + // 券订单评论状态 | ||
| 680 | + 'App.Activity.SetNewRechargeOrderByIsComment':{ | ||
| 681 | + openid:'openid' | ||
| 682 | + }, | ||
| 678 | } | 683 | } |
-
Please register or login to post a comment