public function gallery_add_pic() { try { $this->throwMsgCheck('is_post', 'is_login', 'is_active'); lib()->load('Gallery'); $req = req()->_plain(); $g = new Gallery($req->post('gallery_id'), login_user()->getId()); $g->add_pic($req->post('list')); $this->rt_msg['content'] = $g->getPictures($g->getGalleryId()); $this->rt_msg['status'] = true; } catch (\Exception $ex) { $this->rt_msg['msg'] = $ex->getMessage(); $this->rt_msg['code'] = $ex->getCode(); } }