|
@@ -40,6 +40,19 @@ const form = ref({})
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
//
|
|
//
|
|
const doLogin = async () => {
|
|
const doLogin = async () => {
|
|
|
|
+ if (!form.value.username) {
|
|
|
|
+ return ElMessage({
|
|
|
|
+ message: '用户名不能为空!',
|
|
|
|
+ type: 'error',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (!form.value.password) {
|
|
|
|
+ return ElMessage({
|
|
|
|
+ message: '密码不能为空!',
|
|
|
|
+ type: 'error',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
loading.value = true
|
|
loading.value = true
|
|
//TODO 这里需要调用后台方法实现登录
|
|
//TODO 这里需要调用后台方法实现登录
|
|
try {
|
|
try {
|