Merge remote-tracking branch 'origin/main'

# Conflicts:
#	.env
#	.env.development
#	.env.production
#	src/api/shop/shopGoods/index.ts
#	src/views/shop/shopGoods/components/search.vue
#	src/views/shop/shopGoods/index.vue
This commit is contained in:
2026-06-16 13:06:00 +08:00
17 changed files with 2183 additions and 724 deletions

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoods, ShopGoodsCollectParam, ShopGoodsParam } from './model';
import type { ShopGoods, ShopGoodsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
@@ -132,12 +132,14 @@ export async function importShopGoods(file: File) {
}
/**
* 通过商品链接采集入库
* 导入商品图片
*/
export async function collectShopGoods(data: ShopGoodsCollectParam) {
export async function importShopGoodsImages(file: File) {
const formData = new FormData();
formData.append('file', file);
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods/collect',
data
MODULES_API_URL + '/shop/shop-goods/import/images',
formData
);
if (res.data.code === 0) {
return res.data.message;

View File

@@ -14,6 +14,8 @@ export interface ShopGoodsCategory {
type?: number;
// 分类图片
image?: string;
// 广告图
adImage?: string;
// 上级分类ID
parentId?: number;
// 路由/链接地址

View File

@@ -20,6 +20,10 @@ export interface Payment {
appId?: string;
// 商户号
mchId?: string;
// 子商户应用ID
subAppId?: string;
// 子商户号
subMchId?: string;
// 设置APIv3密钥
apiKey?: string;
// 证书文件 (CERT)