报名任务失效判断,我的任务换行问题
This commit is contained in:
parent
dc45f4372d
commit
ed0978dee9
@ -1,6 +1,6 @@
|
|||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// baseUrl: 'http://192.168.18.69:8080',
|
// baseUrl: 'http://192.168.18.211:8080',
|
||||||
// baseUrl: 'http://8.155.21.176/prod-api',
|
// baseUrl: 'http://8.155.21.176/prod-api',
|
||||||
baseUrl: 'https://www.tulkj.cn/prod-api',
|
baseUrl: 'https://www.tulkj.cn/prod-api',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bm-bottom">
|
<view class="bm-bottom">
|
||||||
<view class="bm-btn" @click="baoming">报名</view>
|
<view v-if="taskInvalid == 0" class="bm-btn" @click="baoming">报名</view>
|
||||||
|
<view v-else class="bm-btn-invalid">任务已失效</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -44,9 +46,12 @@
|
|||||||
taskId: null,
|
taskId: null,
|
||||||
employeeName: null,
|
employeeName: null,
|
||||||
phone: null,
|
phone: null,
|
||||||
idCard: null
|
idCard: null,
|
||||||
|
|
||||||
},
|
},
|
||||||
q: null,
|
q: null,
|
||||||
|
taskInvalid: 0, //0有效 1失效
|
||||||
|
taskInfo: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function(query) {
|
onLoad: function(query) {
|
||||||
@ -88,9 +93,24 @@
|
|||||||
getTask(){
|
getTask(){
|
||||||
getTask(this.param).then(response => {
|
getTask(this.param).then(response => {
|
||||||
this.param.taskName = response.data.taskName
|
this.param.taskName = response.data.taskName
|
||||||
|
var status = this.toDate(response.data.taskDate)
|
||||||
|
this.taskInfo = response.data.status + "_" + response.data.taskDate + "_" + status;
|
||||||
|
|
||||||
|
if (response.data.status == 0 || status == 1){
|
||||||
|
this.taskInvalid = 1;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
toDate(str){
|
||||||
|
var strArray = str.split(" ");
|
||||||
|
var strDate = strArray[0].split("-");
|
||||||
|
// var strTime = strArray[1].split(":");
|
||||||
|
var taskFinishTime = new Date(strDate[0], (strDate[1] - parseInt(1)), (strDate[2]));//任务结束的晚上0点
|
||||||
|
taskFinishTime.setDate(taskFinishTime.getDate() + 1);
|
||||||
|
|
||||||
|
// console.log("date", taskFinishTime, this.getTomorrowZeroTime())
|
||||||
|
return new Date() > taskFinishTime ? 1 : 0
|
||||||
|
},
|
||||||
baoming(){
|
baoming(){
|
||||||
console.log(this.param.employeeName)
|
console.log(this.param.employeeName)
|
||||||
var that = this;
|
var that = this;
|
||||||
@ -199,6 +219,19 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
}
|
}
|
||||||
|
.bm-btn-invalid{
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #7b7b7b;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 7rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item-container" @click="tabChange(2)">
|
<view class="item-container" @click="tabChange(2)">
|
||||||
<view class="item" style="width: 120rpx">
|
<view class="item" style="width: 170rpx">
|
||||||
<view :class="nowTab == 2 ? 'tab-title-focus' : 'tab-title'">
|
<view :class="nowTab == 2 ? 'tab-title-focus' : 'tab-title'">
|
||||||
我的任务
|
我的任务
|
||||||
</view>
|
</view>
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
var strArray = str.split(" ");
|
var strArray = str.split(" ");
|
||||||
var strDate = strArray[0].split("-");
|
var strDate = strArray[0].split("-");
|
||||||
// var strTime = strArray[1].split(":");
|
// var strTime = strArray[1].split(":");
|
||||||
var taskFinishTime = new Date(strDate[0], (strDate[1]-parseInt(1)), (strDate[2]));//任务结束的晚上0点
|
var taskFinishTime = new Date(strDate[0], (strDate[1] - parseInt(1)), (strDate[2]));//任务结束的晚上0点
|
||||||
taskFinishTime.setDate(taskFinishTime.getDate() + 1);
|
taskFinishTime.setDate(taskFinishTime.getDate() + 1);
|
||||||
|
|
||||||
// console.log("date", taskFinishTime, this.getTomorrowZeroTime())
|
// console.log("date", taskFinishTime, this.getTomorrowZeroTime())
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
getTaskDetails(this.queryParams).then(response => {
|
getTaskDetails(this.queryParams).then(response => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
that.task = response.data;
|
that.task = response.data;
|
||||||
that.showSign= that.task.listSign;
|
that.showSign = that.task.listSign;
|
||||||
let title = "【"+ that.task.taskName +"】人员详情";
|
let title = "【"+ that.task.taskName +"】人员详情";
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: title
|
title: title
|
||||||
|
Loading…
Reference in New Issue
Block a user