update code

This commit is contained in:
leonard
2025-07-24 14:45:30 +07:00
parent bcf4015cae
commit bbd037dcb4
5 changed files with 50 additions and 15 deletions

View File

@ -147,6 +147,26 @@ export default {
// }
await this.loginChk();
},
// async loginChk() {
// const DOMAIN = '';
// const apiUrl = 'loginChk';
// const params = {
// local: 'ko',
// comId: this.userComId, // 요청 comId는 클라우드 서비스시는 입력 값으로 처리 되어야 할수 있음.
// userId: this.userId,
// userPswd: this.userPw,
// };
// const res = await this.$axios.post(DOMAIN + apiUrl, { params: params });
// const femsSessionCookie = 3434;
// const FEMS_SESSION = femsSessionCookie;
// $cookie.set('FEMS_SESSION', FEMS_SESSION);
// this.setUserInfo(res.data.dataset.userInfo);
// // alert("임시로 로그인 처리 되었습니다. dashboard 페이지로 이동합니다.");
// // console.log('res.data.dataset.userInfo: ', res.data.dataset.userInfo);
// // return;
// this.$router.push({ path: this.myHome.root });
// },
async loginChk() {
const DOMAIN = '';
const apiUrl = 'loginChk';
@ -156,15 +176,25 @@ export default {
userId: this.userId,
userPswd: this.userPw,
};
console.log('asdasd' + JSON.stringify( DOMAIN) + params)
const res = await this.$axios.post(DOMAIN + apiUrl, { params: params });
const femsSessionCookie = 3434;
if (res.data.retnCd === -9001) {
alert(res.data.retnMsg);
return {};
} else {
const femsSessionCookie = res.data.dataset.FEMS_SESSION;
const FEMS_SESSION = femsSessionCookie;
$cookie.set('FEMS_SESSION', FEMS_SESSION);
this.setUserInfo(res.data.dataset.userInfo);
console.log('FEMS_SESSION', FEMS_SESSION);
console.log('$cookie.get', $cookie.get('FEMS_SESSION'));
console.log('userInfo', JSON.stringify(res.data.dataset.userInfo));
// alert("임시로 로그인 처리 되었습니다. dashboard 페이지로 이동합니다.");
this.$router.push({ path: this.myHome.root });
}
},
},
};