title = '短信模板管理'; $query = $this->_query($this->table)->like('type'); $query->order('id asc')->page(); } /** * 编辑短信 * @auth true * @throws \think\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException * @throws \think\exception\PDOException */ public function edit() { $this->applyCsrfToken(); $this->_form($this->table, 'form'); } /** * 启用短信 * @auth true * @throws \think\Exception * @throws \think\exception\PDOException */ public function resume() { $this->applyCsrfToken(); $this->_save($this->table, ['status' => '1']); } /** * 关闭短信 * @auth true * @throws \think\Exception * @throws \think\exception\PDOException */ public function forbid() { $this->applyCsrfToken(); $this->_save($this->table, ['status' => '0']); } }