新需求:PK任务 提交

This commit is contained in:
2026-01-20 21:51:24 +08:00
parent f0519ac0f4
commit 03728ff399

View File

@@ -501,13 +501,19 @@ class Tasks extends Model
$ext = $user_daily_tasks['ext'];
}
$current_progress = $user_daily_tasks['current_progress'] + 1;
if($current_progress >= $task_info['target_quantity'] && $user_daily_tasks['ext'] >= 1){
if($current_progress >= $task_info['target_quantity'] && $ext >= 1){
$is_completed = 1;
$completion_time = time();
}else{
$is_completed = 0;
$completion_time = null;
}
if($current_progress > $task_info['target_quantity']){
$current_progress = $task_info['target_quantity'];
}
if($ext > 1){
$ext = 1;
}
$reslut = Db::name('vs_tasks_user_daily')->where('id',$user_daily_tasks['id'])->update([
'current_progress' => $current_progress,
'is_completed'=> $is_completed,