From 01eeb6db39fa785389a24ebfe9823abe929d9305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Thu, 6 Jul 2023 19:04:04 +0800 Subject: [PATCH] no message --- public/config.js | 2 + src/api/model/app.js | 15 ++++ src/api/model/auth.js | 14 ++- src/api/model/common.js | 57 +++---------- src/api/model/demo.js | 54 ------------ src/api/model/system.js | 94 +-------------------- src/components/scForm/item.vue | 2 +- src/components/xUpdate/index.vue | 40 +++++++++ src/config/index.js | 3 + src/config/select.js | 4 +- src/router/index.js | 2 +- src/utils/request.js | 6 +- src/views/app/apartment/index.vue | 11 +-- src/views/app/apartment/update.vue | 1 + src/views/login/components/passwordForm.vue | 2 +- src/views/login/index.vue | 4 +- src/views/system/stat/index.vue | 2 +- src/views/system/table/index.vue | 2 +- src/views/system/table/save.vue | 28 +++--- src/x.js | 2 + 20 files changed, 112 insertions(+), 233 deletions(-) create mode 100644 src/api/model/app.js delete mode 100644 src/api/model/demo.js create mode 100644 src/components/xUpdate/index.vue diff --git a/public/config.js b/public/config.js index f3b1027..40b863a 100644 --- a/public/config.js +++ b/public/config.js @@ -5,6 +5,8 @@ const APP_CONFIG = { APP_NAME: "寄托天下", //主题设置 THEMESETTING: false, + // Cookie name + SESSIONNAME: 'miucms_session', // 主题页头 // THEMEHEADER: false, //布局 默认:default | 通栏:header | 经典:menu | 功能坞:dock diff --git a/src/api/model/app.js b/src/api/model/app.js new file mode 100644 index 0000000..86af86f --- /dev/null +++ b/src/api/model/app.js @@ -0,0 +1,15 @@ +import http from "@/utils/request" +export default { + index: { + get: async function() { + return await http.get('/system/index'); + } + }, + table: { + get: async function(name = '', config = {}) { + return await http.get('/system/table/get', { + name + }, config); + } + }, +} \ No newline at end of file diff --git a/src/api/model/auth.js b/src/api/model/auth.js index 01a6616..94d943a 100644 --- a/src/api/model/auth.js +++ b/src/api/model/auth.js @@ -1,10 +1,8 @@ import http from "@/utils/request" export default { - token: { - url: `/api/login`, - name: "登录获取TOKEN", - post: async function(data={}){ - return await http.post(this.url, data); - } - } -} + token: { + post: async function(data = {}) { + return await http.post('/api/login', data); + } + } +} \ No newline at end of file diff --git a/src/api/model/common.js b/src/api/model/common.js index 2821f79..5648c05 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -1,48 +1,13 @@ import http from "@/utils/request" - export default { - upload: { - url: `/app/upload`, - name: "文件上传", - post: async function(data, config={}){ - return await http.post(this.url, data, config); - } - }, - uploadFile: { - url: `/app/upload?type=file`, - name: "附件上传", - post: async function(data, config={}){ - return await http.post(this.url, data, config); - } - }, - exportFile: { - url: `/fileExport`, - name: "导出附件", - get: async function(data, config={}){ - return await http.get(this.url, data, config); - } - }, - importFile: { - url: `/fileImport`, - name: "导入附件", - post: async function(data, config={}){ - return await http.post(this.url, data, config); - } - }, - file: { - menu: { - url: `/file/menu`, - name: "获取文件分类", - get: async function(){ - return await http.get(this.url); - } - }, - list: { - url: `/file/list`, - name: "获取文件列表", - get: async function(params){ - return await http.get(this.url, params); - } - } - } -} + upload: { + post: async function(data, config = {}) { + return await http.post('/app/upload', data, config); + } + }, + uploadFile: { + post: async function(data, config = {}) { + return await http.post('/app/upload?type=file', data, config); + } + }, +} \ No newline at end of file diff --git a/src/api/model/demo.js b/src/api/model/demo.js deleted file mode 100644 index 085dd5e..0000000 --- a/src/api/model/demo.js +++ /dev/null @@ -1,54 +0,0 @@ -import http from "@/utils/request" - -export default { - ver: { - url: `/demo/ver`, - name: "获取最新版本号", - get: async function(params){ - return await http.get(this.url, params); - } - }, - post: { - url: `/demo/post`, - name: "分页列表", - post: async function(data){ - return await http.post(this.url, data, { - headers: { - //'response-status': 401 - } - }); - } - }, - page: { - url: `/demo/page`, - name: "分页列表", - get: async function(params){ - return await http.get(this.url, params); - } - }, - list: { - url: `/demo/list`, - name: "数据列表", - get: async function(params){ - return await http.get(this.url, params); - } - }, - menu: { - url: `/demo/menu`, - name: "普通用户菜单", - get: async function(){ - return await http.get(this.url); - } - }, - status: { - url: `/demo/status`, - name: "模拟无权限", - get: async function(code){ - return await http.get(this.url, {}, { - headers: { - "response-status": code - } - }); - } - } -} diff --git a/src/api/model/system.js b/src/api/model/system.js index 287fa00..86af86f 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -5,97 +5,11 @@ export default { return await http.get('/system/index'); } }, - dic: { - tree: { - url: `/system/dic/tree`, - name: "获取字典树", - get: async function() { - return await http.get(this.url); - } - }, - list: { - url: `/system/dic/lists`, - name: "字典明细", - get: async function(params) { - return await http.get(this.url, params); - } - }, - get: { - url: `/system/dic/get`, - name: "获取字典数据", - get: async function(params) { - return await http.get(this.url, params); - } - } - }, - role: { - list: { - url: `/system/role/list2`, - name: "获取角色列表", - get: async function(params) { - return await http.get(this.url, params); - } - } - }, - dept: { - list: { - url: `/system/dept/lists`, - name: "获取部门列表", - get: async function(params) { - return await http.get(this.url, params); - } - } - }, - user: { - list: { - url: `/system/user/lists`, - name: "获取用户列表", - get: async function(params) { - return await http.get(this.url, params); - } - } - }, - app: { - list: { - url: `/system/app/lists`, - name: "应用列表", - get: async function() { - return await http.get(this.url); - } - } - }, - log: { - list: { - url: `/system/log/lists`, - name: "日志列表", - get: async function(params) { - return await http.get(this.url, params); - } - } - }, table: { - list: { - url: `/system/table/lists`, - name: "表格列管理列表", - get: async function(params) { - return await http.get(this.url, params); - } - }, - info: { - url: `/system/table/info`, - name: "表格列管理详情", - get: async function(params) { - return await http.get(this.url, params); - } + get: async function(name = '', config = {}) { + return await http.get('/system/table/get', { + name + }, config); } }, - tasks: { - list: { - url: `/system/tasks/lists`, - name: "系统任务管理", - get: async function(params) { - return await http.get(this.url, params); - } - } - } } \ No newline at end of file diff --git a/src/components/scForm/item.vue b/src/components/scForm/item.vue index 33dd9b3..6f67c53 100644 --- a/src/components/scForm/item.vue +++ b/src/components/scForm/item.vue @@ -95,7 +95,7 @@