Commit 11f0d83b by 无尘

add: 增加修改密码退出登录,跳转登录页

parent 77a14626
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
"name": "@gic-test/vue-gic-header",
"description": "vue-gic-header Plugin",
"author": "fairyly <498745097@qq.com>",
"version": "1.3.33",
"version": "1.3.35",
"license": "MIT",
"private": false,
"main": "dist/vue-gic-header.js",
......
......@@ -428,12 +428,12 @@
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 0) {
that.passFormVisible = false;
that.$message({
message: '修改成功',
type: 'success'
})
that.postLoginOut();
return;
}
that.$message.error({
......@@ -460,7 +460,7 @@
if (!valid) {
return;
}
that. modifyUserPassword()
that.modifyUserPassword()
})
},
......@@ -483,20 +483,29 @@
//退出登录
toLoginOut() {
var that = this;
// var para = {
// requestProject: that.repProjectName
// }
that.$confirm('确认退出吗?', '提示', {
type: 'warning'
}).then(() => {
that.postLoginOut()
}).catch(() => {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
// 退出请求
postLoginOut() {
const that = this;
that.axios.post(that.baseUrl+'/api-auth/do-logout',{})
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 0) {
// console.log(that.cliqueFlag)
that.$message({
message: '退出成功',
type: 'success'
......@@ -508,7 +517,6 @@
// if (that.cliqueFlag == false) {
// window.location.href = window.location.origin + '/gic-clique';
// }
return;
}
that.$message.error({
......@@ -519,21 +527,11 @@
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
}).catch(() => {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
// 判断当前商户是否是集团关联商户
......@@ -554,11 +552,9 @@
duration: 1000,
message: resData.message
})
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
......@@ -590,7 +586,6 @@
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 0) {
that.userInfo.realName = resData.result.realName;
that.userInfo.gender = resData.result.clerkGender;
that.userInfo.clerkCode = resData.result.clerkCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment