diff --git a/application/common/Model/TaskStages.php b/application/common/Model/TaskStages.php index 33cce1a..4da9247 100755 --- a/application/common/Model/TaskStages.php +++ b/application/common/Model/TaskStages.php @@ -130,11 +130,10 @@ class TaskStages extends CommonModel $task['exchange_info'] = MemberAccount::whereIn('member_code', $arr)->field('member_code,name,avatar')->select(); $task['copied_info'] = MemberAccount::whereIn('member_code', $arr2)->field('member_code,name,avatar')->select(); $endTime = strtotime($task['end_time']); - $createTime = strtotime($task['create_time']); $task['timeout']=0; $task['department_name']=Department::where('code',$task['department'])->value('name'); - if ($endTime > $createTime) { - $timeDifference = abs($endTime - $createTime); + if ($endTime < time()) { + $timeDifference = abs(time() - $endTime); // 计算天数 $days = bcdiv($timeDifference,86400,2); $task['timeout']=$days.'天';