diff --git a/src/App.vue b/src/App.vue index 96dfa59..1a4c900 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,6 @@ diff --git a/src/api/login.js b/src/api/login.js index ea04781..f2cff67 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,80 +1,40 @@ import request from '@/utils/request' const userApi = { - Login: '/auth/login', - Logout: '/auth/logout', - ForgePassword: '/auth/forge-password', - Register: '/auth/register', - twoStepCode: '/auth/2step-code', - SendSms: '/account/sms', - SendSmsErr: '/account/sms_err', - // get my info - UserInfo: '/user/info', - UserMenu: '/user/nav' + login: '/login', + logout: '/logout', + getLoginUser: '/getLoginUser' } -/** - * login func - * parameter: { - * username: '', - * password: '', - * remember_me: true, - * captcha: '12345' - * } - * @param parameter - * @returns {*} - */ export function login (parameter) { return request({ - url: userApi.Login, + url: userApi.login, method: 'post', data: parameter }) } -export function getSmsCaptcha (parameter) { +export function getLoginUser () { return request({ - url: userApi.SendSms, + url: userApi.getLoginUser, method: 'post', data: parameter }) } -export function getInfo () { - return request({ - url: userApi.UserInfo, - method: 'get', - headers: { - 'Content-Type': 'application/json;charset=UTF-8' - } - }) -} - -export function getCurrentUserNav () { - return request({ - url: userApi.UserMenu, - method: 'get' - }) -} - export function logout () { return request({ - url: userApi.Logout, + url: userApi.logout, method: 'post', headers: { 'Content-Type': 'application/json;charset=UTF-8' } }) } - -/** - * get user 2step code open? - * @param parameter {*} - */ -export function get2step (parameter) { - return request({ - url: userApi.twoStepCode, - method: 'post', - data: parameter +export function getSmsCaptcha (parameter) { + return axios({ + url: '/getSmsCaptcha', + method: 'get', + params: parameter }) } diff --git a/src/config/defaultSettings.js b/src/config/defaultSettings.js index 6801019..c06d675 100644 --- a/src/config/defaultSettings.js +++ b/src/config/defaultSettings.js @@ -11,11 +11,10 @@ * storageOptions: {} - Vue-ls 插件配置项 (localStorage/sessionStorage) * */ - export default { - navTheme: 'dark', // theme for nav menu + navTheme: 'light', // theme for nav menu primaryColor: '#1890ff', // primary color of ant design - layout: 'topmenu', // nav menu position: `sidemenu` or `topmenu` + layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu` contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu fixedHeader: false, // sticky header fixSiderbar: false, // sticky siderbar @@ -23,7 +22,7 @@ export default { menu: { locale: true }, - title: '系统后台', + title: '安全培训平台', pwa: false, iconfontUrl: '', production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true' diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 99d09f6..67679aa 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -11,11 +11,9 @@ :i18nRender="i18nRender" v-bind="settings" > - - @@ -24,25 +22,20 @@