This commit is contained in:
parent
894cdc8417
commit
eb947c4b72
|
|
@ -2,7 +2,7 @@ import { getConfig } from '@/api/login'
|
||||||
export function getConfigApi() {
|
export function getConfigApi() {
|
||||||
getConfig()
|
getConfig()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response)
|
// console.log(response)
|
||||||
localStorage.setItem('systemConfig', JSON.stringify(response.data))
|
localStorage.setItem('systemConfig', JSON.stringify(response.data))
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ service.interceptors.request.use(config => {
|
||||||
}
|
}
|
||||||
let contentType = config.headers['Content-Type']
|
let contentType = config.headers['Content-Type']
|
||||||
// console.log('🚀 ~ contentType:', contentType, requestObj.data)
|
// console.log('🚀 ~ contentType:', contentType, requestObj.data)
|
||||||
console.log('🚀 ~ 要加密:', contentType.includes('application/json'), typeof requestObj.data)
|
// console.log('🚀 ~ 要加密:', contentType.includes('application/json'), typeof requestObj.data)
|
||||||
if (contentType.includes('application/json') && typeof requestObj.data !== 'undefined') {
|
if (contentType.includes('application/json') && typeof requestObj.data !== 'undefined') {
|
||||||
// 加密数据
|
// 加密数据
|
||||||
if (systemConfig.requestConfig.encryptRequest && encryptRequest) {
|
if (systemConfig.requestConfig.encryptRequest && encryptRequest) {
|
||||||
|
|
|
||||||
|
|
@ -528,7 +528,7 @@ export default {
|
||||||
localStorage.setItem('username', username)
|
localStorage.setItem('username', username)
|
||||||
localStorage.setItem('pw', password)
|
localStorage.setItem('pw', password)
|
||||||
const res = await checkPasswordStatus()
|
const res = await checkPasswordStatus()
|
||||||
console.log('🚀 ~ .then ~ res:', res)
|
// console.log('🚀 ~ .then ~ res:', res)
|
||||||
this.$router.push({ path: '/' }).catch(() => {})
|
this.$router.push({ path: '/' }).catch(() => {})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue