可以打包

This commit is contained in:
Cheney
2024-12-25 13:38:09 +08:00
parent 8176e9c034
commit e099ff08ba
10 changed files with 196 additions and 15 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

+72
View File
@@ -0,0 +1,72 @@
import axios from 'axios';
import qs from 'qs';
const apiClient = axios.create({
baseURL: 'http://localhost:18090', // Replace with your API base URL
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
});
export const postData = async (data) => {
try {
const response = await apiClient.post('/do', qs.stringify(data));
return response.data;
} catch (error) {
console.error('Error posting data:', error);
throw error;
}
};
export const getVersion = async () => {
const data = {
};
try {
const response = await apiClient.post('/', qs.stringify(data));
return response.data;
} catch (error) {
console.error('Error posting data:', error);
throw error;
}
}
export const getList = async () => {
const data = {
order: '01000005'
};
return postData(data);
}
export const addFakeUkey = async (name) => {
const data = {
name
};
try {
const response = await apiClient.post('/fakeUkey/add', qs.stringify(data));
return response.data;
} catch (error) {
console.error('Error posting data:', error);
throw error;
}
}
export const delFakeUkey = async (name) => {
const data = {
name
};
try {
const response = await apiClient.post('/fakeUkey/del', qs.stringify(data));
return response.data;
} catch (error) {
console.error('Error posting data:', error);
throw error;
}
}
+2
View File
@@ -0,0 +1,2 @@
console.log(structuredClone)