-
广州市市场监督管理局
+
内蒙古自治区市场监督管理局
- © 2021 广州市市场监督管理局 | 技术支持:广东众望通科技股份有限公司
+ © {{ new Date().getFullYear() }} 内蒙古自治区市场监督管理局 | 技术支持:广东众望通科技股份有限公司
@@ -39,6 +39,28 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -49,42 +71,44 @@
ref="password"
v-model="loginForm.password"
:type="passwordType"
- placeholder="验证码"
+ placeholder="密码"
name="password"
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
/>
-
- 获取短信验证码
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 刷新
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
import Cookie from 'js-cookie'
-import request from '@/utils/request'
-// import { asyncRoutes } from '../../router/index'
-import { logManage, getCode, loginByCode, isHaveUser } from '@/api/user.js'
+import { logManage, getCode, isHaveUser, loginByPwd } from '@/api/user.js'
export default {
name: 'Login',
data() {
@@ -114,14 +136,22 @@ export default {
systemTitleLogin: process.env.VUE_APP_SYSTEM_TITLE_LOGIN,
loginForm: {
username,
- password
+ password,
+ captcha: '',
+ captchadl: ''
},
loginRules: {
username: [
{ required: true, trigger: 'blur', message: '用户名不能为空' }
],
password: [
- { required: true, trigger: 'blur', message: '验证码不能为空' }
+ { required: true, trigger: 'blur', message: '短信验证码不能为空' }
+ ],
+ captcha: [
+ { required: true, trigger: 'blur', message: '图形验证码不能为空' }
+ ],
+ captchadl: [
+ { required: true, trigger: 'blur', message: '登录图形验证码不能为空' }
]
},
loading: false,
@@ -130,7 +160,9 @@ export default {
reload: false,
auditUserName: '',
auditPassWordHid: '',
- codeloading: false
+ codeloading: false,
+ captchaSrc: '',
+ captchaSrcdl: ''
}
},
watch: {
@@ -158,7 +190,7 @@ export default {
const { code, msg } = response
if (code === 0) {
this.loginForm.username = jiem
- this.getcode()
+ this.getCode()
} else {
this.$message.warning(msg)
}
@@ -168,29 +200,30 @@ export default {
this.loading = false
})
}
- // console.log(jiam)
+ this.refreshCaptcha()
+ this.refreshCaptchadl()
},
methods: {
- showPwd() {
- if (this.passwordType === 'password') {
- this.passwordType = ''
- } else {
- this.passwordType = 'password'
- }
- this.$nextTick(() => {
- this.$refs.password.focus()
- })
+ refreshCaptcha() {
+ this.captchaSrc = '/aiccs-api/user/captcha' + '?' + new Date().getTime()
+ },
+ refreshCaptchadl() {
+ this.captchaSrcdl = '/aiccs-api/user/captchadl' + '?' + new Date().getTime()
},
isEmpty(str) {
return !str || str.length === 0 || str === null || str === 'null'
},
- getcode() {
+ getCode() {
if (this.isEmpty(this.loginForm.username)) {
this.codeloading = false
return this.$message.warning('账号不能为空')
}
+ if (this.isEmpty(this.loginForm.captcha)) {
+ this.codeloading = false
+ return this.$message.warning('图形验证码不能为空')
+ }
this.codeloading = true
- getCode(this.loginForm.username).then((response) => {
+ getCode(this.loginForm.username, this.loginForm.captcha).then((response) => {
const { code, msg } = response
if (code === 0) {
this.$message.success('验证码已发送')
@@ -198,20 +231,21 @@ export default {
this.$message.warning(msg)
}
this.codeloading = false
+ }).finally(() => {
+ this.refreshCaptcha()
})
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true
- loginByCode(this.loginForm.username, this.loginForm.password)
+ loginByPwd(this.loginForm.username, this.loginForm.password, this.loginForm.captchadl)
.then((response) => {
const { code, msg } = response
if (code === 0) {
this.loginManage()
this.loginManage()
Cookie.set('loginInfo', this.loginForm, { expires: 30 })
- // this.$router.push({ path: this.redirect || '/' })
if (this.loginForm.password === '123456') {
this.$router.push({ path: '/redirect', query: { queryOlderP: '1' }})
} else {
@@ -219,14 +253,20 @@ export default {
}
} else {
this.$message.warning(msg)
+ this.refreshCaptcha()
+ this.refreshCaptchadl()
}
this.loading = false
})
.catch(() => {
this.loading = false
+ this.refreshCaptcha()
+ this.refreshCaptchadl()
})
} else {
console.log('error submit!!')
+ this.refreshCaptcha()
+ this.refreshCaptchadl()
return false
}
})
diff --git a/src/views/youfool/AppVersionLog.vue b/src/views/youfool/AppVersionLog.vue
index 2d040b4..2cd9a09 100644
--- a/src/views/youfool/AppVersionLog.vue
+++ b/src/views/youfool/AppVersionLog.vue
@@ -81,7 +81,7 @@