From ba45ca26bbed3d3076f60f1d7c663a16b8714279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com> Date: Thu, 16 Nov 2023 00:09:39 +0800 Subject: [PATCH] ai --- .env.development | 2 +- src/api/aiList.js | 33 ++++ src/view/aiList/index.vue | 374 +++++++++++++++++++++++++++++++++++ src/view/lbtManage/index.vue | 14 +- 4 files changed, 415 insertions(+), 8 deletions(-) create mode 100644 src/api/aiList.js create mode 100644 src/view/aiList/index.vue diff --git a/.env.development b/.env.development index b70607e..09a2b67 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' VITE_CLI_PORT = 8088 VITE_SERVER_PORT = 8888 VITE_BASE_API = /api -VITE_BASE_PATH = http://4a1840b2.r12.cpolar.top +VITE_BASE_PATH = http://e07b2b5.r9.cpolar.top VITE_EDITOR = vscode // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP diff --git a/src/api/aiList.js b/src/api/aiList.js new file mode 100644 index 0000000..2fbe62c --- /dev/null +++ b/src/api/aiList.js @@ -0,0 +1,33 @@ +import service from '@/utils/request' +const api = { + // AI 列表api + getAiList: data => { + return service({ + url: '/aikefu/list', + method: 'get', + params: data + }) + }, + addAi: data => { + return service({ + url: '/aikefu', + method: 'post', + data + }) + }, + editAi: data => { + return service({ + url: '/aikefu', + method: 'put', + data + }) + }, + deleteFunc: data => { + return service({ + url: '/aikefu', + method: 'delete', + data + }) + } +} +export default api diff --git a/src/view/aiList/index.vue b/src/view/aiList/index.vue new file mode 100644 index 0000000..57a7041 --- /dev/null +++ b/src/view/aiList/index.vue @@ -0,0 +1,374 @@ + + + + + + + + + + + + 查询 + 重置 + + + + + + + + 新增 + + 确定要删除吗? + + 取消 + 确定 + + + + + + + + + + + {{ scope.row.content }} + + + + + + + + {{ formatDate(scope.row.CreatedAt) }} + + + + + 编辑 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/view/lbtManage/index.vue b/src/view/lbtManage/index.vue index 2a87155..b9298ce 100644 --- a/src/view/lbtManage/index.vue +++ b/src/view/lbtManage/index.vue @@ -12,7 +12,7 @@ const dialogFormVisible = ref(false) import { useUserStore } from '@/pinia/modules/user' const userStore = useUserStore() import { parseTime } from '@/utils' -import { fa } from 'element-plus/es/locale' +// import { fa } from 'element-plus/es/locale' // 变量 const path = ref(import.meta.env.VITE_BASE_API) const queryParams = ref({ @@ -23,12 +23,12 @@ const deleteVisible = ref(false) const lbt_ids = ref([]) const dialogTitle = ref('') const form = ref({ status: '1' }) -const lbtType_options = ref([ - { - label: '首页', - value: 1 - } -]) +// const lbtType_options = ref([ +// { +// label: '首页', +// value: 1 +// } +// ]) const rules = ref({ // lbtName: [{ required: true, message: '请输入名称', trigger: 'blur' }], imgUrl: [{ required: true, message: '请选择素材', trigger: 'blur' }],
确定要删除吗?