'上传模型', ]; } public function edit() { if (!$this->validate()) { return $this->getModelError(); } if ($this->user_type == 1) { $this->model->initial_path = $this->final_path; $this->model->step = 1; $this->model->initial_at = time(); } else { $this->model->final_path = $this->final_path; $this->model->step = 2; $this->model->final_at = time(); } $json = []; if (!empty($this->model->json)) { $json = json_decode($this->model->json, true); } $json['left_img'] = $this->left_img; $json['right_img'] = $this->right_img; $json['updated_at'] = time(); if (!empty($this->left_img) && !empty($this->right_img)) { $this->model->step = 2; } else { $this->model->step = 0; } $this->model->json = json_encode($json, JSON_UNESCAPED_UNICODE); if (!$this->model->save()) { return $this->getModelError($this->model); } return $this->apiReturnSuccess('上传成功'); } public function start() { $this->model->start = 1; if (!$this->model->save()) { return $this->getModelError($this->model); } return $this->apiReturnSuccess('上传成功'); } }