diff --git a/src/icons/svg/环境管理.svg b/src/icons/svg/环境管理.svg new file mode 100644 index 0000000..a877e00 --- /dev/null +++ b/src/icons/svg/环境管理.svg @@ -0,0 +1,31 @@ + diff --git a/src/icons/svg/雪花.svg b/src/icons/svg/雪花.svg new file mode 100644 index 0000000..51e27dc --- /dev/null +++ b/src/icons/svg/雪花.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 8617649..63414e9 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -87,7 +87,7 @@ export default { .user-role{ font-size: 12px; font-weight: 400; - color: #DCDFE6; + color: #AAAAAA; } } diff --git a/src/router/modules/reagent.js b/src/router/modules/reagent.js index feb181a..94135ac 100644 --- a/src/router/modules/reagent.js +++ b/src/router/modules/reagent.js @@ -200,6 +200,19 @@ const reagentRouter = [ } ] }, + { + path: '/reagent/envrecord', + component: Layout, + meta: { classification: 'reagent' }, + children: [ + { + path: 'index', + name: 'EnvRecord', + component: () => import('@/views/reagent/envrecord/index'), + meta: { title: '环境记录', icon: '雪花', classification: 'reagent' } + } + ] + }, { path: '/reagent/buy', component: Layout, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index cd7545f..d47d067 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,10 +1,7 @@ -import { logout } from '@/api/user/user' -import { getToken, removeToken } from '@/utils/auth' -import { resetRouter } from '@/router' const getDefaultState = () => { return { - token: getToken(), + token: '', name: '', avatar: '', classification: '' @@ -69,27 +66,27 @@ const actions = { // }, // userinfo logout - logout({ commit, state }) { - return new Promise((resolve, reject) => { - logout(state.token).then(() => { - removeToken() // must remove token first - resetRouter() - commit('RESET_STATE') - resolve() - }).catch(error => { - reject(error) - }) - }) - }, + // logout({ commit, state }) { + // return new Promise((resolve, reject) => { + // logout(state.token).then(() => { + // removeToken() // must remove token first + // resetRouter() + // commit('RESET_STATE') + // resolve() + // }).catch(error => { + // reject(error) + // }) + // }) + // }, // remove token - resetToken({ commit }) { - return new Promise(resolve => { - removeToken() // must remove token first - commit('RESET_STATE') - resolve() - }) - } + // resetToken({ commit }) { + // return new Promise(resolve => { + // removeToken() // must remove token first + // commit('RESET_STATE') + // resolve() + // }) + // } } export default { diff --git a/src/styles/index.scss b/src/styles/index.scss index 42635c1..fbc8861 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -89,3 +89,7 @@ div:focus { border-radius: 20px; } +.my-pagination{ + margin-top: 1rem; +} + diff --git a/src/utils/auth.js b/src/utils/auth.js deleted file mode 100644 index 059af18..0000000 --- a/src/utils/auth.js +++ /dev/null @@ -1,15 +0,0 @@ -import Cookies from 'js-cookie' - -const TokenKey = 'vue_admin_template_token' - -export function getToken() { - return Cookies.get(TokenKey) -} - -export function setToken(token) { - return Cookies.set(TokenKey, token) -} - -export function removeToken() { - return Cookies.remove(TokenKey) -} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index cacdf02..b301891 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -91,7 +91,7 @@ export default { // } return { backgrounddiv: { - 'background-image': 'url(' + require('@/assets/login/login_background.png') + ')' + 'background-image': 'url(' + require('@/assets/login/login.png') + ')' }, loginForm: { user_name: '', diff --git a/src/views/reagent/client/index.vue b/src/views/reagent/client/index.vue index eac4f7a..c280e03 100644 --- a/src/views/reagent/client/index.vue +++ b/src/views/reagent/client/index.vue @@ -2,7 +2,7 @@