CN-90 fix: 色阶增加单位

This commit is contained in:
chenjinsong
2021-08-26 17:14:51 +08:00
parent 51db57d3a5
commit fa7a3b4a96
10 changed files with 205 additions and 144 deletions

View File

@@ -40,7 +40,6 @@
<script>
import { mapActions } from 'vuex'
import { post } from '@/utils/http'
import { ElMessage } from 'element-plus'
export default {
name: 'Login',
@@ -64,18 +63,19 @@ export default {
// }
post('sys/login', { username: this.username, pin: this.pin }).then(
res => {
if (res.code === 200 && res.msg == 'success') {
this.loading = true
this.blockOperation.query = true
if (res.code === 200) {
this.loginSuccess(res)
localStorage.setItem('cn-username', this.username)
} else if (res.code === 518005) {
this.$message.error(this.$t('tip.incorrectUsernameOrPassword'))
} else {
this.loading = false
this.blockOperation.query = false
ElMessage.error('密码错误')
this.$message.error(this.$t('tip.unknownError'))
}
}
)
).finally(() => {
this.loading = false
this.blockOperation.query = false
})
}
}
}