flat: 全部暂存
This commit is contained in:
28
api/auth.js
28
api/auth.js
@@ -1,14 +1,34 @@
|
||||
import {
|
||||
request
|
||||
} from '@/untils/AxiosUtils.js';
|
||||
import {
|
||||
decryptJson
|
||||
} from '@/untils/authService.js'
|
||||
import website from "@/config/website";
|
||||
|
||||
const authUrl = '/api/jobslink-api/user/user/auth/auth'
|
||||
|
||||
export const findAuth = () => request({
|
||||
url: '/api/jobslink-api/user/user/find',
|
||||
method: 'get'
|
||||
});
|
||||
// export const findAuth = () => request({
|
||||
// url: '/api/jobslink-api/user/user/find',
|
||||
// method: 'get'
|
||||
// });
|
||||
|
||||
export const findAuth = async () => {
|
||||
try {
|
||||
const encrypted = await request({
|
||||
url: '/api/jobslink-api/user/user/find',
|
||||
method: 'get',
|
||||
responseType: 'text', // 接收纯文本密文
|
||||
});
|
||||
const decryptedStr = decryptJson(encrypted.data);
|
||||
return {
|
||||
data: JSON.parse(decryptedStr),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('请求或解密过程中出错:', error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export const cheakValue = () => request({
|
||||
url: authUrl,
|
||||
|
||||
Reference in New Issue
Block a user