diff --git a/public/config.js b/public/config.js index ef7e7996..cbc37938 100644 --- a/public/config.js +++ b/public/config.js @@ -5,6 +5,7 @@ const APP_CONFIG = { //标题 APP_NAME: "SCUI", + //接口地址 - API_URL: "." + API_URL: "" } diff --git a/public/images/avatar.jpg b/public/img/avatar.jpg similarity index 100% rename from public/images/avatar.jpg rename to public/img/avatar.jpg diff --git a/public/images/avatar2.gif b/public/img/avatar2.gif similarity index 100% rename from public/images/avatar2.gif rename to public/img/avatar2.gif diff --git a/public/images/avatar3.gif b/public/img/avatar3.gif similarity index 100% rename from public/images/avatar3.gif rename to public/img/avatar3.gif diff --git a/public/json/app.json b/public/json/app.json deleted file mode 100644 index ab014744..00000000 --- a/public/json/app.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "code": 200, - "count": 2, - "data": [ - { - "id": "100", - "appName": "自助机", - "appId": "selfHelp", - "secret": "YuOju6lP3t4thLbZOhRSV4UZ79vdnwIC", - "type": ["ALL"], - "exp": "2035-01-01 00:00:00" - }, - { - "id": "101", - "appName": "微信小程序", - "appId": "WechatApp", - "secret": "WgBbsRtCeXiNXIYkkShxxvqOGrAYKK2e", - "type": ["UPDATA", "QUERY"], - "exp": "2023-06-01 00:00:00" - } - ], - "message": "" -} diff --git a/public/json/dic_info.json b/public/json/dic_info.json deleted file mode 100644 index 96db4d7c..00000000 --- a/public/json/dic_info.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "code": 200, - "count": 4, - "data": [ - { - "id": "100", - "key": "1", - "name": "发布通知", - "dic": "1", - "yx": "1" - }, - { - "id": "102", - "key": "2", - "name": "转发通知", - "dic": "1", - "yx": "1" - }, - { - "id": "105", - "key": "3", - "name": "事务通知", - "dic": "1", - "yx": "0" - } - ], - "message": "" -} diff --git a/public/json/dic_list.json b/public/json/dic_list.json deleted file mode 100644 index 09b423c9..00000000 --- a/public/json/dic_list.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "code": 200, - "count": 4, - "data": [ - { - "id": "1", - "code": "notice", - "name": "通知类型" - }, - { - "id": "2", - "code": "sex", - "name": "性别" - }, - { - "id": "3", - "code": "menuCategory", - "name": "菜单类型" - }, - { - "id": "4", - "code": "userType", - "name": "用户类型", - "children": [ - { - "id": "41", - "code": "userTypePC", - "name": "Desktop" - }, - { - "id": "42", - "code": "userTypeAPP", - "name": "Mobile" - } - ] - } - ], - "message": "" -} diff --git a/public/json/list.json b/public/json/list.json deleted file mode 100644 index 36c288cc..00000000 --- a/public/json/list.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "code": 200, - "count": 85, - "data": [ - { - "id": "1", - "name": "Sakuya", - "audit": "1", - "date": "2021-04-01 13:56:38", - "yx": "81883387@qq.com", - "progress": 89.5 - }, - { - "id": "2", - "name": "John Martinez", - "audit": "1", - "date": "2020-10-14 17:21:20", - "yx": "k.luhkpev@zdgtfd.ma", - "progress": 65.5 - }, - { - "id": "3", - "name": "Karen Miller", - "audit": "0", - "date": "2020-07-05 09:30:00", - "yx": "h.hgvwmw@xjuf.pa", - "progress": 25.5 - } - ], - "message": "" -} diff --git a/public/json/login.json b/public/json/login.json deleted file mode 100644 index 73a29e2c..00000000 --- a/public/json/login.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "code": 200, - "data": { - "userInfo": { - "userId": "1", - "userName": "Administrator" - }, - "menuList": [{ - "name": "vab", - "path": "/vab", - "meta": { - "title": "组件", - "icon": "el-icon-takeaway-box", - "type": "menu" - }, - "children": [ - { - "path": "/vab/drag", - "name": "drag", - "meta": { - "title": "拖拽排序", - "type": "menu" - }, - "component": "vab/drag" - }, - { - "path": "/vab/chart", - "name": "chart", - "meta": { - "title": "图表 Echarts", - "type": "menu" - }, - "component": "vab/chart" - }, - { - "path": "/vab/filterbar", - "name": "filterBar", - "meta": { - "title": "过滤器", - "type": "menu" - }, - "component": "vab/filterBar" - }, - { - "path": "/vab/print", - "name": "print", - "meta": { - "title": "打印", - "type": "menu" - }, - "component": "vab/print" - }, - { - "path": "/vab/upload", - "name": "upload", - "meta": { - "title": "上传", - "type": "menu" - }, - "component": "vab/upload" - }, - { - "path": "/vab/editor", - "name": "editor", - "meta": { - "title": "富文本编辑器", - "type": "menu" - }, - "component": "vab/editor" - } - ] - }, - { - "name": "template", - "path": "/template", - "meta": { - "title": "模板", - "icon": "el-icon-files", - "type": "menu" - }, - "children": [ - { - "path": "/template/blank", - "name": "blank", - "meta": { - "title": "空白模板", - "type": "menu" - }, - "component": "template/blank" - }, - { - "path": "/template/list", - "name": "list", - "meta": { - "title": "普通列表", - "type": "menu" - }, - "component": "template/list" - }, - { - "path": "/template/sideList", - "name": "sideList", - "meta": { - "title": "分栏列表", - "type": "menu" - }, - "component": "template/sideList" - }, - { - "path": "/template/show/:id", - "name": "show", - "meta": { - "title": "详情", - "type": "menu", - "hidden": true - }, - "component": "template/show" - }, - { - "path": "/template/itemList", - "name": "itemList", - "meta": { - "title": "个性列表", - "type": "menu" - }, - "component": "template/itemList" - } - ] - }, - { - "name": "other", - "path": "/other", - "meta": { - "title": "其他", - "icon": "el-icon-more", - "type": "menu" - }, - "children": [ - { - "path": "/link", - "name": "外部链接", - "meta": { - "title": "外部链接", - "icon": "el-icon-link", - "type": "menu" - }, - "children": [ - { - "path": "https://baidu.com", - "name": "百度", - "meta": { - "title": "百度", - "type": "link" - } - }, - { - "path": "https://www.google.cn", - "name": "谷歌", - "meta": { - "title": "谷歌", - "type": "link" - } - } - ] - }, - { - "path": "/iframe", - "name": "Iframe", - "meta": { - "title": "Iframe", - "icon": "el-icon-position", - "type": "menu" - }, - "children": [ - { - "path": "https://vue3js.cn/docs/zh/", - "name": "vue3", - "meta": { - "title": "VUE 3", - "type": "iframe" - } - }, - { - "path": "https://element-plus.org?id=1", - "name": "elementplus", - "meta": { - "title": "Element Plus", - "type": "iframe" - } - } - ] - } - ] - }, - { - "name": "test", - "path": "/test", - "meta": { - "title": "实验室", - "icon": "el-icon-folder", - "type": "menu" - } - }, - { - "name": "setting", - "path": "/setting", - "meta": { - "title": "配置", - "icon": "el-icon-setting", - "type": "menu" - }, - "children": [ - { - "path": "/setting/system", - "name": "system", - "meta": { - "title": "系统设置", - "type": "menu" - }, - "component": "setting/system" - }, - { - "path": "/setting/user", - "name": "user", - "meta": { - "title": "用户管理", - "type": "menu" - }, - "component": "setting/user" - }, - { - "path": "/setting/role", - "name": "role", - "meta": { - "title": "角色管理", - "type": "menu" - }, - "component": "setting/role" - }, - { - "path": "/setting/dic", - "name": "dic", - "meta": { - "title": "字典管理", - "type": "menu" - }, - "component": "setting/dic" - }, - { - "path": "/setting/menu", - "name": "settingMenu", - "meta": { - "title": "菜单管理", - "type": "menu" - }, - "component": "setting/menu" - }, - { - "path": "/setting/client", - "name": "client", - "meta": { - "title": "应用管理", - "type": "menu" - }, - "component": "setting/client" - }, - { - "path": "/setting/log", - "name": "log", - "meta": { - "title": "系统日志", - "type": "menu" - }, - "component": "setting/log" - } - ] - } - ], - "permissions": [ - "list.add", - "list.edit", - "list.delete", - "user.add", - "user.edit", - "user.delete" - ] - }, - "message": "" -} diff --git a/public/json/post.json b/public/json/post.json deleted file mode 100644 index 2fc882e1..00000000 --- a/public/json/post.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 200, - "data": null, - "message": "用户名已存在" -} diff --git a/public/json/role.json b/public/json/role.json deleted file mode 100644 index da92123d..00000000 --- a/public/json/role.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "code": 200, - "count": 2, - "data": [ - { - "id": "1", - "label": "超级管理员", - "alias": "SA" - }, - { - "id": "2", - "label": "管理员", - "alias": "admin", - "children": [ - { - "id": "21", - "label": "系统管理员", - "alias": "SystemAdmin" - }, - { - "id": "22", - "label": "业务管理员", - "alias": "BusinessAdmin" - }, - { - "id": "23", - "label": "数据管理员", - "alias": "DataAdmin" - } - ] - }, - { - "id": "3", - "label": "操作员", - "alias": "OperatorManager", - "children": [ - { - "id": "31", - "label": "公告维护员", - "alias": "BulletinManager" - }, - { - "id": "32", - "label": "审核员", - "alias": "Auditor" - }, - { - "id": "33", - "label": "复审员", - "alias": "Reviewer" - } - ] - } - ], - "message": "" -} diff --git a/public/json/select.json b/public/json/select.json deleted file mode 100644 index 3e315be0..00000000 --- a/public/json/select.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "code": 200, - "data": [ - { - "label": "选项1", - "value": "1" - }, - { - "label": "选项2", - "value": "2" - }, - { - "label": "选项3", - "value": "3" - }, - { - "label": "选项4", - "value": "4" - }, - { - "label": "选项5", - "value": "5" - }, - { - "label": "选项6", - "value": "6" - } - ], - "message": "" -} diff --git a/public/json/user_list.json b/public/json/user_list.json deleted file mode 100644 index 790ee6cc..00000000 --- a/public/json/user_list.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "code": 200, - "count": 2, - "data": [ - { - "id": "100", - "userName": "81883387", - "avatar": "images/avatar.jpg", - "mail": "81883387@qq.com", - "name": "sakuya", - "group": ["1"], - "groupName": "超级管理员", - "date": "2021-10-10 12:00:00" - }, - { - "id": "101", - "userName": "luhkpev", - "avatar": "images/avatar3.gif", - "mail": "k.luhkpev@zdgtfd.ma", - "name": "John Martinez", - "group": ["22", "23"], - "groupName": "业务管理员,数据管理员", - "date": "2021-02-21 14:21:48" - } - ], - "message": "" -} diff --git a/src/api/index.js b/src/api/index.js index 75a7fb57..c3e78913 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -21,28 +21,28 @@ const api = { }, user: { login: { - url: `${config.API_URL}/json/login.json`, + url: `${config.MOCK_URL}/login`, name: "登录获取用户菜单和权限", get: async function(){ return await http.get(this.url); } }, list: { - url: `${config.API_URL}/json/user_list.json`, + url: `${config.MOCK_URL}/user_list`, name: "获取用户列表", get: async function(params={}){ return await http.get(this.url, params); } }, save: { - url: `${config.API_URL}/json/post.json`, + url: `${config.MOCK_URL}/post`, name: "新增编辑用户", post: async function(params={}){ return await http.get(this.url, params); } }, del: { - url: `${config.API_URL}/json/post.json`, + url: `${config.MOCK_URL}/post`, name: "删除用户", post: async function(params={}){ return await http.get(this.url, params); @@ -51,14 +51,14 @@ const api = { }, role: { select: { - url: `${config.API_URL}/json/role.json`, + url: `${config.MOCK_URL}/role`, name: "角色选择列表", get: async function(){ return await http.get(this.url); } }, list: { - url: `${config.API_URL}/json/role.json`, + url: `${config.MOCK_URL}/role`, name: "角色列表", get: async function(){ return await http.get(this.url); @@ -67,14 +67,14 @@ const api = { }, dic: { list: { - url: `${config.API_URL}/json/dic_list.json`, + url: `${config.MOCK_URL}/dic_list`, name: "字典列表", get: async function(){ return await http.get(this.url); } }, info: { - url: `${config.API_URL}/json/dic_info.json`, + url: `${config.MOCK_URL}/dic_info`, name: "字典明细", get: async function(params){ return await http.get(this.url, params); @@ -83,7 +83,7 @@ const api = { }, app: { list: { - url: `${config.API_URL}/json/app.json`, + url: `${config.MOCK_URL}/app`, name: "应用列表", get: async function(){ return await http.get(this.url); @@ -92,7 +92,7 @@ const api = { }, menu: { list: { - url: `${config.API_URL}/json/login.json`, + url: `${config.MOCK_URL}/login`, name: "菜单管理", get: async function(){ // 这里接口对象偷懒重复了登录接口 diff --git a/public/images/login-left.png b/src/assets/login-left.png similarity index 100% rename from public/images/login-left.png rename to src/assets/login-left.png diff --git a/src/config/index.js b/src/config/index.js index 47c922e1..4dc37434 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -6,7 +6,7 @@ const DEFAULT_CONFIG = { APP_VER: "1.1.1", //接口地址 - API_URL: ".", + API_URL: "", //MOCK接口地址 MOCK_URL: "https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api", diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 2910ce81..9baa5567 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -5,7 +5,7 @@
- +

嗨~ admin,忙碌了一上午,记得吃午饭哦。

@@ -14,13 +14,13 @@
- + - + - +

Participants

diff --git a/src/views/login.vue b/src/views/login.vue index 91c7e52c..5d665146 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -24,7 +24,7 @@ - 登 录 + 登 录 @@ -46,7 +46,7 @@