diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js
index 54816d5..4d1a84e 100644
--- a/src/common/lang/en-us.js
+++ b/src/common/lang/en-us.js
@@ -235,7 +235,7 @@ module.exports = {
heads: 'Heads',
account: 'Account',
userName: 'User Name',
- post: 'post',
+ post: 'Post',
selectedAccount: 'Selected account?',
// 新增、编辑用户
loginPassword: 'Login Password',
diff --git a/src/mixins/JeroListMixin.js b/src/mixins/JeroListMixin.js
index 5fb5d2f..d75a486 100644
--- a/src/mixins/JeroListMixin.js
+++ b/src/mixins/JeroListMixin.js
@@ -33,7 +33,7 @@ export const JeroListMixin = {
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
+ return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
@@ -417,7 +417,14 @@ export const JeroListMixin = {
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
- const { message, result: { msg, fileUrl, fileName } } = info.file.response
+ const {
+ message,
+ result: {
+ msg,
+ fileUrl,
+ fileName
+ }
+ } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue
index 1c5637b..029202a 100644
--- a/src/views/user/Login.vue
+++ b/src/views/user/Login.vue
@@ -12,7 +12,7 @@
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
type="text"
placeholder="请输入帐号">
-
+
@@ -28,10 +28,21 @@
:type="passwordType"
autocomplete="false"
placeholder="请输入密码"
+ @paste.native.capture.prevent="handleOperate"
>
-
-
-
+
+
+
@@ -48,13 +59,21 @@
@change="inputCodeChange"
autocomplete="off"
placeholder="请输入验证码">
-
+
-
-
+
+
@@ -86,7 +105,7 @@
:loading="loginBtn"
@click.stop.prevent="handleSubmit"
:disabled="loginBtn">
- {{ loginBtn ? "登录中" : "登录" }}
+ {{ loginBtn ? '登录中' : '登录' }}
@@ -94,7 +113,11 @@
-
+
@@ -104,7 +127,7 @@
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
type="text"
placeholder="请输入帐号">
-
+
@@ -119,7 +142,7 @@
autocomplete="false"
placeholder="请输入密码"
>
-
+
@@ -133,19 +156,28 @@
type="text"
@change="inputCodeChange"
placeholder="请输入验证码">
-
+
-
-
+
+
- 自动登录
+ 自动登录
+
@@ -168,7 +200,7 @@
:loading="loginBtn"
@click.stop.prevent="handleSubmit"
:disabled="loginBtn">
- {{ loginBtn ? "登录中" : "登录" }}
+ {{ loginBtn ? '登录中' : '登录' }}
@@ -203,11 +235,32 @@ export default {
smsSendBtn: false
},
validatorRules: {
- username: { rules: [{ required: true, message: '请输入用户名!' }, { validator: this.handleUsernameOrEmail }] },
- password: { rules: [{ required: true, message: '请输入密码!', validator: 'click' }] },
+ username: {
+ rules: [{
+ required: true,
+ message: '请输入用户名!'
+ }, { validator: this.handleUsernameOrEmail }]
+ },
+ password: {
+ rules: [{
+ required: true,
+ message: '请输入密码!',
+ validator: 'click'
+ }]
+ },
mobile: { rules: [{ validator: this.validateMobile }] },
- captcha: { rule: [{ required: true, message: '请输入验证码!' }] },
- inputCode: { rules: [{ required: true, message: '请输入验证码!' }] }
+ captcha: {
+ rule: [{
+ required: true,
+ message: '请输入验证码!'
+ }]
+ },
+ inputCode: {
+ rules: [{
+ required: true,
+ message: '请输入验证码!'
+ }]
+ }
},
velorifiedCode: '',
inputCodeContent: '',
@@ -273,39 +326,39 @@ export default {
e.preventDefault()
const that = this
this.form.validateFields(['mobile'], { force: true }, (err, values) => {
- if (!values.mobile) {
- that.cmsFailed('请输入手机号')
- } else if (!err) {
- this.state.smsSendBtn = true
- const interval = window.setInterval(() => {
- if (that.state.time-- <= 0) {
- that.state.time = 60
- that.state.smsSendBtn = false
- window.clearInterval(interval)
- }
- }, 1000)
-
- const hide = this.$message.loading('验证码发送中..', 0)
- const smsParams = {}
- smsParams.mobile = values.mobile
- smsParams.smsmode = '0'
- postAction('/sys/sms', smsParams)
- .then(res => {
- if (!res.success) {
- setTimeout(hide, 0)
- this.cmsFailed(res.message)
+ if (!values.mobile) {
+ that.cmsFailed('请输入手机号')
+ } else if (!err) {
+ this.state.smsSendBtn = true
+ const interval = window.setInterval(() => {
+ if (that.state.time-- <= 0) {
+ that.state.time = 60
+ that.state.smsSendBtn = false
+ window.clearInterval(interval)
}
- setTimeout(hide, 500)
- })
- .catch(err => {
- setTimeout(hide, 1)
- clearInterval(interval)
- that.state.time = 60
- that.state.smsSendBtn = false
- this.requestFailed(err)
- })
+ }, 1000)
+
+ const hide = this.$message.loading('验证码发送中..', 0)
+ const smsParams = {}
+ smsParams.mobile = values.mobile
+ smsParams.smsmode = '0'
+ postAction('/sys/sms', smsParams)
+ .then(res => {
+ if (!res.success) {
+ setTimeout(hide, 0)
+ this.cmsFailed(res.message)
+ }
+ setTimeout(hide, 500)
+ })
+ .catch(err => {
+ setTimeout(hide, 1)
+ clearInterval(interval)
+ that.state.time = 60
+ that.state.smsSendBtn = false
+ this.requestFailed(err)
+ })
+ }
}
- }
)
},
handleChangeCheckCode () {
@@ -331,7 +384,8 @@ export default {
})
},
loginSuccess () {
- this.$router.push({ path: '/' }).catch((/* res */) => {})
+ this.$router.push({ path: '/' }).catch((/* res */) => {
+ })
this.$notification.success({
message: '欢迎',
description: `${timeFix()},欢迎回来`
@@ -388,9 +442,14 @@ export default {
})
}
})
+ },
+ // 密码禁止粘贴
+ handleOperate () {
+ return false
}
}
}
+
// 判断当前设备
function isMobile () {
const userAgentInfo = navigator.userAgent
@@ -418,63 +477,71 @@ function isMobile () {