合并 dev:商品发布位置与 Docker 运行环境修复

# Conflicts:
#	Dockerfile.debian13
#	compose.yml
#	docker-compose.debian13-postgres17.yml
#	internal/db/migrate_test.go
#	internal/webui/static/assets/index-Ck_JS4rs.css
#	internal/webui/static/index.html
This commit is contained in:
Christ committed 2026-08-13 09:16:17 +08:00
commit 65bcb8f15c
21 files changed
+434 -176

No files matched your search

+20
View File
@@ -526,6 +526,7 @@ export const publishItem = async (form: {
postage_mode: string;
postage?: string;
images: File[];
location: PublishLocation;
}): Promise<any> => {
const body = new FormData();
body.set('cookie_id', form.cookie_id);
@@ -536,12 +537,29 @@ export const publishItem = async (form: {
body.set('quantity', String(form.quantity));
body.set('postage_mode', form.postage_mode);
body.set('postage', form.postage || '');
body.set('location', JSON.stringify(form.location));
for (const file of form.images) {
body.append('images', file);
}
return postForm('/items/publish', body);
}
export interface PublishLocation {
area: string;
city: string;
division_id: string;
longitude: number;
latitude: number;
poi_id: string;
poi_name: string;
province: string;
}
export const getPublishLocations = async (cookieId: string, longitude: number, latitude: number): Promise<PublishLocation[]> => {
const result = await post<any>('/items/publish-locations', { cookie_id: cookieId, longitude, latitude });
return Array.isArray(result?.locations) ? result.locations : [];
}
export const recommendPublishCategory = async (cookieId: string, keyword: string): Promise<{
success: boolean;
category: {
@@ -564,6 +582,7 @@ export const previewItemPublishBatch = async (form: {
channelCatId?: string;
tbCatId?: string;
};
location: PublishLocation;
}): Promise<any> => {
const body = new FormData();
body.set('file', form.file);
@@ -573,6 +592,7 @@ export const previewItemPublishBatch = async (form: {
body.set('fallback_category_name', form.fallbackCategory.catName);
body.set('fallback_channel_category_id', form.fallbackCategory.channelCatId || '');
body.set('fallback_tb_category_id', form.fallbackCategory.tbCatId || '');
body.set('location', JSON.stringify(form.location));
return postForm('/items/publish-batches/preview', body);
}