作者 wumengyu

优化最高最低人数,修改饭票头像,加已过期状态,

... ... @@ -56,8 +56,8 @@ Page({
},
//输入最高人数失去焦点时
maxNumBlur() {
if(+this.data.min_num>+this.data.max_num) {
wx.showToast({title:'最低人数不能高于最高人数',icon:'none'});
if(+this.data.min_num >= +this.data.max_num) {
wx.showToast({title:'最高人数要大于最低人数',icon:'none'});
this.setData({max_num:''});
}
},
... ... @@ -99,7 +99,7 @@ Page({
let newTime = new Date().getTime();//当前时间戳
let end_time = app.preTime(this.data.date + ' ' +this.data.time, this.data.over_time);//截止时间
let endTime = new Date(end_time).getTime(); //截止时间戳
console.log('newTime', 'endTime', 'end_time', endTime - newTime >=0,newTime, endTime, end_time,this.data.date + ' ' +this.data.time);
// console.log('newTime', 'endTime', 'end_time', endTime - newTime >=0,newTime, endTime, end_time,this.data.date + ' ' +this.data.time);
if (endTime - newTime <= 0) { //不可发布目前时间到截止小时內的订单
wx.showToast({title:'截止时间无效',icon:'none'});
this.setData({over_time:''})
... ...
... ... @@ -23,15 +23,17 @@
</view>
<view class="set-box">
<view class="min-num">
<view class="min-num num-box">
<text class="title">最低人数</text>
<input type="number" bindinput="inputMinNum" class="input"/>
<text class="iconfont icon-xiangxia min-icon"></text>
<text class="iconfont icon-xiangxia min-icon icon-min"></text>
<text class="tips">* 不包括自己</text>
</view>
<view class="min-num">
<view class="min-num num-box">
<text class="title">最高人数</text>
<input type="number" bindinput="inputMaxNum" class="input" bindblur="maxNumBlur" value="{{max_num}}"/>
<text class="iconfont icon-xiangxia min-icon"></text>
<text class="iconfont icon-xiangxia min-icon icon-min"></text>
<text class="tips">* 不包括自己</text>
</view>
<view class="min-num">
<text class="title type-title">类别</text>
... ...
... ... @@ -114,6 +114,19 @@
top:50%;
transform: translate(0,-50%);
}
.num-box {
width:100%;
}
.icon-min {
position: absolute;
left:248rpx;
right:0;
}
.num-box .tips {
font-size: 18rpx;
color: #999999;
margin-left: 10rpx;
}
.time-box, .address-box {
display: flex;
align-items: center;
... ...
... ... @@ -53,8 +53,8 @@ Page({
//输入最高人数失去焦点时
maxNumBlur() {
console.log('最低人数-最高人数',+this.data.min_num, +this.data.max_num,this.data.min_num>this.data.max_num,+this.data.min_num>+this.data.max_num);
if(+this.data.min_num>+this.data.max_num) {
wx.showToast({title:'最低人数不能高于最高人数',icon:'none'});
if(+this.data.min_num >= +this.data.max_num) {
wx.showToast({title:'最高人数要大于最低人数',icon:'none'});
this.setData({max_num:''});
}
},
... ...
... ... @@ -29,15 +29,17 @@
<!--<text class="iconfont icon-xiangxia min-icon icon-min"></text>-->
<!--<text class="tips">注:最低拼单人数</text>-->
<!--</view>-->
<view class="min-num">
<view class="min-num num-box">
<text class="title">最低人数</text>
<input type="number" bindinput="inputMinNum" class="input"/>
<text class="iconfont icon-xiangxia min-icon"></text>
<text class="iconfont icon-xiangxia min-icon icon-min"></text>
<text class="tips">* 不包括自己</text>
</view>
<view class="min-num">
<view class="min-num num-box">
<text class="title">最高人数</text>
<input type="number" bindinput="inputMaxNum" class="input" bindblur="maxNumBlur" value="{{max_num}}"/>
<text class="iconfont icon-xiangxia min-icon"></text>
<text class="iconfont icon-xiangxia min-icon icon-min"></text>
<text class="tips">* 不包括自己</text>
</view>
<!--<view class="min-num">-->
<!--<text class="title">最高人数</text>-->
... ...
... ... @@ -50,7 +50,7 @@ Page({
*/
onLoad: function (options) {
console.log('options', options);
this.setData({id:+options.id?+options.id:''})
this.setData({id:+options.id?+options.id:'',user_pic:app.globalData.userInfo.avatarUrl})
},
/**
... ...
... ... @@ -5,7 +5,7 @@
<view class="bg">
<view class="head">
<!--<image src="../../../../images/avatar@2x.png"></image>-->
<image src="{{detail.userPic}}"></image>
<image src="{{user_pic}}"></image>
<text class="name">{{detail.userName}}</text>
<!--<text class="phone">手机号: 13026256485</text>-->
<text class="num">{{detail.number}}人</text>
... ...
... ... @@ -370,6 +370,7 @@ Page({
this.setData({
user:res.data.member
});
wx.setStorageSync('is_vip',+this.data.user.type);//1:不是2:是vip
console.log('score',wx.getStorageSync('score'));
if(wx.getStorageSync('score') !== '' && wx.getStorageSync('score')>=80) {
self.setData({show_gold_modal:true})
... ...
... ... @@ -8,7 +8,7 @@
</view>
<!--<view class="margin">-->
<image src="{{user.pic}}" class="user-img"></image>
<!--type :1注册用户,2后台用户-->
<!--type :1注册用户,2后台用户金v-->
<text class="iconfont icon-vip" wx:if="{{user.type === 2}}"></text>
<!--<image src="{{user.sex === 1?'../../images/man.png':'../../images/women.png'}}" class="sex-icon"></image>-->
<view class="left">
... ...
... ... @@ -12,13 +12,15 @@
<!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
<view class="circle change"></view>
<text wx:if="{{order_detail.status === 5 || order_detail.status === 10}}">已取消</text>
<text wx:if="{{order_detail.status === 11}}">已过期</text>
<text wx:if="{{order_detail.status === 4|| order_detail.status === 6 || order_detail.status === 7 || order_detail.status === 8}}">已拼成</text>
<text wx:if="{{order_detail.status === 2 || order_detail.status === 3}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text>
<text wx:if="{{order_detail.status === 2}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text>
<text wx:if="{{order_detail.status === 3}}" class="{{order_detail.status === 3?'change-text':''}}">未拼成</text>
</view>
<view class="state3">
<view class="circle {{order_detail.status === 6?'change':''}}"></view>
<text wx:if="{{order_detail.status === 6}}">已完成</text>
<text wx:if="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5|| order_detail.status === 3 ||order_detail.status === 8 || order_detail.status === 10}}" class="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5?'change-text':''}}">待完成</text>
<text wx:if="{{order_detail.status === 11 || order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5|| order_detail.status === 3 ||order_detail.status === 8 || order_detail.status === 10}}" class="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5?'change-text':''}}">待完成</text>
</view>
</view>
... ...
/* pages/order/complain/complain.wxss */
@import '../order-detail/order-detail.wxss';
.order-info {
display: flex;
flex-direction: column;
padding: 40rpx 20rpx 0 20rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.order-info .top {
display: flex;
align-items: center;
position: relative;
}
.order-info .text {
color: #666666;
font-size: 24rpx;
... ...
... ... @@ -12,6 +12,7 @@
<!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
<view class="circle change"></view>
<text wx:if="{{detail.status === 5 || detail.status === 10}}">已取消</text>
<text wx:if="{{detail.status === 11}}">已过期</text>
<text wx:if="{{detail.status === 4 || detail.status === 6 || detail.status === 7 || detail.status === 8}}">已拼成</text>
<text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
<text wx:if="{{detail.status === 3}}" class="{{detail.status === 3?'change-text':''}}">未拼成</text>
... ... @@ -19,7 +20,7 @@
<view class="state3">
<view class="circle {{detail.status === 6?'change':''}}"></view>
<text wx:if="{{detail.status === 6}}">已完成</text>
<text wx:if="{{detail.status === 4 || detail.status === 2 || detail.status === 3||detail.status === 5|| detail.status === 8 || detail.status === 10}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
<text wx:if="{{detail.status === 4 || detail.status === 2 || detail.status === 3||detail.status === 5|| detail.status === 8 || detail.status === 10|| detail.status === 11}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
</view>
</view>
... ...
... ... @@ -26,6 +26,7 @@
<text wx:if="{{item.status === 5 || item.status === 10}}" class="state">已取消</text>
<text wx:if="{{item.status === 6}}" class="state">已完成</text>
<text wx:if="{{item.status === 7}}" class="state">已评价</text>
<text wx:if="{{item.status === 11}}" class="state">已过期</text>
</view>
<view class="time">{{item.time}}</view>
<view class="name-box">
... ... @@ -44,7 +45,7 @@
<!--</block>-->
<!--1发起人-->
<block wx:if="{{item.type === 1}}">
<text wx:if="{{item.status === 5 || item.status === 10 || item.status === 6 || item.status === 3 || item.status === 7}}"
<text wx:if="{{item.status === 11 || item.status === 5 || item.status === 10 || item.status === 6 || item.status === 3 || item.status === 7}}"
catchtap="del" data-id="{{item.id}}">删除</text>
</block>
<text wx:if="{{item.status === 4}}" catchtap="complete" data-id="{{item.id}}">完成</text>
... ...