|
|
|
|
@ -207,6 +207,33 @@ export async function headFileUploadUsingPatch(
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 传入身份证图片,获取身份证号码 识别 POST /oss/getIdCardByPic */
|
|
|
|
|
export async function getIdCardByPicUsingPost(body: API.PbcRole, options?: { [key: string]: any }) {
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/getIdCardByPic', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
data: body,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 传入商户的认证图url,获取商户社会统一信用代码 识别 POST /oss/getPbcUnifiedSocialCreditCodeByPic */
|
|
|
|
|
export async function getPbcUnifiedSocialCreditCodeByPicUsingPost(
|
|
|
|
|
body: API.PbcRole,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/getPbcUnifiedSocialCreditCodeByPic', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
data: body,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** headImgUpload GET /oss/imgUpload */
|
|
|
|
|
export async function headImgUploadUsingGet(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
@ -435,3 +462,249 @@ export async function orcIdCardUsingPost(body: API.PbcRole, options?: { [key: st
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 评论带图 评论带图 POST /oss/uploadCommentImage */
|
|
|
|
|
export async function uploadCommentImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.uploadCommentImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/uploadCommentImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 用户头像 用户头像 POST /oss/uploadHeadImage */
|
|
|
|
|
export async function uploadHeadImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.uploadHeadImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/uploadHeadImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 商户LOGO、身份证正反面、营业执照 商户LOGO、身份证正反面、营业执照 POST /oss/uploadInfoImage */
|
|
|
|
|
export async function uploadInfoImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.uploadInfoImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/uploadInfoImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 商品主图、商品详细图、商品各颜色图片 商品主图、商品详细图、商品各颜色图片 POST /oss/uploadProductImage */
|
|
|
|
|
export async function uploadProductImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.uploadProductImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/uploadProductImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 按上传图片搜索商品 按上传图片搜索商品 POST /oss/upLoadSearchImage */
|
|
|
|
|
export async function upLoadSearchImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.upLoadSearchImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/upLoadSearchImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 商家用户简介里的图片 商家用户简介里的图片 POST /oss/uploadUserInfoImage */
|
|
|
|
|
export async function uploadUserInfoImageUsingPost(
|
|
|
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
|
|
|
params: API.uploadUserInfoImageUsingPOSTParams,
|
|
|
|
|
body: {},
|
|
|
|
|
file?: File,
|
|
|
|
|
options?: { [key: string]: any },
|
|
|
|
|
) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
|
|
|
const item = (body as any)[ele];
|
|
|
|
|
|
|
|
|
|
if (item !== undefined && item !== null) {
|
|
|
|
|
if (typeof item === 'object' && !(item instanceof File)) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.forEach((f) => formData.append(ele, f || ''));
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, JSON.stringify(item));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formData.append(ele, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return request<API.AjaxResultString_>('/oss/uploadUserInfoImage', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
params: {
|
|
|
|
|
...params,
|
|
|
|
|
},
|
|
|
|
|
data: formData,
|
|
|
|
|
requestType: 'form',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|