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

修改bug

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