|
|
@@ -63,17 +63,18 @@ export default {
|
|
|
getUserByToken(param){
|
|
|
let that = this;
|
|
|
sessionStorage.setItem("gisLoginType", "AUTO");//自动登录类型
|
|
|
- // that.loginLoad.close();
|
|
|
- that.$store.state.login = true;
|
|
|
- that.$router.push("/index");
|
|
|
let params = {
|
|
|
serviceId: "0",
|
|
|
strUrl: "/api/user/getUserByToken",
|
|
|
token: param
|
|
|
}
|
|
|
+ that.$router.push("/index");
|
|
|
+ that.$store.state.login = true;
|
|
|
+ that.$store.state.token = param;
|
|
|
+ that.$store.state.userState = true;
|
|
|
commonAPI.getUserByToken(params).then((res) => {
|
|
|
that.$store.state.user = res.content;
|
|
|
- // that.$router.push("/index");
|
|
|
+ that.$store.state.userInfo = res.content;
|
|
|
}).catch((err) => {
|
|
|
that.$store.state.user = null;
|
|
|
that.$router.push("/login");
|