model = model('WechatAutoreply'); } /** * 编辑 */ public function edit($ids = NULL) { $row = Db::table($this->table)->where('id', $ids)->get(); if (!$row) $this->error(__('No Results were found')); if ($this->request->isPost()) { $this->code = -1; $params = $this->request->post("row/a"); if ($params) { $row->save($params); AdminLog::record(__('Edit'), $ids); $this->code = 1; } return; } $response = WechatResponse::get(['eventkey' => $row['eventkey']]); $this->view->assign("response", $response); $this->view->assign("row", $row); } }