dataLists(new UpgradeLists()); } /** * @notes 执行系统更新 * @return \think\response\Json * @author 段誉 * @date 2021/8/14 16:51 */ public function upgrade() { $params = (new UpgradeValidate())->post()->goCheck(); $params['update_type'] = 1;//一键更新类型 if (true === UpgradeLogic::upgrade($params)) { return $this->success('更新成功', [], 1, 1); } return $this->fail('更新失败:'. UpgradeLogic::getError()); } /** * @notes 下载更新包 * @return \think\response\Json * @author 段誉 * @date 2021/10/8 14:23 */ public function downloadPkg() { $params = (new downloadPkgValidate())->post()->goCheck(); $result = UpgradeLogic::getPkgLine($params); if (false === $result) { return $this->fail(UpgradeLogic::getError()); } return $this->success('', $result); } }