Merge branch 'material-ui' of http://192.168.0.75:3000/bonus/bonus-ui into material-ui

This commit is contained in:
hongchao 2025-04-17 14:07:13 +08:00
commit 529859ce3d
2 changed files with 18 additions and 9 deletions

View File

@ -7,6 +7,8 @@ import { tansParams, blobValidate } from '@/utils/bonus'
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm'
import router from '@/router'
const systemConfig = JSON.parse(localStorage.getItem('systemConfig')) || {
requestConfig: { encryptRequest: false, checkIntegrity: false, encryptResponse: false }
};
@ -110,9 +112,9 @@ service.interceptors.response.use(res => {
if (code === 401) {
console.log('🚀 ~ process.env.VUE_APP_BASE_API:', process.env.VUE_APP_BASE_API)
if (process.env.VUE_APP_BASE_API == '/iws/jiju-api') {
this.$store.dispatch('LogOut').then(() => {
store.dispatch('LogOut').then(() => {
}).catch((err) => {
console.log('🚀 ~ this.$store.dispatch ~ err:', err)
console.log('🚀 ~ store.dispatch ~ err:', err)
})
setTimeout(() => {
// 'http://sgwpdm.ah.sgcc.com.cn/iws/cas/login?appId=3874dcb953f184dc75450e33d6d6d4fa&service=http://sgwpdm.ah.sgcc.com.cn/iws/mea-view/',
@ -121,11 +123,11 @@ service.interceptors.response.use(res => {
)
}, 500)
} else {
this.$store.dispatch('LogOut').then(() => {
store.dispatch('LogOut').then(() => {
// location.href = '/login'
this.$router.push('/login')
router.push('/login')
}).catch(() => {
this.$router.push('/login')
router.push('/login')
})
}
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')

View File

@ -201,7 +201,7 @@ export default {
verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }]
},
loading: false,
captchaEnabled: true,
captchaEnabled: false,
redirect: undefined,
isSendingCode: false,
countdown: 0,
@ -212,8 +212,16 @@ export default {
},
computed: {
config() {
console.log('🚀 ~ config ~ config:', localStorage.getItem('systemConfig'))
let systemConfig = null
try {
systemConfig = JSON.parse(localStorage.getItem('systemConfig'))
console.log('🚀 ~ config ~ systemConfig:', systemConfig)
} catch (err) {
console.log('获取config失败:', err)
}
return (
JSON.parse(localStorage.getItem('systemConfig')) || {
systemConfig || {
loginConfig: {
phonePassword: true,
emailPassword: true,
@ -225,7 +233,7 @@ export default {
emailRegisters: true
}
}
) // JSON
)
},
loginRules() {
return this.loginMethod === 'password' ? this.passwordLoginRules : this.mobileLoginRules
@ -285,7 +293,6 @@ export default {
}
} else {
this.isIws = false
this.getCode()
this.getCookie()
}
},