diff --git a/module/system/control.php b/module/system/control.php index dc7e929e52..3bbbfece49 100644 --- a/module/system/control.php +++ b/module/system/control.php @@ -625,4 +625,24 @@ class system extends control $this->view->systemList = $this->system->getPairs('0'); $this->display(); } + + /** + * 上架应用。 + * Active application. + * + * @param int $id + * @access public + * @return void + */ + public function active(int $id) + { + $system = new stdclass(); + $system->status = 'active'; + + $this->system->update($id, $system, false); + if(dao::isError()) return $this->sendError(dao::getError()); + + $this->loadModel('action')->create('system', $id, 'active'); + $this->sendSuccess(array('load' => true)); + } }