diff --git a/.env.development b/.env.development index 37bfb7f..7a22a56 100644 --- a/.env.development +++ b/.env.development @@ -5,5 +5,5 @@ VITE_APP_TITLE=里派基础框架 VITE_APP_ENV='development' # 开发环境 -VITE_API_BASE='https://dev.api.leapy.cn/merchant/' +VITE_API_BASE='https://server.leapy.cn/admin/' VITE_WS_URL='wss://dev.api.leapy.cn/mms' diff --git a/.env.production b/.env.production index 7393827..825ffd0 100644 --- a/.env.production +++ b/.env.production @@ -5,5 +5,5 @@ VITE_APP_TITLE=里派基础框架 VITE_APP_ENV='production' # 生产环境 -VITE_API_BASE='https://dev.api.leapy.cn/merchant/' +VITE_API_BASE='https://server.leapy.cn/admin/' VITE_WS_URL='wss://dev.api.leapy.cn/mms' diff --git a/src/api/model/auth.ts b/src/api/model/auth.ts index ddb3a7f..7043e73 100644 --- a/src/api/model/auth.ts +++ b/src/api/model/auth.ts @@ -2,18 +2,18 @@ import http from "@/utils/request" export default { captcha: async function (data = {}) { - return await http.get("v1/captcha", data); + return await http.get("captcha", data); }, login: async function (data = {}) { - return await http.post("v1/login", data); + return await http.post("login", data); }, info: async function () { - return await http.get("v1/info"); + return await http.get("info"); }, menu: async function (data = {}) { - return await http.get("v1/menu", data) + return await http.get("menu", data) }, logout: async function(){ - return await http.get("v1/logout"); + return await http.get("logout"); }, } diff --git a/src/api/model/system.ts b/src/api/model/system.ts new file mode 100644 index 0000000..01c0cf4 --- /dev/null +++ b/src/api/model/system.ts @@ -0,0 +1,21 @@ +import http from "@/utils/request" + +export default { + menu: { + list: async function(data={}){ + return await http.get("menu/list", data); + }, + add: async function(data = {}){ + return await http.post("menu/add", data); + }, + edit: async function(data = {}){ + return await http.put("menu/edit", data); + }, + del: async function(data = {}){ + return await http.delete("menu/del", data); + }, + option: async function(data={}){ + return await http.get("menu/option", data); + }, + } +} diff --git a/src/components/piIcon/index.vue b/src/components/piIcon/index.vue new file mode 100644 index 0000000..32641a9 --- /dev/null +++ b/src/components/piIcon/index.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/src/config/icon.js b/src/config/icon.js new file mode 100644 index 0000000..1be4445 --- /dev/null +++ b/src/config/icon.js @@ -0,0 +1,29 @@ +//图标选择器配置 +import * as elIconsLib from '@element-plus/icons-vue' +import * as piIconsLib from '@/assets/icons' + +//el-icon图标 +const elIcons = []; +for (let icon in elIconsLib) { + let iconName = `elIcon${icon}` + iconName = iconName.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`) + elIcons.push(iconName) +} + +//pi-icon图标 +const piIcons = []; +for (let icon in piIconsLib.default) { + let iconName = `piIcon${icon}` + iconName = iconName.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`) + piIcons.push(iconName) +} + +export default { + icons: [{ + name: '默认', + icons: elIcons + }, { + name: '扩展', + icons: piIcons + }] +} diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 480787d..3da5179 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -64,8 +64,8 @@
- {{ realnameF }} - + {{ nicknameF }} + @@ -126,8 +126,8 @@ const settingDialog = ref(false) const userInfo = tools.data.get("USER_INFO"); let msgTab = ref("notice") -let realname = userInfo.realname; -let realnameF = realname.substring(0, 1); +let nickname = userInfo.nickname || userInfo.username; +let nicknameF = nickname.substring(0, 1); let avatar = userInfo.avatar // mounted diff --git a/src/layout/index.vue b/src/layout/index.vue index f010b01..f7409aa 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -238,7 +238,7 @@
- + + diff --git a/src/views/system/menu/save.vue b/src/views/system/menu/save.vue new file mode 100644 index 0000000..f744bf4 --- /dev/null +++ b/src/views/system/menu/save.vue @@ -0,0 +1,178 @@ + + + + +