diff --git a/jero-web/src/views/user/Login.vue b/jero-web/src/views/user/Login.vue
index 9de0d6b5..17cb0dde 100644
--- a/jero-web/src/views/user/Login.vue
+++ b/jero-web/src/views/user/Login.vue
@@ -29,7 +29,7 @@
autocomplete="false"
placeholder="请输入密码"
>
-
+
@@ -37,7 +37,7 @@
-
+
@@ -53,8 +53,8 @@
-
-
+
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -181,12 +181,12 @@
import { mapActions } from 'vuex'
import { timeFix } from '@/utils/util'
import Vue from 'vue'
-import { ACCESS_TOKEN, ENCRYPTED_STRING, USER_INFO } from '@/store/mutation-types'
-import { putAction, postAction, getAction } from '@/api/manage'
+import { ACCESS_TOKEN/* , ENCRYPTED_STRING, USER_INFO */ } from '@/store/mutation-types'
+import { /* putAction, */ postAction, getAction } from '@/api/manage'
import { getRSAPublicKey } from '@/utils/encryption.js'
import { JSEncrypt } from 'jsencrypt'
-const Base64 = require('js-base64').Base64
+// const Base64 = require('js-base64').Base64
export default {
components: {},
@@ -255,7 +255,7 @@ export default {
loginParams.username = encrypt.encrypt(values.username)
loginParams.password = encrypt.encrypt(values.password)
// 登录
- that.Login(loginParams).then((res) => {
+ that.Login(loginParams).then((/* res */) => {
this.loginSuccess()
}).catch((err) => {
if (err.code === 500) {
@@ -331,7 +331,7 @@ export default {
})
},
loginSuccess () {
- this.$router.push({ path: '/' }).catch((res) => {})
+ this.$router.push({ path: '/' }).catch((/* res */) => {})
this.$notification.success({
message: '欢迎',
description: `${timeFix()},欢迎回来`
@@ -356,13 +356,15 @@ export default {
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
callback()
} else {
+ // eslint-disable-next-line standard/no-callback-literal
callback('您的手机号码格式不正确!')
}
},
validateInputCode (rule, value, callback) {
- if (!value || this.verifiedCode == this.inputCodeContent) {
+ if (!value || this.verifiedCode === this.inputCodeContent) {
callback()
} else {
+ // eslint-disable-next-line standard/no-callback-literal
callback('您输入的验证码不正确!')
}
},
@@ -385,27 +387,27 @@ export default {
}
// 判断当前设备
function isMobile () {
- var userAgentInfo = navigator.userAgent
+ const userAgentInfo = navigator.userAgent
- var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
+ const mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
- var mobile_flag = false
+ let mobileFlag = false
// 根据userAgent判断是否是手机
- for (var v = 0; v < mobileAgents.length; v++) {
+ for (let v = 0; v < mobileAgents.length; v++) {
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
- mobile_flag = true
+ mobileFlag = true
break
}
}
- var screen_width = window.screen.width
- var screen_height = window.screen.height
+ const screenWidth = window.screen.width
+ const screenHeight = window.screen.height
// 根据屏幕分辨率判断是否是手机
- if (screen_width < 500 && screen_height < 800) {
- mobile_flag = true
+ if (screenWidth < 500 && screenHeight < 800) {
+ mobileFlag = true
}
- return mobile_flag
+ return mobileFlag
}
diff --git a/jero-web/src/views/user/LoginSelectTenant.vue b/jero-web/src/views/user/LoginSelectTenant.vue
index bb20c91f..e81417a0 100644
--- a/jero-web/src/views/user/LoginSelectTenant.vue
+++ b/jero-web/src/views/user/LoginSelectTenant.vue
@@ -16,10 +16,10 @@
您有多个租户,请选择登录租户
-
+
-
+
{{ d.name }}
@@ -32,10 +32,10 @@
您有多个部门,请选择登录部门
-
+
-
+
{{ d.departName }}
@@ -81,6 +81,7 @@ export default {
} else if (!this.isMultiDepart && this.isMultiTenant) {
return '请选择租户'
}
+ return ''
}
},
methods: {
@@ -92,16 +93,16 @@ export default {
this.validate_status2 = ''
},
bizDepart (loginResult) {
- const multi_depart = loginResult.multi_depart
+ const multiDepart = loginResult.multi_depart + ''
// 0:无部门 1:一个部门 2:多个部门
- if (multi_depart == 0) {
+ if (multiDepart === '0') {
this.$notification.warn({
message: '提示',
description: `您尚未归属部门,请确认账号信息`,
duration: 3
})
this.isMultiDepart = false
- } else if (multi_depart == 2) {
+ } else if (multiDepart === '2') {
this.visible = true
this.isMultiDepart = true
this.departList = loginResult.departs
@@ -164,6 +165,7 @@ export default {
} else {
this.requestFailed(res)
this.$store.dispatch('Logout')
+ // eslint-disable-next-line prefer-promise-reject-errors
reject()
}
})
diff --git a/jero-web/src/views/user/third/JeroThirdLoginMixin.js b/jero-web/src/views/user/third/JeroThirdLoginMixin.js
index b976fbeb..7ca4e8f1 100644
--- a/jero-web/src/views/user/third/JeroThirdLoginMixin.js
+++ b/jero-web/src/views/user/third/JeroThirdLoginMixin.js
@@ -97,7 +97,7 @@ export const JeroThirdLoginMixin = {
thirdLoginUserCreate () {
this.thirdCreateUserLoding = true
// 账号名后面添加两位随机数
- this.thirdLoginInfo.suffix = parseInt(Math.random() * 98 + 1)
+ this.thirdLoginInfo.suffix = parseInt((Math.random() * 98 + 1) + '')
// this.thirdLoginInfo.operateCode = 123 //测试校验失败
postAction('/sys/third/user/create', this.thirdLoginInfo).then(res => {
if (res.success) {