-
-
-
-
+
+
+
+
+
+
diff --git a/admin/src/router/index.ts b/admin/src/router/index.ts
index 3082574b..483db509 100644
--- a/admin/src/router/index.ts
+++ b/admin/src/router/index.ts
@@ -21,10 +21,10 @@ export const asyncRoutes: Array
= [
component: workbench,
meta: { title: '工作台', icon: 'icon-home', permission: ['view'] }
},
- decoration, // 装修管理
- application,// 应用管理
- content, // 内容管理
- channel, // 渠道管理
+ // decoration, // 装修管理
+ // application,// 应用管理
+ // content, // 内容管理
+ // channel, // 渠道管理
permission,
setting
]
diff --git a/admin/src/router/modules/setting.ts b/admin/src/router/modules/setting.ts
index 1786f186..54f28b19 100644
--- a/admin/src/router/modules/setting.ts
+++ b/admin/src/router/modules/setting.ts
@@ -10,7 +10,10 @@ const routes: RouteRecordRaw = {
path: '/setting/service',
redirect: '/setting/service/online_service',
component: RouterView,
- meta: { title: '客服设置' },
+ meta: {
+ title: '客服设置',
+ hidden: true,
+ },
children: [
{
path: '/setting/service/online_service',
@@ -49,6 +52,7 @@ const routes: RouteRecordRaw = {
meta: {
title: '政策/协议',
permission: ['view'],
+ hidden: true,
},
},
],
@@ -57,7 +61,10 @@ const routes: RouteRecordRaw = {
path: '/setting/user',
redirect: '/setting/user',
component: RouterView,
- meta: { title: '用户设置' },
+ meta: {
+ title: '用户设置',
+ hidden: true,
+ },
children: [
{
path: '/setting/user',
@@ -91,8 +98,33 @@ const routes: RouteRecordRaw = {
permission: ['view'],
},
},
+ {
+ path: '/setting/website/journal',
+ component: () => import('@/views/setting/system/journal.vue'),
+ meta: {
+ title: '系统日志',
+ permission: ['view'],
+ },
+ },
+ {
+ path: '/setting/website/cache',
+ component: () => import('@/views/setting/system/cache.vue'),
+ meta: {
+ title: '系统缓存',
+ permission: ['view'],
+ },
+ },
],
},
+ {
+ // component: RouterView,
+ path: '/setting/personal/personal_data',
+ component: () => import('@/views/setting/personal/personal_data.vue'),
+ meta: {
+ title: '个人设置',
+ permission: ['view'],
+ },
+ },
],
}
diff --git a/admin/src/store/modules/permission.ts b/admin/src/store/modules/permission.ts
index a6be6bf0..0f678005 100644
--- a/admin/src/store/modules/permission.ts
+++ b/admin/src/store/modules/permission.ts
@@ -30,14 +30,16 @@ const permission: Module = {
actions: {
getPermission({ commit }) {
return new Promise((resolve, reject) => {
- apiConfigGetAuth()
- .then(data => {
- commit('setPermission', data)
- resolve(data)
- })
- .catch(err => {
- reject(err)
- })
+ // apiConfigGetAuth()
+ // .then(data => {
+ // commit('setPermission', data)
+ // resolve(data)
+ // })
+ // .catch(err => {
+ // reject(err)
+ // })
+
+ resolve({})
})
}
}
diff --git a/admin/src/store/modules/user.ts b/admin/src/store/modules/user.ts
index 3554ad0d..fadd1884 100644
--- a/admin/src/store/modules/user.ts
+++ b/admin/src/store/modules/user.ts
@@ -25,9 +25,11 @@ const user: Module = {
// 登录
login({ commit }, data) {
const { account, password } = data
+ console.log(data, '----------------------')
+
return new Promise((resolve, reject) => {
apiLogin({
- account: account.trim(),
+ username: account,
password: password
})
.then((data: any) => {
diff --git a/admin/src/styles/element.scss b/admin/src/styles/element.scss
index 92ef86da..1d2bbc1e 100644
--- a/admin/src/styles/element.scss
+++ b/admin/src/styles/element.scss
@@ -1,6 +1,6 @@
// 引入所有样式
-@use 'element-plus/theme-chalk/src/index.scss';
-
+// @use 'element-plus/theme-chalk/src/index.scss';
+@import "element-plus/theme-chalk/src/index.scss";
:root {
--el-font-weight-primary: 400;
}
@@ -97,3 +97,8 @@
.el-icon {
font-size: var(--font-size);
}
+
+.el-alert--primary {
+ color: $color-primary;
+ background-color: $color-primary-light-9;
+}
diff --git a/admin/src/utils/request.ts b/admin/src/utils/request.ts
index a89f18df..f2c7fbbe 100644
--- a/admin/src/utils/request.ts
+++ b/admin/src/utils/request.ts
@@ -40,7 +40,7 @@ const eventResponse = {
}
const request = axios.create({
- baseURL: `${import.meta.env.VITE_APP_BASE_URL}/adminapi`,
+ baseURL: `${import.meta.env.VITE_APP_BASE_URL}/api`,
timeout: 60 * 1000,
headers: {
'Content-Type': 'application/json',
@@ -66,11 +66,23 @@ request.interceptors.request.use(
request.interceptors.response.use(
response => {
switch (response.data.code) {
- case 1:
+ case 200:
return eventResponse.success(response.data)
- case 0:
+ case 300:
+ case 310:
+ case 311:
+ case 312:
+ case 313:
+ case 314:
+ case 403:
+ case 404:
+ case 500:
return eventResponse.error(response.data)
case -1:
+ case 330:
+ case 331:
+ case 332:
+ case 333:
return eventResponse.redirect()
case 2:
return eventResponse.page(response.data)
diff --git a/admin/src/views/account/login.vue b/admin/src/views/account/login.vue
index 2eb63235..5aee5813 100644
--- a/admin/src/views/account/login.vue
+++ b/admin/src/views/account/login.vue
@@ -5,12 +5,12 @@