|
@@ -75,6 +75,7 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
passwordType: 'password',
|
|
passwordType: 'password',
|
|
redirect: undefined,
|
|
redirect: undefined,
|
|
|
|
+ preUrl: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -86,6 +87,10 @@ export default {
|
|
immediate: true,
|
|
immediate: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ console.log('login create')
|
|
|
|
+ this.preUrl = sessionStorage.getItem('preUrl') ? sessionStorage.getItem('preUrl') : this.$route.query.preUrl
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
showPwd() {
|
|
showPwd() {
|
|
if (this.passwordType === 'password') {
|
|
if (this.passwordType === 'password') {
|
|
@@ -119,9 +124,11 @@ export default {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (bSwitch === 1) {
|
|
|
|
|
|
+ if (bSwitch === 1 && this.preUrl === 'hospital') {
|
|
|
|
+ sessionStorage.setItem('preUrl', 'hospital')
|
|
this.$router.push({ path: '/hospital'});
|
|
this.$router.push({ path: '/hospital'});
|
|
- } else if (bSwitch === 2) {
|
|
|
|
|
|
+ } else if (bSwitch === 2 && this.preUrl === 'embedIndex') {
|
|
|
|
+ sessionStorage.setItem('preUrl', 'embedIndex')
|
|
this.$router.push({ path: '/embedIndex' });
|
|
this.$router.push({ path: '/embedIndex' });
|
|
} else {
|
|
} else {
|
|
this.$router.push(this.redirect || '/');
|
|
this.$router.push(this.redirect || '/');
|