修复前端添加任务后显示信息不全的问题
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
c9ac878f14
commit
d27f9efa8c
@ -293,8 +293,7 @@ class Task extends CommonModel
|
||||
Db::rollback();
|
||||
throw new \Exception($e->getMessage());
|
||||
}
|
||||
unset($result['id']);
|
||||
return $result;
|
||||
return $this->read($result['code']);
|
||||
}
|
||||
|
||||
public function taskDone($taskCode, $done)
|
||||
@ -591,7 +590,7 @@ class Task extends CommonModel
|
||||
{
|
||||
$done = 1;
|
||||
if (isset($data['code']) && isset($data['pcode']) && $data['pcode']) {
|
||||
$task = self::where(['code' => $data['pcode']])->field('done')->find();
|
||||
$task = self::where(['code' => $data['pcode']])->field('done,deleted')->find();
|
||||
if ($task && !$task['deleted'] && !$task['done']) {
|
||||
$done = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user