mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 03:28:39 +09:00
로그인 수정
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<div class="wbox">
|
||||
<div class="logo"></div>
|
||||
<h3 class="title">관리자 로그인</h3>
|
||||
<!-- <form action=""> -->
|
||||
<div class="login-form">
|
||||
<li><input type="text" placeholder="아이디" v-model="userId"></li>
|
||||
<li><input type="password" placeholder="비밀번호" v-model="userPwd" @keyup.enter="ajaxlogin"></li>
|
||||
@@ -15,7 +14,6 @@
|
||||
</li>
|
||||
<li><button class="btn-pcolor" @click="ajaxlogin">로그인</button></li>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
<div class="login-notice">
|
||||
<div>
|
||||
<li>비밀번호 분실 시 비밀번호 초기화를 이용해주세요.</li>
|
||||
@@ -24,8 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<login-popup ref="LoginPopup"> </login-popup>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
@@ -33,7 +30,6 @@
|
||||
|
||||
<script>
|
||||
import api from '../service/api';
|
||||
//import LoginPopup from '@/components/LoginPopup.vue';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
@@ -70,8 +66,7 @@ export default {
|
||||
let cont = document.querySelector(".wrap");
|
||||
cont.classList.remove("login-wrap");
|
||||
},
|
||||
components: {
|
||||
// LoginPopup : LoginPopup,
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
methods: {
|
||||
@@ -90,8 +85,7 @@ export default {
|
||||
var vm = this;
|
||||
vm.errmsg = null;
|
||||
this.row = {}
|
||||
// if (!vm.formCheck()) return false;
|
||||
console.log(this.userId)
|
||||
|
||||
if (!this.userId){
|
||||
this.row.title = '로그인 실패';
|
||||
this.row.msg1 = '아이디,비밀번호를 확인해주세요.';
|
||||
@@ -117,20 +111,17 @@ export default {
|
||||
//로그인버튼을 누를시 상황
|
||||
try {
|
||||
const response = await api.login(params)
|
||||
const rsp = response.data;
|
||||
console.log(rsp);
|
||||
const rsp = response.data;
|
||||
|
||||
if(rsp.retCode == '0000'){
|
||||
var path = rsp.data.nextUrl;
|
||||
console.log(path);
|
||||
console.log(rsp.data);
|
||||
|
||||
vm.chgChkUserId();
|
||||
vm.$store.commit("login/isLogin", true);
|
||||
vm.$store.commit("login/savePwd", oprtrPw);
|
||||
vm.$router.push({ name: 'loginAuth',params: {userId : oprtrId}});
|
||||
} else if(rsp.retCode == '1001'){ // 비밀번호 변경
|
||||
console.log(this.userId);
|
||||
vm.chgChkUserId();
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
|
||||
}else if(rsp.retCode == '4003') { // ID 조회 없음.
|
||||
this.row.title = '로그인 실패';
|
||||
@@ -147,7 +138,6 @@ export default {
|
||||
this.row.msg1 = '로그인 5회 실패하였습니다.';
|
||||
this.row.msg2 = '비밀번호 초기화 후 비밀번호를 변경해 주세요.';
|
||||
this.row.callFnc = 'resetPassword'
|
||||
console.log(this.row)
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
} else if(rsp.retCode == '4006') {
|
||||
// msg = '비밀번호를 변경하신지 90일이 지났습니다.\n비밀번호 변경 화면으로 이동합니다.';
|
||||
@@ -156,7 +146,6 @@ export default {
|
||||
this.row.msg2 = '지났습니다. 비밀번호를 변경하여';
|
||||
this.row.msg3 = '이용 부탁드립니다.';
|
||||
this.row.callFnc = 'updatePassword'
|
||||
//vm.$store.commit("login/isLogin", true);
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
} else if(rsp.retCode == '4007') {
|
||||
this.row.title = '로그인 실패';
|
||||
@@ -168,7 +157,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
this.row.title = '로그인';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
@@ -183,17 +171,11 @@ export default {
|
||||
path: link
|
||||
});
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
// this.$refs.LoginPopup.ModalOpen(target);
|
||||
},
|
||||
|
||||
alertCalbackFnc(callFnc){
|
||||
console.log(callFnc)
|
||||
if(callFnc === 'resetPassword'){
|
||||
this.$router.push({ name: 'resetPassword',params: {}});
|
||||
}else if(callFnc === 'updatePassword'){
|
||||
// this.$router.push({ name: 'updatePassword', params: {}}).catch(()=>{});
|
||||
// this.$router.push({ name: 'updatePassword', params: {userId : this.userId} });
|
||||
// this.$router.push({ path: '/view/login/updatePassword', params: {userId : this.userId}});
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
|
||||
|
||||
Reference in New Issue
Block a user