作者 wumengyu

修改客户提出的问题

... ... @@ -54,7 +54,7 @@ Page({
},
//输入最高人数失去焦点时
maxNumBlur() {
if(this.data.min_num>this.data.max_num) {
if(+this.data.min_num>+this.data.max_num) {
wx.showToast({title:'最低人数不能高于最高人数',icon:'none'});
this.setData({max_num:''});
}
... ...
... ... @@ -243,9 +243,9 @@ Page({
is_collect: res.data.is_collect,
count: res.data.count, // 留言板
});
// (0全部,2待处理,4已拼成,5已取消,6已完成
// (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除
const status = res.data.active.status;
if (status === 2 || status === 4 || status === 6 || status === 7) {
if (status === 2 || status === 6 || status === 7 || status === 8) {
console.log('调用倒计时');
self.countDown();
} else {
... ...
... ... @@ -89,7 +89,10 @@
<view class="bg">
<image src="{{item.pic}}" class="people-img"></image>
</view>
<view class="name">{{item.name}}</view>
<view class="people-num">
<view class="name">{{item.name}}</view>
<view class="num">({{item.number}})</view>
</view>
</view>
</view>
... ...
... ... @@ -240,9 +240,13 @@ swiper {
background-color: #FD8779;
margin-bottom: 10rpx;
}
.people .name {
width:100rpx;
text-align: center;
.people-num {
display: flex;
align-items: center;
}
.people-num .name {
width:100rpx;
text-align: center;
/* margin-right: 10rpx; */
color: #333333;
font-size: 22rpx;
... ... @@ -253,6 +257,10 @@ swiper {
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.people-num .num {
color: #333333;
font-size: 22rpx;
}
.comment-box {
padding: 20rpx;
-webkit-box-sizing: border-box;
... ...
... ... @@ -3,12 +3,13 @@
<image src="{{item.pic}}" mode="widthFix" data-id='{{index}}' style="height:{{img_heights[current_swiper]}}rpx;" bindload="imageLoad"></image>
<view class="area">
<text class="name">{{item.title}}</text>
<text class="num">距最低人数{{item.people}}人</text>
</view>
<!--<text>2018.4.28—4.30</text>-->
<view class="bottom">
<image src="{{item.pic}}" class="avatar" mode="aspectFill"></image>
<image src="{{item.userPic}}" class="avatar" mode="aspectFill"></image>
<text>{{item.time}}</text>
<!--<view>2018.4.28</view>-->
</view>
<view class="num">距最低人数{{item.people}}人</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -22,7 +22,7 @@
margin: 16rpx 0;
}
.name {
width: 67%;
/* width: 67%; */
overflow : hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
... ...
... ... @@ -239,14 +239,14 @@ Page({
});
// self.countDown();
// (0全部,2待处理,4已拼成,5已取消,6已完成
// let newTime = new Date().getTime();//当前时间戳
// let end_time = app.nextTime(this.data.end_time, this.data.over_hours);//截止时间
// let endTime = new Date(end_time).getTime(); //截止时间戳
// if (endTime - newTime > 0) {}
// (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除
const status = res.data.active.status;
if(status ===2 || status ===4 || status ===6 || status ===7) {
if(status === 2 || status === 6 || status === 7 || status === 8) {
console.log('调用倒计时');
self.countDown();
}else {
... ...
... ... @@ -94,7 +94,10 @@
<view class="bg">
<image src="{{item.pic}}" class="people-img"></image>
</view>
<view class="name">{{item.name}}</view>
<view class="people-num">
<view class="name">{{item.name}}</view>
<view class="num">({{item.number}})</view>
</view>
</view>
</view>
... ...
... ... @@ -240,9 +240,13 @@ swiper {
background-color: #FD8779;
margin-bottom: 10rpx;
}
.people .name {
width:100rpx;
text-align: center;
.people-num {
display: flex;
align-items: center;
}
.people-num .name {
width:100rpx;
text-align: center;
/* margin-right: 10rpx; */
color: #333333;
font-size: 22rpx;
... ... @@ -253,6 +257,10 @@ swiper {
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.people-num .num {
color: #333333;
font-size: 22rpx;
}
.comment-box {
padding: 20rpx;
-webkit-box-sizing: border-box;
... ...
... ... @@ -14,6 +14,7 @@ Page({
title:'',
content:'',
min_num:'',
max_num:'',
date:'',
time:'',
address:'',
... ... @@ -44,7 +45,15 @@ Page({
},
//输入最高人数
inputMaxNum(e) {
this.setData({max_num:e.detail.value})
this.setData({max_num:e.detail.value});
},
//输入最高人数失去焦点时
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'});
this.setData({max_num:''});
}
},
//输入地点
inputAddress(e) {
... ... @@ -96,6 +105,8 @@ Page({
wx.showToast({title:'请上传图片',icon:'none'})
}else if (this.data.min_num === '') {
wx.showToast({title:'请填写最低人数',icon:'none'})
}else if (this.data.max_num === '') {
wx.showToast({title:'请填写最高人数',icon:'none'})
}else if(this.data.current_type === undefined) {
wx.showToast({title:'请选择类别',icon:'none'})
}else if(this.data.date === '') {
... ... @@ -128,6 +139,7 @@ Page({
content:this.data.content,
pic: images_params,
number:this.data.min_num,
max_number:this.data.max_num,
select_id: this.data.type_id,//类别
time: this.data.date + ' ' + this.data.time,
name: this.data.address,
... ...
... ... @@ -23,11 +23,21 @@
</view>
<view class="set-box">
<view class="min-num num-box">
<text class="title num-title">人数</text>
<!--<view class="min-num num-box">-->
<!--<text class="title num-title">人数</text>-->
<!--<input type="number" bindinput="inputMinNum" class="input"/>-->
<!--<text class="iconfont icon-xiangxia min-icon icon-min"></text>-->
<!--<text class="tips">注:最低拼单人数</text>-->
<!--</view>-->
<view class="min-num">
<text class="title">最低人数</text>
<input type="number" bindinput="inputMinNum" class="input"/>
<text class="iconfont icon-xiangxia min-icon icon-min"></text>
<text class="tips">注:最低拼单人数</text>
<text class="iconfont icon-xiangxia min-icon"></text>
</view>
<view class="min-num">
<text class="title">最高人数</text>
<input type="number" bindinput="inputMaxNum" class="input" bindblur="maxNumBlur" value="{{max_num}}"/>
<text class="iconfont icon-xiangxia min-icon"></text>
</view>
<!--<view class="min-num">-->
<!--<text class="title">最高人数</text>-->
... ...
... ... @@ -51,21 +51,32 @@ Page({
//取消订单
cancel() {
const self = this;
let url = '/portal/Order/cancel';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
};
app.post(url, params, {}).then((res) => {
console.log('取消订单', res);
if (+res.code === 1) {
wx.showToast({title:'订单已取消',icon:'none'});
// self.setData({
// detail: res.data,
// });
// console.log(this.data.this_week_test_info);
}else {
wx.showToast({title:res.message,icon:'none'});
wx.showModal({
title: '提示',
content: '确定删除吗?',
success(res) {
if (res.confirm) {
console.log('用户点击确定');
let url = '/portal/Order/cancel';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
};
app.post(url, params, {}).then((res) => {
console.log('取消订单', res);
if (+res.code === 1) {
wx.showToast({title:'订单已取消',icon:'none'});
// self.setData({
// detail: res.data,
// });
// console.log(this.data.this_week_test_info);
}else {
wx.showToast({title:res.message,icon:'none'});
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
... ...