Commit 80ed847f2286b7acaf7fcf006557dbfcb8944f73

Authored by yiren
1 parent 8cf0cdf8

券和充值

<!--components/modal.wxml-->
<!--遮罩层-->
<view class='mask' wx:if="{{showModalStatus}}" bindtap='closeModal' style="opacity:{{opacity}}"></view>
<view class='mask' wx:if="{{showModalStatus}}" style="opacity:{{opacity}}"></view>
<!--弹出模态框-->
<view class='mymodal' wx:if="{{showModalStatus}}" style='width:{{width}};height:{{height}};top:{{top}};bottom:{{bottom}};left:{{left}};right:{{right}}'>
<!-- 模态框title -->
... ...
... ... @@ -16,6 +16,10 @@ Component({
type: Boolean,
value: false
},
back: {
type: String,
value: false
},
place:{
type:Boolean,
value:true
... ... @@ -39,7 +43,11 @@ Component({
methods: {
back(){
this.triggerEvent('NavEvent');
wx.navigateBack();
if(this.data.back=='none'){
console.log('back none');
}else{
wx.navigateBack()
}
},
home(){
if (!this.data.disHome) return;
... ...
... ... @@ -2,7 +2,7 @@
<block wx:for="{{roomlist}}" wx:key="{{index}}">
<block wx:if="{{item.status==1}}">
<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">
<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>
<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>
<block wx:if="{{item.max && item.max!=0}}">
<view class="font24r room-more">最多可坐{{item.max}}人</view>
</block>
... ...
... ... @@ -12,6 +12,7 @@ Page({
id:'',
oid:'',
sid:'',
types:'1',//1是邀请函过来的
},
use:{},
detail:{},
... ... @@ -32,6 +33,7 @@ Page({
name:options.name,
sid:options.sid,
oid:options.oid,
types:options.types
}
})
console.log('onLoad',{...this.data.opt});
... ... @@ -117,7 +119,7 @@ Page({
return
}
wx.navigateTo({
url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}`,
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}`,
})
}else{
wx.showToast({
... ...
... ... @@ -46,16 +46,19 @@
<view class="info_left font32r">
使用限制:
</view>
<text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" >
{{exp_date.week_show?exp_date.week_show+'可用':''}}
</text>
<view wx:if="{{exp_date.is_none=='1' || exp_date.is_none===true}}" class="info_right text_info font32r" >
无限制
</view>
<view wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info_right text_info font32r" >
每周指定日期可用
</view>
<view wx:if="{{exp_date.is_birthday=='1' || exp_date.is_birthday===true}}" class="info_right text_info font32r" >
会员生日当天
</view>
</view>
<text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" >
{{exp_date.week_show?exp_date.week_show:''}}
</text>
<view wx:if="{{detail.explain}}" class="info">
<view class="info_left font32r">
券说明
... ...
... ... @@ -21,7 +21,6 @@ page {
}
.info2{
padding: 0 32rpx 32rpx 0;
border-bottom: 4rpx solid #DBDBDB;
}
... ... @@ -32,6 +31,7 @@ page {
}
.info_right {
padding-top: 0;
display: flex;
align-items: center;
}
... ... @@ -62,6 +62,7 @@ page {
.countimgs {
width: 32rpx;
height: 32rpx;
padding: 16rpx;
}
.text_info {
... ... @@ -69,6 +70,10 @@ page {
font-family: PingFang SC;
}
.text_info1{
letter-spacing:2rpx;
}
.explain_news {
padding: 24rpx 32rpx;
color: #999999;
... ...
... ... @@ -11,6 +11,7 @@ Page({
detail:{},
combine_out_trade_no:'',
totalize:'',
types:'',
},
type: '',
time: 300,
... ... @@ -20,7 +21,7 @@ Page({
phone:"",
calendarData:'',
sex:"先生",
index:0,
indexs:0,
sexList:[
{
sex:'先生',
... ... @@ -47,23 +48,22 @@ Page({
combine_out_trade_no:options.combine_out_trade_no,
totalize:options.totalize?options.totalize:'',
sellerid:options.sellerid?options.sellerid:'',
types:options.types,
},
type:options.type,
})
console.log('onLoad',{...this.data.opt});
let obj=wx.getStorageSync('info')
console.log('objobjobjobj',{...obj})
this.setData({
name:obj.name,
date:obj.date,
phone:obj.phone,
index:obj.sex*1-1,
calendarData:obj.calendarData,
})
this.data.name=obj.name;
this.data.date=obj.date;
this.data.phone=obj.phone;
this.data.index=obj.sex*1-1;
if(obj){
this.setData({
name:obj.name,
date:obj.date,
phone:obj.phone,
indexs:obj.sex*1-1,
calendarData:obj.calendarData,
})
}
this.countdown()
this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件
},
... ... @@ -194,7 +194,7 @@ Page({
let params={
sellerid:this.data.opt.sellerid,
rname:this.data.name,
sex:this.data.index*1+1,//1男 2女 3公司
sex:this.data.indexs*1+1,//1男 2女 3公司
phone:this.data.phone,
c_day:this.data.calendarData
}
... ... @@ -206,7 +206,7 @@ Page({
let obj={
name:this.data.name,
phone:this.data.phone,
sex:this.data.index*1+1,
sex:this.data.indexs*1+1,
calendarData:this.data.calendarData,
date:this.data.date,
}
... ... @@ -217,13 +217,7 @@ Page({
// 选择日期
bind_ChangeDate(event) {
let date = event.detail.value
let dateGl=event.detail.value.split('-');
let calendarData;
if(dateGl.length==3){
calendarData=dateGl[0]+'年'+dateGl[1]+'月'+dateGl[2]+'日(公历)';
console.log(dateGl);
console.log(calendarData);
}
var calendarData = new Date(date)*1;
this.setData({
date,
calendarData
... ... @@ -232,11 +226,11 @@ Page({
// 选择性别
bind_Changesex(event){
console.log('event.detail',{...event.detail});
let index = event.detail.value;
let indexs = event.detail.value;
this.setData({
index
indexs
})
console.log('index',index);
console.log('indexs',indexs);
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -269,7 +263,11 @@ Page({
setTimeout(this.countdown, 1000);
},
navEvent(){
wx.navigateBack(2);
if(this.data.opt.types=='1'){
wx.reLaunch({
url: '/pages/customer/detail_owner_invitation_new?id='+this.data.opt.detail.oid,
})
}
},
/**
* 生命周期函数--监听页面隐藏
... ...
<!--pack-activity/pack/confirmPayment.wxml 代金券和充值支付页面-->
<nav bindNavEvent="navEvent">{{opt.detail.name}}</nav>
<nav bindNavEvent="navEvent" back="none">{{opt.detail.name}}</nav>
<view class="box_wrap">
<view wx:if="{{type=='1'}}" class="box">
<view class="countdown font24r">
... ... @@ -22,8 +22,8 @@
<view class="weui-cells weui-cell__bd" style="margin: 30rpx 0">
<input class="weui-input name-input" value="{{name}}" data-params="name" placeholder="点击输入您的姓名" placeholder-style="color:#999;" bindinput="bindKeyNameInput"/>
</view>
<picker mode="selector" value="{{index}}" range-key="sex" data-sex='{{sexList[index].sex}}' range="{{sexList}}" bindchange="bind_Changesex" class="pickerSex">
<text class="sexText">{{sexList[index].sex}}</text>
<picker mode="selector" value="{{indexs}}" range-key="sex" data-sex='{{sexList[indexs].sex}}' range="{{sexList}}" bindchange="bind_Changesex" class="pickerSex">
<text class="sexText">{{sexList[indexs].sex}}</text>
<image src="https://qn.colorcun.com/WechatIMG695.png" mode="" class="imgs"/>
</picker>
</view>
... ...
... ... @@ -80,7 +80,7 @@
</view>
<view class="explain_news">{{detail.activity.explain}}</view>
</view>
<view class="btns" wx:if="{{detail.is_examine!='1' && detail.is_expire!='1'}}">
<view class="btns" wx:if="{{detail.is_examine!='1' && detail.is_expire!='1' && detail.price!='0'}}">
<button class="font24r" plain="true" bindtap="subscribeDrawback">申请退费</button>
</view>
<view class="canteen_box" bindtap="getReserve">
... ...
... ... @@ -12,6 +12,7 @@ Page({
id:'',
sid:'',
oid:'',
types:'',
},
exp_date:{},
detail:{},
... ... @@ -27,7 +28,8 @@ Page({
id:options.id,
name:options.name,
sid:options.sid,
oid:options.oid
oid:options.oid,
types:options.types,
}
})
console.log('onLoad',{...this.data.opt});
... ... @@ -90,7 +92,7 @@ Page({
}).then(res=>{
if(res.ret=='200'){
wx.navigateTo({
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}`,
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}`,
})
}else{
wx.showToast({
... ...
... ... @@ -210,7 +210,7 @@
会员生日当天可用{{coupon_data.desc?','+coupon_data.desc+'。':'。'}}
</view>
</view>
<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">
<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">
<view class="font24r orderingFood">
去抢购
</view>
... ... @@ -232,7 +232,7 @@
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送优惠券':''}}。
</view>
</view>
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}" hover-class="navigator-hover">
<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">
<view class="font24r orderingFood">
去充值
</view>
... ...
... ... @@ -8,7 +8,11 @@ Page({
page:1,
size:10,
hasMore:true,
onLoad() {
isShow:false,
onShow() {
this.setData({
list:[]
})
this.init();
this.getlist();
},
... ... @@ -36,6 +40,7 @@ Page({
this.setData({
list
})
this.isShow=true
}
})
... ...
... ... @@ -12,15 +12,18 @@
<view class="font24r font-bold text1" wx:if="{{item.order_no}}">{{item.order_no}}</view>
</view>
<!-- status 状态 1 待支付 2 已支付 3 支付失败 4 退款中 5 已退款 is_expire 1未失效 -->
<image wx:if="{{item.is_examine=='1'}}" src="https://qn.colorcun.com/WechatIMG713.png" class="imgs1" mode="" />
<image wx:if="{{item.is_examine=='1' && item.is_comment!='1'}}" src="https://qn.colorcun.com/WechatIMG713.png" class="imgs1" mode="" />
<image wx:if="{{item.is_expire=='1'}}" src="https://qn.colorcun.com/WechatIMG714.png" class="imgs1" mode="" />
<image wx:if="{{item.status=='4'}}" src="https://qn.colorcun.com/WechatIMG1.png" class="imgs1" mode="" />
<image wx:if="{{item.status=='5'}}" src="https://qn.colorcun.com/WechatIMG2.png" class="imgs1" mode="" />
<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>
<image wx:if="{{item.is_examine=='1' && item.is_comment=='1'}}" src="https://qn.colorcun.com/A1.png" class="imgs1" mode="" />
<!-- is_comment 1已评论 is_examine 1已核销 is_expire 1已过期-->
<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>
<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>
<view class="font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}} 至 {{util.unixtoTime(item.etime,'YYYY-MM-DD')}}</view>
</view>
</block>
<block wx:else>
<block wx:if="{{list.length=='0' && isShow}}">
<view class="flex-vc">
<view class="empty-img"></view>
<view class="empty-txt">暂时没有优惠券哦~</view>
... ...
... ... @@ -58,7 +58,7 @@ Page({
onLoad: function (options) {
console.log('options',{...options});
this.options=options
this.data.types=options.options?options.types:'1';
this.data.types=options.types?options.types:'1';
this.initPage()
},
async initPage(){
... ... @@ -202,19 +202,35 @@ Page({
enclosure:JSON.stringify(enclosure),
identity:1,
text:this.text||'',
types:this.data.types,
types:this.data.types,//types为1时 rid就是预订ID types为2时 rid就是套餐ID types为3时 rid就是卡券ID
grade:this.statVal,
isnoshow:this.data.isnoshow
isnoshow:this.data.isnoshow
}
App.User.SetComment(params).then(res=>{
if(res.ret!=200){
return util.toast(res.msg,'');
return util.toast(res.msg,'none');
}
// types 3卡券验券评论
if(this.data.types=='3'){
this.commentFun()
}else{
wx.redirectTo({
url:'./success?sellername='+this.options.sellername
})
}
}).catch(e=>{
this.submitIng=false
})
},
// 设置券订单评论状态
commentFun(){
App.Activity.SetNewRechargeOrderByIsComment({
id:this.options.oid
}).then(res=>{
console.log(res);
wx.redirectTo({
url:'./success?sellername='+this.options.sellername
})
}).catch(e=>{
this.submitIng=false
})
},
setnoshow(){
... ...
... ... @@ -675,4 +675,9 @@ export default {
'App.PayOnline.CombineTransactionsByNewRecharge':{
openid:'openid'
},
// 券订单评论状态
'App.Activity.SetNewRechargeOrderByIsComment':{
openid:'openid'
},
}
\ No newline at end of file
... ...