수정건 수정

This commit is contained in:
USER
2022-08-03 17:40:17 +09:00
parent abb5db5b97
commit 811986fa6d
24 changed files with 327 additions and 161 deletions

View File

@@ -45,7 +45,7 @@
<script>
import { mapGetters } from 'vuex';
import api from '../service/api';
import tokenSvc from '@/common/token-service';
// import tokenSvc from '@/common/token-service';
import { utils_mixin, chkPattern2 } from '../service/mixins';
import LoginPopup from '@/components/LoginPopup.vue'
import commonModal from "../components/commonModal";
@@ -83,6 +83,12 @@ export default {
,commonModal
},
created() {
const historyUrl = this.$router.options.history.state.back;
console.log(historyUrl);
console.log('>>>>1111>>>>'+this.getLogin);
if(!this.getLogin){
this.$router.push({ path: '/login' });
}
// if(!!tokenSvc.getToken()){
// this.$store.commit("login/isLogin", true);
// this.$store.commit("login/isAuthChk", true);
@@ -193,6 +199,14 @@ export default {
vm.$store.commit("login/isLogin", false);
vm.$store.commit("login/isAuthChk", false);
this.$refs.commmonModal.alertModalOpen(this.row);
}else if(rsp.retCode == '4022'){
this.row.title = '인증실패';
this.row.msg1 = '계정 잠김 잠시후 다시 시도해주세요.';
this.row.msg2 = '로그아웃 됩니다.';
this.row.callFnc = 'login'
vm.$store.commit("login/isLogin", false);
vm.$store.commit("login/isAuthChk", false);
this.$refs.commmonModal.alertModalOpen(this.row);
}else if (!this.timer) {
this.timerStop(this.timer);
this.timer = null;
@@ -362,7 +376,7 @@ export default {
if(callFnc === 'login'){
this.$router.push({ path: '/'});
}
},
},
}
};
</script>

View File

@@ -33,7 +33,7 @@
<script>
import api from '../service/api';
import LoginPopup from '@/components/LoginPopup.vue';
//import LoginPopup from '@/components/LoginPopup.vue';
import tokenSvc from '@/common/token-service';
import commonModal from "../components/commonModal";
@@ -128,8 +128,7 @@ export default {
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('=-==-=-=-');
} else if(rsp.retCode == '1001'){ // 비밀번호 변경
console.log(this.userId);
vm.chgChkUserId();
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
@@ -157,6 +156,7 @@ 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 = '로그인 실패';
@@ -194,7 +194,8 @@ export default {
// 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}});
}
},

View File

@@ -23,6 +23,7 @@
import lodash from "lodash";
import api from '../service/api';
import commonModal from "../components/commonModal";
import { mapGetters } from 'vuex';
export default {
name: 'updatePassword',
@@ -34,15 +35,31 @@ export default {
newPw2: '',
passwordValidFlag: true,
row: {},
isLogin: false,
}
},
created() {
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", false);
console.log('>>>>'+this.getLogin);
if(!this.getLogin){
this.$router.push({ path: '/login' });
}
// this.$store.commit("login/isLogin", true);
// this.$store.commit("login/isAuthChk", false);
},
computed: {
...mapGetters({
getLogin: 'login/isLogin',
}),
},
watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
} else {
this.isLogin = false;
}
}
},
components: {
commonModal,
},