提交 c069af20 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 5131b602
...@@ -35,6 +35,6 @@ module.exports = { ...@@ -35,6 +35,6 @@ module.exports = {
}, },
others: { others: {
loginUrl: 'https://login2.ezijing.com/xtraining/login/index' loginUrl: 'https://login2.ezijing.com/'
} }
} }
...@@ -62,9 +62,11 @@ export default { ...@@ -62,9 +62,11 @@ export default {
api api
.updatePassword(this.ruleForm) .updatePassword(this.ruleForm)
.then(response => { .then(response => {
this.$message({ message: '密码修改成功', type: 'success' }) if (parseInt(response.code) === 0) {
// 重置表单 // 重置表单
this.$refs.ruleForm.resetFields() this.$message({ message: '密码修改成功', type: 'success' })
this.$refs.ruleForm.resetFields()
}
}) })
.finally(() => { .finally(() => {
this.submitLoading = false this.submitLoading = false
......
...@@ -30,9 +30,13 @@ httpRequest.interceptors.response.use( ...@@ -30,9 +30,13 @@ httpRequest.interceptors.response.use(
function(response) { function(response) {
const { data } = response const { data } = response
if (data.code !== 0 && data.code !== -1) { if (data.code !== 0 && data.code !== -1) {
if (data.code === 1 || data.code === 4001) { if (data.msg !== '修改成功') {
console.log('重新登录') return Message.error(data.msg)
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}` } else {
if (data.code === 1 || data.code === 4001) {
console.log('重新登录')
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
}
} }
if (data.message) { if (data.message) {
Message.error(data.message) Message.error(data.message)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论