isAjax()) { $param = get_params(); $where = array(); if (!empty($param['keywords'])) { $where[] = ['title', 'like', '%' . $param['keywords'] . '%']; } $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; $content = Db::name('SearchKeywords') ->order('id desc') ->where($where) ->paginate($rows, false, ['query' => $param]); return table_assign(1, '', $content); } else { return view(); } } //删除 public function delete() { $id = get_params("id"); if (Db::name('SearchKeywords')->delete($id) !== false) { add_log('delete', $id); return to_assign(1, "删除成功!"); } else { return to_assign(0, "删除失败!"); } } }