public function gallery_add_tag() { try { $this->throwMsgCheck('is_post', 'is_login', 'is_active'); lib()->load('Gallery'); $g = new Gallery(); $req = req()->_plain(); $rt = $g->add_tag($req->post('id'), $req->post('tag'), login_user()->getId()); if (is_array($rt) && count($rt) > 0) { $this->rt_msg['status'] = true; $this->rt_msg['content'] = $rt; } else { $this->rt_msg['msg'] = "未添加任何内容到数组中"; } } catch (\Exception $ex) { $this->rt_msg['msg'] = $ex->getMessage(); $this->rt_msg['code'] = $ex->getCode(); } }