request->isAjax()) { $data = UpgradeLogic::index($this->page_no, $this->page_size); $this->_success('', $data); } return $this->fetch(); } /** * Notes: 提示 * @author 松鼠 * @return mixed */ public function choosePage() { return $this->fetch(); } /** * Notes: 执行更新 * @author 松鼠 */ public function handleUpgrade() { if ($this->request->isAjax()) { $post = $this->request->post(); $result = $this->validate($post, 'app\admin\validate\Upgrade'); if ($result !== true) { $this->_error($result); } $res = UpgradeLogic::upgrade($post); if (true === $res) { $this->_success('更新成功'); } $this->_error($res); } $this->_error('更新失败'); } public function addUpdatePkgLog() { $post = $this->request->post(); $post['update_type'] = 2; // 单商户企业版 $res = UpgradeLogic::addlog($post); if($res === false) { return $this->_error('添加更新日志失败'); } return $this->_success('添加更新日志成功'); } }