|
|
@@ -134,14 +134,30 @@ export default {
|
|
|
})
|
|
|
let that = this
|
|
|
if (res.code === 1) {
|
|
|
- this.checked?localStorage.setItem('phonenumber',this.loginForm.phonenumber):localStorage.clear('phonenumber')
|
|
|
- sessionStorage.setItem('account_list',JSON.stringify(res.account_list))
|
|
|
- sessionStorage.setItem('active_account',JSON.stringify(res.account_list[0]))
|
|
|
- this.basicData.query_userauth().then(()=>{
|
|
|
- this.basicData.querySite_Parameter()
|
|
|
- this.$router.push({path:'/main'})
|
|
|
- this.getAccountInfo()
|
|
|
- })
|
|
|
+ var flag = 0
|
|
|
+ for (var i = 0;i<res.account_list.length ;i++){
|
|
|
+ if (res.account_list[i].status === 'ACTIVE'){
|
|
|
+ flag = 1
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag === 1){
|
|
|
+ this.checked?localStorage.setItem('phonenumber',this.loginForm.phonenumber):localStorage.clear('phonenumber')
|
|
|
+ sessionStorage.setItem('account_list',JSON.stringify(res.account_list))
|
|
|
+ sessionStorage.setItem('active_account',JSON.stringify(res.account_list[0]))
|
|
|
+ this.basicData.query_userauth().then(()=>{
|
|
|
+ this.basicData.querySite_Parameter()
|
|
|
+ this.$router.push({path:'/main'})
|
|
|
+ this.getAccountInfo()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '该账号已停用',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
this.$notify({
|
|
|
title: '失败',
|
|
|
@@ -169,17 +185,32 @@ export default {
|
|
|
"systemclient":"web"
|
|
|
})
|
|
|
if (res.code === 1) {
|
|
|
-
|
|
|
- this.checked?localStorage.setItem('phonenumber',this.loginForm.phonenumber):localStorage.clear('phonenumber')
|
|
|
- sessionStorage.setItem('account_list',JSON.stringify(res.account_list))
|
|
|
+ var flag = 0
|
|
|
+ for (var i = 0;i<res.account_list.length ;i++){
|
|
|
+ if (res.account_list[i].status === 'ACTIVE'){
|
|
|
+ flag = 1
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag === 1){
|
|
|
+ this.checked?localStorage.setItem('phonenumber',this.loginForm.phonenumber):localStorage.clear('phonenumber')
|
|
|
+ sessionStorage.setItem('account_list',JSON.stringify(res.account_list))
|
|
|
|
|
|
- sessionStorage.setItem('active_account',JSON.stringify(res.account_list[0]))
|
|
|
+ sessionStorage.setItem('active_account',JSON.stringify(res.account_list[0]))
|
|
|
+
|
|
|
+ this.basicData.query_userauth().then(()=>{
|
|
|
+ this.basicData.querySite_Parameter()
|
|
|
+ this.$router.push({path:'/main'})
|
|
|
+ this.getAccountInfo()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '该账号已停用',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- this.basicData.query_userauth().then(()=>{
|
|
|
- this.basicData.querySite_Parameter()
|
|
|
- this.$router.push({path:'/main'})
|
|
|
- this.getAccountInfo()
|
|
|
- })
|
|
|
} else {
|
|
|
this.$notify({
|
|
|
title: '失败',
|