Ver código fonte

添加验证码

tangning 9 meses atrás
pai
commit
1a5ec7f5b7

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

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

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

@@ -137,8 +137,8 @@
       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 refer = () => (imgKey.value = guid());
   const codeImg = computed(() => baseURL + getCode + "?key=" + imgKey.value);
@@ -178,7 +178,7 @@
       const userInfo = await userStore.login({
         password: data.password,
         username: data.account,
-        code: data.code,
+        authCode: data.code,
         mode: 'none', //不要默认的错误提示
       });
       if (userInfo) {