Browse Source

功能优化

songxy 1 month ago
parent
commit
c265e00193
2 changed files with 9 additions and 5 deletions
  1. 1 5
      ais_search_jx/src/App.vue
  2. 8 0
      ais_search_jx/src/views/admin/login.vue

+ 1 - 5
ais_search_jx/src/App.vue

@@ -11,20 +11,16 @@
 <script setup>
 import { RouterView } from 'vue-router';
 import { onBeforeMount, ref } from 'vue';
-import http from "@/utils/http";
 
 import zhCN from 'ant-design-vue/es/locale/zh_CN';
 import dayjs from 'dayjs';
-import { message } from 'ant-design-vue';
-import { useUserStore } from '@/stores';
-import { setLocalStorageWithExpiry, getLocalStorageWithExpiry } from '@/utils/store.js'
+import { getLocalStorageWithExpiry } from '@/utils/store.js'
 
 import 'dayjs/locale/zh-cn';
 dayjs.locale('zh-cn');
 
 const locale = ref(zhCN)
 
-const store = useUserStore();
 onBeforeMount(() => {
   document.title = window?.AppGlobalConfig?.system?.name || '';
 })

+ 8 - 0
ais_search_jx/src/views/admin/login.vue

@@ -32,6 +32,14 @@ const formData = ref({
 const loading = ref(false)
 const onLoginSubmit = () => {
   const urlStr = "/baseApi/auth/login"
+  if (!formData.value['username']) {
+    message.error("用户名不能为空!");
+    return;
+  }
+  if (!formData.value['password']) {
+    message.error("密码不能为空!");
+    return;
+  }
   const sendData = {
     ...formData.value
   }