Browse Source

添加验证码

tangning 10 months ago
parent
commit
1a5ec7f5b7
2 changed files with 4 additions and 4 deletions
  1. 1 1
      src/api/sys/model/userModel.ts
  2. 3 3
      src/views/sys/login/LoginForm.vue

+ 1 - 1
src/api/sys/model/userModel.ts

@@ -4,6 +4,7 @@
 export interface LoginParams {
 export interface LoginParams {
   username: string;
   username: string;
   password: string;
   password: string;
+  authCode?: string;
 }
 }
 
 
 export interface RoleInfo {
 export interface RoleInfo {
@@ -42,5 +43,4 @@ export interface GetUserInfoModel {
   desc?: string;
   desc?: string;
   // 权限
   // 权限
   roleId: number;
   roleId: number;
-
 }
 }

+ 3 - 3
src/views/sys/login/LoginForm.vue

@@ -137,8 +137,8 @@
       return v.toString(16);
       return v.toString(16);
     });
     });
   };
   };
-  const baseURL = 'https://test-mix3d.4dkankan.com/fusion/notAuth/getLoginAuthCode'
-  let getCode = ''
+  const baseURL = ''
+  let getCode = '/service/manage/getLoginAuthCode'
   const imgKey = ref(guid());
   const imgKey = ref(guid());
   const refer = () => (imgKey.value = guid());
   const refer = () => (imgKey.value = guid());
   const codeImg = computed(() => baseURL + getCode + "?key=" + imgKey.value);
   const codeImg = computed(() => baseURL + getCode + "?key=" + imgKey.value);
@@ -178,7 +178,7 @@
       const userInfo = await userStore.login({
       const userInfo = await userStore.login({
         password: data.password,
         password: data.password,
         username: data.account,
         username: data.account,
-        code: data.code,
+        authCode: data.code,
         mode: 'none', //不要默认的错误提示
         mode: 'none', //不要默认的错误提示
       });
       });
       if (userInfo) {
       if (userInfo) {