diff --git a/config/routes.ts b/config/routes.ts index 9378221..3c737d7 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -292,6 +292,13 @@ export default [ access: 'fashionTrendQuery', component: './FashionTrend', }, + { + name: '创新服务', + path: '/innovative-service', + icon: 'message', + access: 'innovativeServiceQuery', + component: './InnovativeService', + }, { name: '广告设置', path: '/ad', diff --git a/src/pages/FashionTrend/components/UpdateForm.tsx b/src/pages/FashionTrend/components/UpdateForm.tsx index a104303..2d543e4 100644 --- a/src/pages/FashionTrend/components/UpdateForm.tsx +++ b/src/pages/FashionTrend/components/UpdateForm.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -import { DrawerForm, ProFormInstance, ProFormText, ProFormUploadButton, ProFormRadio, ProFormTextArea, ProForm } from '@ant-design/pro-components'; +import { DrawerForm, ProFormInstance, ProFormText, ProFormUploadButton, ProFormRadio, ProForm } from '@ant-design/pro-components'; import { message } from 'antd'; import Upload, { RcFile } from 'antd/es/upload'; import { Editor } from '@/components/Editor'; @@ -169,7 +169,6 @@ const UpdateForm: React.FC = (props) => { setPbcType(e.target.value) formRef.current?.setFieldValue('pbcImage', []); formRef.current?.setFieldValue('pbcVideo', []); - formRef.current?.setFieldValue('pbcContent', ''); }, }} /> @@ -267,7 +266,7 @@ const UpdateForm: React.FC = (props) => { { required: true, message: '请上传视频' }, ]} />} - {pbcType === 1 ? = (props) => { ]} > - : - } + ); }; diff --git a/src/pages/InnovativeService/components/UpdateForm.tsx b/src/pages/InnovativeService/components/UpdateForm.tsx new file mode 100644 index 0000000..3855b72 --- /dev/null +++ b/src/pages/InnovativeService/components/UpdateForm.tsx @@ -0,0 +1,285 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { DrawerForm, ProFormInstance, ProFormText, ProFormUploadButton, ProFormRadio, ProForm } from '@ant-design/pro-components'; +import { message } from 'antd'; +import Upload, { RcFile } from 'antd/es/upload'; +import { Editor } from '@/components/Editor'; + +export type FormValueType = { + target?: string; + template?: string; + type?: string; + time?: string; + frequency?: string; +} & Partial; + +export type UpdateFormProps = { + onCancel: (flag?: boolean, formVals?: FormValueType) => void; + onSubmit: (values: FormValueType) => Promise; + updateModalVisible: boolean; + values: Partial; +}; + +const UpdateForm: React.FC = (props) => { + const formRef = useRef(); + const [pbcType, setPbcType] = useState(1); + const [videoThumbnail, setVideoThumbnail] = useState(""); + + useEffect(() => { + setPbcType(props.values.pbcType || 1) + setVideoThumbnail(props.values.pbcThumbNail || "") + }, [props.values.pbcId]); + + // 生成视频缩略图的函数 + const generateVideoThumbnail = async (videoUrl: string) => { + try { + // 创建视频元素 + const video = document.createElement('video'); + video.crossOrigin = 'anonymous'; + video.src = videoUrl; + video.muted = true; + + // 监听视频加载完成事件 + await new Promise((resolve, reject) => { + video.onloadeddata = resolve; + video.onerror = reject; + // 设置超时 + setTimeout(reject, 5000); + }); + + // 播放视频并暂停在第一帧 + video.currentTime = 0; + await new Promise(resolve => {setTimeout(resolve, 200)}); + + // 创建canvas并绘制视频帧 + const canvas = document.createElement('canvas'); + canvas.width = video.videoWidth; + canvas.height = video.videoHeight; + const ctx = canvas.getContext('2d'); + ctx?.drawImage(video, 0, 0, canvas.width, canvas.height); + + // 将canvas转为blob + const blob = await new Promise((resolve) => { + canvas.toBlob((b) => resolve(b as Blob), 'image/jpeg', 0.95); + }); + + // 创建FormData并上传 + const formData = new FormData(); + formData.append('file', blob, 'thumbnail.jpg'); + + // 发送请求上传缩略图 + const response = await fetch(`${process.env.BASE_URL}/oss/imgUpload`, { + method: 'POST', + headers: { + authorization: localStorage.getItem('token') ?? '', + }, + body: formData, + }); + + const result = await response.json(); + if (result.retcode) { + setVideoThumbnail(result.data); + } + } catch (error) { + console.error('生成视频缩略图失败:', error); + } + }; + + return ( + { + let pbcPicAddress = "" + let pbcThumbNail = "" + if (value.pbcType === 1 && value.pbcImage.length > 0) { + pbcThumbNail = value.pbcImage[0].url || value.pbcImage[0].response.data; + pbcPicAddress = value.pbcImage.map((e: any) => { + return e.url || e.response.data; + }).join(','); + } else if (value.pbcType === 2 && value.pbcVideo.length > 0) { + pbcPicAddress = value.pbcVideo[0].url || value.pbcVideo[0].response.data; + pbcThumbNail = videoThumbnail; + } + return props.onSubmit({ ...value, pbcPicAddress, pbcThumbNail, pbcId: props.values.pbcId }) + }} + drawerProps={{ + destroyOnClose: true, + }} + initialValues={{ + pbcTitle: props.values.pbcTitle, + pbcType: props.values.pbcType || 1, + pbcImage: props.values.pbcType === 1 && props.values.pbcPicAddress ? props.values.pbcPicAddress.split(',').map((e, index) => { + return { + uid: '-' + index, + name: e.substring(e.lastIndexOf('/') + 1), + status: 'done', + url: e, + } + }) : [], + pbcVideo: props.values.pbcType === 2 && props.values.pbcPicAddress ? [{ + uid: '-1', + name: props.values.pbcPicAddress.substring(props.values.pbcPicAddress.lastIndexOf('/') + 1), + status: 'done', + url: props.values.pbcPicAddress, + }] : [], + pbcContent: props.values.pbcContent + }} + onOpenChange={(visible) => { + formRef.current?.resetFields(); + if (!visible) { + props.onCancel(); + } + }} + > + + { + setPbcType(e.target.value) + formRef.current?.setFieldValue('pbcImage', []); + formRef.current?.setFieldValue('pbcVideo', []); + }, + }} + /> + {pbcType === 1 ? { + switch (info.file.status) { + case 'done': + if (info.file.response.retcode === 0) { + message.error(info.file.response.retmsg); + formRef.current?.setFieldValue('pbcImage', []) + } + break; + default: + break; + } + }, + action: process.env.BASE_URL + '/oss/imgUpload', + beforeUpload(file: RcFile) { + const isLt10M = file.size / 1024 / 1024 < 10; + if (!isLt10M) { + message.error('图片大小不能超过10MB!'); + } + return isLt10M || Upload.LIST_IGNORE; + }, + onPreview: async (file) => { + if (file.uid.includes('-')) { + window.open(file.url); + } + if (file.response && file.response.retcode) { + window.open(file.response.data); + } + }, + listType: 'picture-card', + }} + rules={[ + { required: true, message: '请上传图片' }, + ]} + /> : + { + switch (info.file.status) { + case 'done': + if (info.file.response.retcode === 0) { + message.error(info.file.response.retmsg); + formRef.current?.setFieldValue('pbcVideo', []) + } else if (info.file.response && info.file.response.retcode) { + // 视频上传成功后,获取视频首帧作为缩略图 + const videoUrl = info.file.response.data; + generateVideoThumbnail(videoUrl); + } + break; + default: + break; + } + }, + action: process.env.BASE_URL + '/oss/imgUpload', + beforeUpload(file: RcFile) { + const isLt30M = file.size / 1024 / 1024 < 30; + if (!isLt30M) { + message.error('视频大小不能超过30MB!'); + } + return isLt30M || Upload.LIST_IGNORE; + }, + onPreview: async (file) => { + if (file.uid === '-1') { + window.open(file.url); + } + if (file.response && file.response.retcode) { + window.open(file.response.data); + } + }, + listType: 'picture-card', + }} + rules={[ + { required: true, message: '请上传视频' }, + ]} + />} + + + + + ); +}; + +export default UpdateForm; \ No newline at end of file diff --git a/src/pages/InnovativeService/index.tsx b/src/pages/InnovativeService/index.tsx new file mode 100644 index 0000000..c78615e --- /dev/null +++ b/src/pages/InnovativeService/index.tsx @@ -0,0 +1,226 @@ +import { PlusOutlined } from '@ant-design/icons'; +import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; +import { PageContainer } from '@ant-design/pro-layout'; +import { Button, message, Popconfirm, Switch } from 'antd'; +import React, { useRef, useState } from 'react'; +import { Access, useAccess } from 'umi'; +import UpdateForm from './components/UpdateForm'; +import { addOrUpdateInnovativeServiceUsingPost, changeInnovativeServiceStateUsingGet, getInnovativeServicePageUsingPost, removeInnovativeServiceUsingGet } from '@/services/pop-b2b2c/pbcInnovativeServiceController'; + +/** + * 查询表格 + * @param param0 + */ +const fetchData = async (params: API.PbcInnovativeService_) => { + const msg = await getInnovativeServicePageUsingPost(params); + return { + data: msg.data?.records || [], + total: msg.data?.total, + success: msg.retcode, + } as any; +}; + +const handleUpdateState = async (id: number, state: number) => { + const hide = message.loading('正在保存'); + if (!id) return false; + try { + const msg = await changeInnovativeServiceStateUsingGet({ pbcId: id, pbcState: state }); + hide(); + if (msg.retcode) { + message.success(!id ? '新增成功!' : '保存成功!'); + return true; + } + message.error(msg.retmsg); + return false; + } catch (error) { + hide(); + message.error(!id ? '新增失败,请重试!' : '保存失败,请重试!'); + return false; + } +}; + +/** + * 删除节点 + * @param id + */ +const handleRemove = async (fields: API.PbcInnovativeService_) => { + const hide = message.loading('正在删除'); + if (!fields.pbcId) return false; + + try { + const msg = await removeInnovativeServiceUsingGet({ pbcId: fields.pbcId }); + hide(); + if (msg.retcode) { + message.success('删除成功,即将刷新'); + } else { + message.error(msg.retmsg ?? '删除失败,请重试'); + } + return true; + } catch (error) { + hide(); + message.error('删除失败,请重试'); + return false; + } +}; + +const TableList: React.FC = () => { + const access: any = useAccess(); + const actionRef = useRef(); + const [updateModalVisible, handleUpdateModalVisible] = useState(false); + const [stepFormValues, setStepFormValues] = useState({}); + + const handleAdd = async (fields: API.PbcInnovativeService_) => { + const hide = message.loading('正在提交'); + try { + const msg = await addOrUpdateInnovativeServiceUsingPost(fields); + hide(); + if (msg.retcode) { + message.success(!fields.pbcId ? '添加成功' : '更新成功'); + handleUpdateModalVisible(false); + actionRef.current?.reload(); + } else { + message.error(msg.retmsg ?? '操作失败,请重试'); + } + } catch (error) { + hide(); + message.error('操作失败,请重试'); + } + }; + + const columns: ProColumns[] = [ + { + title: '标题', + dataIndex: 'pbcTitle', + }, + { + title: '类型', + dataIndex: 'pbcType', + valueEnum: { + 1: '图片', + 2: '视频', + }, + }, + { + title: '创建时间', + dataIndex: 'pbcCreateAt', + valueType: 'date', + search: false, + }, + { + title: '操作', + valueType: 'option', + width: 180, + render: (text, record) => ( + + + { + const success = await handleUpdateState(record.pbcId || 0, value ? 1 : 2); + if (success) { + if (actionRef.current) { + actionRef.current.reload(); + } + } + }} + /> + + + + + + { + const success = await handleRemove(record); + if (success) actionRef.current?.reload(); + }} + > + + + + + ), + }, + ]; + return ( + + + columns={columns} + actionRef={actionRef} + request={fetchData} + rowKey="pbcId" + size="small" + bordered + search={{ + labelWidth: 'auto', + span: 6, + optionRender: ({ searchText }, { form }) => { + return [ + , + + + , + ]; + }, + }} + pagination={{ + defaultPageSize: 20, + showSizeChanger: true, + }} + scroll={{ + y: 'calc(100vh - 320px)', + }} + dateFormatter="string" + options={false} + toolBarRender={() => []} + /> + { + handleUpdateModalVisible(false); + setStepFormValues({}); + }} + updateModalVisible={updateModalVisible} + values={stepFormValues} + /> + + ); +}; + +export default TableList; diff --git a/src/services/pop-b2b2c/errorController.ts b/src/services/pop-b2b2c/errorController.ts index 5f0967b..f29cc7f 100644 --- a/src/services/pop-b2b2c/errorController.ts +++ b/src/services/pop-b2b2c/errorController.ts @@ -2,41 +2,41 @@ /* eslint-disable */ import request from '@/utils/request'; -/** errorHtml GET /error */ -export async function errorHtmlUsingGet(options?: { [key: string]: any }) { - return request('/error', { +/** error GET /error */ +export async function errorUsingGet(options?: { [key: string]: any }) { + return request>('/error', { method: 'GET', ...(options || {}), }); } -/** errorHtml PUT /error */ -export async function errorHtmlUsingPut(options?: { [key: string]: any }) { - return request('/error', { +/** error PUT /error */ +export async function errorUsingPut(options?: { [key: string]: any }) { + return request>('/error', { method: 'PUT', ...(options || {}), }); } -/** errorHtml POST /error */ -export async function errorHtmlUsingPost(options?: { [key: string]: any }) { - return request('/error', { +/** error POST /error */ +export async function errorUsingPost(options?: { [key: string]: any }) { + return request>('/error', { method: 'POST', ...(options || {}), }); } -/** errorHtml DELETE /error */ -export async function errorHtmlUsingDelete(options?: { [key: string]: any }) { - return request('/error', { +/** error DELETE /error */ +export async function errorUsingDelete(options?: { [key: string]: any }) { + return request>('/error', { method: 'DELETE', ...(options || {}), }); } -/** errorHtml PATCH /error */ -export async function errorHtmlUsingPatch(options?: { [key: string]: any }) { - return request('/error', { +/** error PATCH /error */ +export async function errorUsingPatch(options?: { [key: string]: any }) { + return request>('/error', { method: 'PATCH', ...(options || {}), }); diff --git a/src/services/pop-b2b2c/index.ts b/src/services/pop-b2b2c/index.ts index b8f9a0e..3954694 100644 --- a/src/services/pop-b2b2c/index.ts +++ b/src/services/pop-b2b2c/index.ts @@ -15,6 +15,8 @@ import * as pbcContentTypeController from './pbcContentTypeController'; import * as pbcEmailController from './pbcEmailController'; import * as pbcFashionTrendController from './pbcFashionTrendController'; import * as pbcImageController from './pbcImageController'; +import * as pbcInnovativeServiceController from './pbcInnovativeServiceController'; +import * as pbcLocationController from './pbcLocationController'; import * as pbcLoginController from './pbcLoginController'; import * as pbcLogisticsController from './pbcLogisticsController'; import * as pbcOperateInstructionController from './pbcOperateInstructionController'; @@ -58,6 +60,7 @@ export default { pbcBannerController, pbcBusinessPostConfigController, pbcFashionTrendController, + pbcInnovativeServiceController, pbcLogisticsController, pbcOperateInstructionController, pbcOrderController, @@ -88,6 +91,7 @@ export default { pbcContentPublishController, pbcContentTypeController, pbcEmailController, + pbcLocationController, pbcProductController, pbcProductHotController, pbcQrController, diff --git a/src/services/pop-b2b2c/pbcFashionTrendController.ts b/src/services/pop-b2b2c/pbcFashionTrendController.ts index 8f87cea..8a1a08f 100644 --- a/src/services/pop-b2b2c/pbcFashionTrendController.ts +++ b/src/services/pop-b2b2c/pbcFashionTrendController.ts @@ -91,6 +91,24 @@ export async function getFashionTrendPageUsingPost( ); } +/** 前端获取流行趋势分页 分页 POST /b2b2c/pbcFashionTrend/getFashionTrendPageForFront */ +export async function getFashionTrendPageForFrontUsingPost( + body: API.PbcFashionTrend_, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcFashionTrend/getFashionTrendPageForFront', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }, + ); +} + /** 后台根据id删除单个趋势详情 GET /b2b2c/pbcFashionTrend/removeFashionTrend */ export async function removeFashionTrendUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) diff --git a/src/services/pop-b2b2c/pbcInnovativeServiceController.ts b/src/services/pop-b2b2c/pbcInnovativeServiceController.ts new file mode 100644 index 0000000..6655adc --- /dev/null +++ b/src/services/pop-b2b2c/pbcInnovativeServiceController.ts @@ -0,0 +1,137 @@ +// @ts-ignore +/* eslint-disable */ +import request from '@/utils/request'; + +/** 后台新增或者修改创新服务 POST /b2b2c/pbcInnovativeService/addOrUpdateInnovativeService */ +export async function addOrUpdateInnovativeServiceUsingPost( + body: API.PbcInnovativeService_, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/addOrUpdateInnovativeService', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }, + ); +} + +/** 后台根据id获取创新服务详情 后台 GET /b2b2c/pbcInnovativeService/admin/InnovativeServiceDetail */ +export async function innovativeServiceDetailForAdminUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.innovativeServiceDetailForAdminUsingGETParams, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/admin/InnovativeServiceDetail', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }, + ); +} + +/** 更改服务状态,就是那个按钮 GET /b2b2c/pbcInnovativeService/changeInnovativeServiceState */ +export async function changeInnovativeServiceStateUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.changeInnovativeServiceStateUsingGETParams, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/changeInnovativeServiceState', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }, + ); +} + +/** 前端使用获取可用的创新服务列表 列表 GET /b2b2c/pbcInnovativeService/getInnovativeServiceList */ +export async function getInnovativeServiceListUsingGet(options?: { [key: string]: any }) { + return request( + '/b2b2c/pbcInnovativeService/getInnovativeServiceList', + { + method: 'GET', + ...(options || {}), + }, + ); +} + +/** 后台获取创新服务分页 分页 POST /b2b2c/pbcInnovativeService/getInnovativeServicePage */ +export async function getInnovativeServicePageUsingPost( + body: API.PbcInnovativeService_, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/getInnovativeServicePage', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }, + ); +} + +/** 前端获取创新服务分页 分页 POST /b2b2c/pbcInnovativeService/getInnovativeServicePageForFront */ +export async function getInnovativeServicePageForFrontUsingPost( + body: API.PbcInnovativeService_, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/getInnovativeServicePageForFront', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }, + ); +} + +/** 前端根据id获取创新服务详情 前端 GET /b2b2c/pbcInnovativeService/InnovativeServiceDetail */ +export async function innovativeServiceDetailUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.innovativeServiceDetailUsingGETParams, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcInnovativeService/InnovativeServiceDetail', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }, + ); +} + +/** 后台根据id删除单个服务详情 GET /b2b2c/pbcInnovativeService/removeInnovativeService */ +export async function removeInnovativeServiceUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.removeInnovativeServiceUsingGETParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcInnovativeService/removeInnovativeService', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} diff --git a/src/services/pop-b2b2c/pbcLocationController.ts b/src/services/pop-b2b2c/pbcLocationController.ts new file mode 100644 index 0000000..9363b85 --- /dev/null +++ b/src/services/pop-b2b2c/pbcLocationController.ts @@ -0,0 +1,78 @@ +// @ts-ignore +/* eslint-disable */ +import request from '@/utils/request'; + +/** geo GET /b2b2c/pbclocation/geo */ +export async function geoUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.geoUsingGETParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbclocation/geo', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + +/** geo PUT /b2b2c/pbclocation/geo */ +export async function geoUsingPut( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.geoUsingPUTParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbclocation/geo', { + method: 'PUT', + params: { + ...params, + }, + ...(options || {}), + }); +} + +/** geo POST /b2b2c/pbclocation/geo */ +export async function geoUsingPost( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.geoUsingPOSTParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbclocation/geo', { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + }); +} + +/** geo DELETE /b2b2c/pbclocation/geo */ +export async function geoUsingDelete( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.geoUsingDELETEParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbclocation/geo', { + method: 'DELETE', + params: { + ...params, + }, + ...(options || {}), + }); +} + +/** geo PATCH /b2b2c/pbclocation/geo */ +export async function geoUsingPatch( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.geoUsingPATCHParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbclocation/geo', { + method: 'PATCH', + params: { + ...params, + }, + ...(options || {}), + }); +} diff --git a/src/services/pop-b2b2c/pbcOrderController.ts b/src/services/pop-b2b2c/pbcOrderController.ts index d84a20f..f9f1dcd 100644 --- a/src/services/pop-b2b2c/pbcOrderController.ts +++ b/src/services/pop-b2b2c/pbcOrderController.ts @@ -2,6 +2,20 @@ /* eslint-disable */ import request from '@/utils/request'; +/** 卖家发货订单,如果类型是到店自取,则就是状态变成已发货;如果类型是邮寄,还需要生成快递 卖家 POST /b2b2c/pbcOrder/admin/deliverGoodForAdmin/${param0} */ +export async function deliverGoodForAdminUsingPost( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.deliverGoodForAdminUsingPOSTParams, + options?: { [key: string]: any }, +) { + const { orderId: param0, ...queryParams } = params; + return request(`/b2b2c/pbcOrder/admin/deliverGoodForAdmin/${param0}`, { + method: 'POST', + params: { ...queryParams }, + ...(options || {}), + }); +} + /** 买家取消订单。这里暂时限定只有待出样状态的订单才能够取消掉 GET /b2b2c/pbcOrder/cancelOrderForBuyer/${param0} */ export async function cancelOrderForBuyerUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) @@ -44,6 +58,20 @@ export async function confirmReceiveForBuyerUsingGet( }); } +/** 卖家发货订单,如果类型是到店自取,则就是状态变成已发货;如果类型是邮寄,还需要生成快递 卖家 POST /b2b2c/pbcOrder/deliverGoodForBusiness/${param0} */ +export async function deliverGoodForBusinessUsingPost( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.deliverGoodForBusinessUsingPOSTParams, + options?: { [key: string]: any }, +) { + const { orderId: param0, ...queryParams } = params; + return request(`/b2b2c/pbcOrder/deliverGoodForBusiness/${param0}`, { + method: 'POST', + params: { ...queryParams }, + ...(options || {}), + }); +} + /** 后台导出多订单 POST /b2b2c/pbcOrder/exportOperationalDashboard */ export async function exportOrderPageForAdminUsingPost( body: API.PbcOrder_, @@ -89,6 +117,21 @@ export async function getOrderPageForBusinessUsingPost( }); } +/** 卖家获取会员的订单分页 分页 POST /b2b2c/pbcOrder/getOrderPageForBusinessCheck */ +export async function getOrderPageForBusinessCheckUsingPost( + body: API.PbcOrder_, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcOrder/getOrderPageForBusinessCheck', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 买家获取订单分页 分页 POST /b2b2c/pbcOrder/getOrderPageForBuyer */ export async function getOrderPageForBuyerUsingPost( body: API.PbcOrder_, diff --git a/src/services/pop-b2b2c/pbcRequirementController.ts b/src/services/pop-b2b2c/pbcRequirementController.ts index c08733e..d77dc5f 100644 --- a/src/services/pop-b2b2c/pbcRequirementController.ts +++ b/src/services/pop-b2b2c/pbcRequirementController.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import request from '@/utils/request'; -/** 买家新增或者修改需求 POST /b2b2c/pbcRequirement/addOrUpdateRequirement */ +/** 买家新增或者修改需求,修改需求是为了审核失败的用户使用的,审核通过就不要编辑了,另外编辑不要重新选小哥 POST /b2b2c/pbcRequirement/addOrUpdateRequirement */ export async function addOrUpdateRequirementUsingPost( body: API.PbcRequirement_, options?: { [key: string]: any }, @@ -17,7 +17,7 @@ export async function addOrUpdateRequirementUsingPost( }); } -/** 后台审核需求 后台 GET /b2b2c/pbcRequirement/admin/approvalRequirement/${param0} */ +/** 后台审核需求,这里传入需求表id 后台 GET /b2b2c/pbcRequirement/admin/approvalRequirement/${param0} */ export async function approvalRequirementForAdminUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.approvalRequirementForAdminUsingGETParams, @@ -69,23 +69,33 @@ export async function requirementDetailForAdminUsingGet( }); } -/** 卖家更改审核需求状态 买家 GET /b2b2c/pbcRequirement/buyer/changeRequirementState/${param0} */ -export async function changeRequirementStateForBuyerUsingGet( +/** 买家采纳某条回复 买家 POST /b2b2c/pbcRequirement/adoptReplyForBuyer */ +export async function adoptReplyForBuyerUsingPost( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) - params: API.changeRequirementStateForBuyerUsingGETParams, + params: API.adoptReplyForBuyerUsingPOSTParams, options?: { [key: string]: any }, ) { - const { id: param0, ...queryParams } = params; - return request( - `/b2b2c/pbcRequirement/buyer/changeRequirementState/${param0}`, - { - method: 'GET', - params: { - ...queryParams, - }, - ...(options || {}), + return request('/b2b2c/pbcRequirement/adoptReplyForBuyer', { + method: 'POST', + params: { + ...params, }, - ); + ...(options || {}), + }); +} + +/** 买家取消审核需求 买家 GET /b2b2c/pbcRequirement/buyer/closeRequirement/${param0} */ +export async function closeRequirementForBuyerUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.closeRequirementForBuyerUsingGETParams, + options?: { [key: string]: any }, +) { + const { id: param0, ...queryParams } = params; + return request(`/b2b2c/pbcRequirement/buyer/closeRequirement/${param0}`, { + method: 'GET', + params: { ...queryParams }, + ...(options || {}), + }); } /** 买家获取我的需求分页 分页 POST /b2b2c/pbcRequirement/buyer/getRequirementPage */ @@ -121,7 +131,36 @@ export async function requirementDetailForFrontUsingGet( }); } -/** 卖家获取需求大厅分页 分页 POST /b2b2c/pbcRequirement/seller/getRequirementPage */ +/** 当前登陆人,获取自己的跟进中、已完成、已取消的需求各自的数量 需求 GET /b2b2c/pbcRequirement/getRequirementCountForFront */ +export async function getRequirementCountForFrontUsingGet(options?: { [key: string]: any }) { + return request( + '/b2b2c/pbcRequirement/getRequirementCountForFront', + { + method: 'GET', + ...(options || {}), + }, + ); +} + +/** 当前登陆人,根据必传的pbcBusinessState:0:跟进中、1:已完成、2:已取消的获取通过审核的需求分页 需求 POST /b2b2c/pbcRequirement/getRequirementPageByBusinessState */ +export async function getRequirementPageByBusinessStateUsingPost( + body: API.PbcRequirement_, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcRequirement/getRequirementPageByBusinessState', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }, + ); +} + +/** 卖家或者采购员获取需求大厅分页,需求大厅只能查看不是给小哥的,并且状态是已经审核通过的需求 分页 POST /b2b2c/pbcRequirement/seller/getRequirementPage */ export async function getRequirementPageForSellerUsingPost( body: API.PbcRequirement_, options?: { [key: string]: any }, diff --git a/src/services/pop-b2b2c/typings.d.ts b/src/services/pop-b2b2c/typings.d.ts index bb314e9..cf67176 100644 --- a/src/services/pop-b2b2c/typings.d.ts +++ b/src/services/pop-b2b2c/typings.d.ts @@ -14,6 +14,283 @@ declare namespace API { pbcId: number; }; + type adoptReplyForBuyerUsingPOSTParams = { + /** 需求id */ + pbcRequirementId?: number; + /** 商户对公账户 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessAccount'?: string; + /** 商户账户名称 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessAccountName'?: string; + /** 商户地址 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessAddress'?: string; + /** 商户区域 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessArea'?: string; + /** 商户对公账户银行 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessBank'?: string; + /** 商户城市 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessCity'?: string; + /** 商户编号, 审核通过后生成 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessCode'?: string; + /** 商户联系人 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessContact'?: string; + /** 商户手机号 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessContactMobile'?: string; + /** 商户联系人身份证 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessContactUserNo'?: string; + /** 商户门牌号, 新增字段 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessDoorLabel'?: string; + /** 商户邮箱 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessEmail'?: string; + /** 商户负责人 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessHead'?: string; + /** 商户负责人身份证号码 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessHeadUserNo'?: string; + /** 商户负责人身份证人像面图片 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessHeadUserNoBackUrl'?: string; + /** 商户负责人身份证国徽面图片 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessHeadUserNoFrontUrl'?: string; + /** 商户负责人身份证类型,0是身份证,1是港澳来往内地通行证,2是台湾内地通行证 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessHeadUserNoType'?: number; + /** 商户图片 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessImage'?: string; + /** 商户简介 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessIntroduction'?: string; + /** 商户地址纬度 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessLatitudee'?: string; + /** 商户等级 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessLevel'?: string; + /** 商户营业执照url */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessLicenseUrl'?: string; + /** 商户logo */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessLogo'?: string; + /** 商户地址经度 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessLongitude'?: string; + /** 商户主营范围 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessMainCategory'?: string; + /** 商户名称 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessName'?: string; + /** 商户海报地址 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessPosterUrl'?: string; + /** 商户省份 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessProvince'?: string; + /** 开业时间 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessStartDate'?: string; + /** 商户认证状态,0是未认证,1是已认证 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessState'?: number; + /** 商户类型 */ + 'pbcRequirementReply.pbcBusiness.pbcBusinessType'?: string; + /** 创建时间 */ + 'pbcRequirementReply.pbcBusiness.pbcCreateAt'?: string; + /** 创建人 */ + 'pbcRequirementReply.pbcBusiness.pbcCreateBy'?: number; + /** 创建人 */ + 'pbcRequirementReply.pbcBusiness.pbcCreateByUserName'?: string; + /** 主键 */ + 'pbcRequirementReply.pbcBusiness.pbcId'?: number; + /** 商戶首頁模板 */ + 'pbcRequirementReply.pbcBusiness.pbcIndexPageTemplateKey'?: string; + /** 状态,0是删除,1是正常,2是作废 */ + 'pbcRequirementReply.pbcBusiness.pbcState'?: number; + /** 社会统一信用代码 */ + 'pbcRequirementReply.pbcBusiness.pbcUnifiedSocialCreditCode'?: string; + /** 更新时间 */ + 'pbcRequirementReply.pbcBusiness.pbcUpdateAt'?: string; + /** 更新人 */ + 'pbcRequirementReply.pbcBusiness.pbcUpdateBy'?: number; + /** 更新人 */ + 'pbcRequirementReply.pbcBusiness.pbcUpdateByUserName'?: string; + /** 回复的用户所属商户id,前端不需要传 */ + 'pbcRequirementReply.pbcBusinessId'?: number; + /** 创建时间 */ + 'pbcRequirementReply.pbcCreateAt'?: string; + /** 创建人 */ + 'pbcRequirementReply.pbcCreateBy'?: number; + /** 创建人 */ + 'pbcRequirementReply.pbcCreateByUserName'?: string; + /** 主键 */ + 'pbcRequirementReply.pbcId'?: number; + /** 回复内容 */ + 'pbcRequirementReply.pbcReplyContent'?: string; + /** 需求回复的id */ + 'pbcRequirementReply.pbcReplyId'?: number; + /** 0回复的主题,1回复某条回复 */ + 'pbcRequirementReply.pbcReplyType'?: number; + /** 回复用户id */ + 'pbcRequirementReply.pbcReplyUserId'?: number; + /** 需求id */ + 'pbcRequirementReply.pbcRequirementId'?: number; + /** 状态,0是删除,1是正常,2是作废 */ + 'pbcRequirementReply.pbcState'?: number; + /** 更新时间 */ + 'pbcRequirementReply.pbcUpdateAt'?: string; + /** 更新人 */ + 'pbcRequirementReply.pbcUpdateBy'?: number; + /** 更新人 */ + 'pbcRequirementReply.pbcUpdateByUserName'?: string; + /** 商户id */ + 'pbcRequirementReply.pbcUsers.pbcBusinessId'?: number; + /** 商户对公账户 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessAccount'?: string; + /** 商户账户名称 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessAccountName'?: string; + /** 商户地址 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessAddress'?: string; + /** 商户区域 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessArea'?: string; + /** 商户对公账户银行 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessBank'?: string; + /** 商户城市 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessCity'?: string; + /** 商户编号, 审核通过后生成 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessCode'?: string; + /** 商户联系人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessContact'?: string; + /** 商户手机号 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessContactMobile'?: string; + /** 商户联系人身份证 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessContactUserNo'?: string; + /** 商户门牌号, 新增字段 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessDoorLabel'?: string; + /** 商户邮箱 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessEmail'?: string; + /** 商户负责人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessHead'?: string; + /** 商户负责人身份证号码 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessHeadUserNo'?: string; + /** 商户负责人身份证人像面图片 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessHeadUserNoBackUrl'?: string; + /** 商户负责人身份证国徽面图片 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessHeadUserNoFrontUrl'?: string; + /** 商户负责人身份证类型,0是身份证,1是港澳来往内地通行证,2是台湾内地通行证 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessHeadUserNoType'?: number; + /** 商户图片 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessImage'?: string; + /** 商户简介 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessIntroduction'?: string; + /** 商户地址纬度 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessLatitudee'?: string; + /** 商户等级 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessLevel'?: string; + /** 商户营业执照url */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessLicenseUrl'?: string; + /** 商户logo */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessLogo'?: string; + /** 商户地址经度 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessLongitude'?: string; + /** 商户主营范围 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessMainCategory'?: string; + /** 商户名称 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessName'?: string; + /** 商户海报地址 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessPosterUrl'?: string; + /** 商户省份 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessProvince'?: string; + /** 开业时间 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessStartDate'?: string; + /** 商户认证状态,0是未认证,1是已认证 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessState'?: number; + /** 商户类型 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcBusinessType'?: string; + /** 创建时间 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcCreateAt'?: string; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcCreateBy'?: number; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcCreateByUserName'?: string; + /** 主键 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcId'?: number; + /** 商戶首頁模板 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcIndexPageTemplateKey'?: string; + /** 状态,0是删除,1是正常,2是作废 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcState'?: number; + /** 社会统一信用代码 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcUnifiedSocialCreditCode'?: string; + /** 更新时间 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcUpdateAt'?: string; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcUpdateBy'?: number; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessInfo.pbcUpdateByUserName'?: string; + /** 商户logo */ + 'pbcRequirementReply.pbcUsers.pbcBusinessLogo'?: string; + /** 商户认证状态,false是未认证,true是已认证 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessState'?: boolean; + /** 商户id */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcBusinessId'?: number; + /** 当前用户的海报模板 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcBusinessPostConfigId'?: number; + /** 角色类型 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcBusinessRole'?: string; + /** 商家海报地址, 此处为海报链接 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcBusinessUserPostUrl'?: string; + /** 商家用户二维码:团队成员展示的二维码均不相同,此处为二维码链接 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcBusinessUserQrCode'?: string; + /** 创建时间 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcCreateAt'?: string; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcCreateBy'?: number; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcCreateByUserName'?: string; + /** 主键 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcId'?: number; + /** 状态,0是删除,1是正常,2是作废 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcState'?: number; + /** 更新时间 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcUpdateAt'?: string; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcUpdateBy'?: number; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcUpdateByUserName'?: string; + /** 用户id */ + 'pbcRequirementReply.pbcUsers.pbcBusinessTeam.pbcUserId'?: number; + /** 创建时间 */ + 'pbcRequirementReply.pbcUsers.pbcCreateAt'?: string; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcCreateBy'?: number; + /** 创建人 */ + 'pbcRequirementReply.pbcUsers.pbcCreateByUserName'?: string; + /** 主键 */ + 'pbcRequirementReply.pbcUsers.pbcId'?: number; + /** 用户小程序的open id */ + 'pbcRequirementReply.pbcUsers.pbcOpenId'?: string; + /** 状态,0是删除,1是正常,2是作废 */ + 'pbcRequirementReply.pbcUsers.pbcState'?: number; + /** 用户微信的union id */ + 'pbcRequirementReply.pbcUsers.pbcUnionId'?: string; + /** 更新时间 */ + 'pbcRequirementReply.pbcUsers.pbcUpdateAt'?: string; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcUpdateBy'?: number; + /** 更新人 */ + 'pbcRequirementReply.pbcUsers.pbcUpdateByUserName'?: string; + /** 用户邮箱 */ + 'pbcRequirementReply.pbcUsers.pbcUserEmail'?: string; + /** 用户头像 */ + 'pbcRequirementReply.pbcUsers.pbcUserImage'?: string; + /** 用户手机号 */ + 'pbcRequirementReply.pbcUsers.pbcUserMobile'?: string; + /** 用户姓名 */ + 'pbcRequirementReply.pbcUsers.pbcUserName'?: string; + /** 用户昵称 */ + 'pbcRequirementReply.pbcUsers.pbcUserNickName'?: string; + /** 用户密码 */ + 'pbcRequirementReply.pbcUsers.pbcUserPassword'?: string; + /** 角色id */ + 'pbcRequirementReply.pbcUsers.pbcUserRole'?: number; + /** 角色名称 */ + 'pbcRequirementReply.pbcUsers.pbcUserRoleName'?: string; + /** 性别,0表示男性,1表示女性 */ + 'pbcRequirementReply.pbcUsers.pbcUserSex'?: number; + /** 用户来源渠道 */ + 'pbcRequirementReply.pbcUsers.pbcUserSourceType'?: string; + /** 用户来源绑定的分享源 */ + 'pbcRequirementReply.pbcUsers.pbcUserSourceUserId'?: number; + /** 用户分享源的昵称 */ + 'pbcRequirementReply.pbcUsers.pbcUserSourceUserNickName'?: string; + /** 0表示商户,1表示会员, 2管理员 */ + 'pbcRequirementReply.pbcUsers.pbcUserType'?: number; + }; + type agreeMemberApplicationUsingGETParams = { /** businessUserId */ businessUserId: number; @@ -111,6 +388,12 @@ declare namespace API { retmsg?: string; }; + type AjaxResultIPagePbcInnovativeService_ = { + data?: IPagePbcInnovativeService_; + retcode?: number; + retmsg?: string; + }; + type AjaxResultIPagePbcOperationalBusinessDataVO_ = { data?: IPagePbcOperationalBusinessDataVO_; retcode?: number; @@ -279,12 +562,24 @@ declare namespace API { retmsg?: string; }; + type AjaxResultListPbcInnovativeService_ = { + data?: PbcInnovativeService_[]; + retcode?: number; + retmsg?: string; + }; + type AjaxResultListPbcOperateInstruction_ = { data?: PbcOperateInstruction_[]; retcode?: number; retmsg?: string; }; + type AjaxResultListPbcOrder_ = { + data?: PbcOrder_[]; + retcode?: number; + retmsg?: string; + }; + type AjaxResultListPbcOrderAddress_ = { data?: PbcOrderAddress_[]; retcode?: number; @@ -453,6 +748,12 @@ declare namespace API { retmsg?: string; }; + type AjaxResultPbcInnovativeService_ = { + data?: PbcInnovativeService_; + retcode?: number; + retmsg?: string; + }; + type AjaxResultPbcOperateInstruction_ = { data?: PbcOperateInstruction_; retcode?: number; @@ -507,6 +808,12 @@ declare namespace API { retmsg?: string; }; + type AjaxResultPbcRequirementAdoptVO_ = { + data?: PbcRequirementAdoptVO; + retcode?: number; + retmsg?: string; + }; + type AjaxResultPbcScreenAdvertisement_ = { data?: PbcScreenAdvertisement; retcode?: number; @@ -656,6 +963,13 @@ declare namespace API { templateKey: string; }; + type changeInnovativeServiceStateUsingGETParams = { + /** pbcId */ + pbcId: number; + /** pbcState */ + pbcState: number; + }; + type changeProductStateForAdminUsingGETParams = { /** pcbId */ pcbId: number; @@ -670,13 +984,6 @@ declare namespace API { state: number; }; - type changeRequirementStateForBuyerUsingGETParams = { - /** id */ - id: number; - /** pbcBusinessState */ - pbcBusinessState: number; - }; - type changeUnreadStateUsingGETParams = { /** businessId */ businessId: number; @@ -731,6 +1038,11 @@ declare namespace API { pbcId: number; }; + type closeRequirementForBuyerUsingGETParams = { + /** id */ + id: number; + }; + type configTypeDetailUsingGETParams = { /** pbcId */ pbcId: number; @@ -746,6 +1058,13 @@ declare namespace API { orderId: number; }; + type createQrCodeUsingGETParams = { + /** 类型 */ + codeType: string; + /** 参数值 */ + parameterValue: string; + }; + type deleteAliyunVideoUsingDELETEParams = { /** id */ id: string; @@ -776,6 +1095,16 @@ declare namespace API { id: number; }; + type deliverGoodForAdminUsingPOSTParams = { + /** orderId */ + orderId: number; + }; + + type deliverGoodForBusinessUsingPOSTParams = { + /** orderId */ + orderId: number; + }; + type fashionTrendDetailForAdminUsingGETParams = { /** pbcId */ pbcId: number; @@ -795,6 +1124,31 @@ declare namespace API { values?: string[]; }; + type geoUsingDELETEParams = { + /** address */ + address: string; + }; + + type geoUsingGETParams = { + /** address */ + address: string; + }; + + type geoUsingPATCHParams = { + /** address */ + address: string; + }; + + type geoUsingPOSTParams = { + /** address */ + address: string; + }; + + type geoUsingPUTParams = { + /** address */ + address: string; + }; + type getBannerListUsingGETParams = { /** pbcBannerType */ pbcBannerType: number; @@ -975,6 +1329,16 @@ declare namespace API { verificationCode: string; }; + type innovativeServiceDetailForAdminUsingGETParams = { + /** pbcId */ + pbcId: number; + }; + + type innovativeServiceDetailUsingGETParams = { + /** pbcId */ + pbcId: number; + }; + type IPagePbcBanner_ = { current?: number; pages?: number; @@ -1039,6 +1403,14 @@ declare namespace API { total?: number; }; + type IPagePbcInnovativeService_ = { + current?: number; + pages?: number; + records?: PbcInnovativeService_[]; + size?: number; + total?: number; + }; + type IPagePbcOperationalBusinessDataVO_ = { current?: number; pages?: number; @@ -2207,6 +2579,41 @@ declare namespace API { pbcImageUrl?: string; }; + type PbcInnovativeService_ = { + /** 当前页 */ + current?: number; + /** 条数 */ + pageSize?: number; + /** 简介 */ + pbcContent?: string; + /** 创建时间 */ + pbcCreateAt?: string; + /** 创建人 */ + pbcCreateBy?: number; + /** 创建人 */ + pbcCreateByUserName?: string; + /** 主键 */ + pbcId?: number; + /** 图片或者视频的地址 */ + pbcPicAddress?: string; + /** 查看次数 */ + pbcScanCnt?: number; + /** 状态,0是删除,1是正常,2是作废 */ + pbcState?: number; + /** 缩略图 */ + pbcThumbNail?: string; + /** 标题 */ + pbcTitle?: string; + /** 类型,1是图片,2是视频 */ + pbcType?: number; + /** 更新时间 */ + pbcUpdateAt?: string; + /** 更新人 */ + pbcUpdateBy?: number; + /** 更新人 */ + pbcUpdateByUserName?: string; + }; + type PbcInteractStaticalVO = { pbcColectNumber?: number; /** 新增商品浏览次数 */ @@ -2383,7 +2790,7 @@ declare namespace API { pbcOrderExpressCompanyCode?: string; /** 快递公司 */ pbcOrderExpressCompanyName?: string; - /** 快递单号 */ + /** 快递订单id */ pbcOrderExpressNo?: string; /** 订单编号,不用传,后台生成 */ pbcOrderNo?: string; @@ -3130,6 +3537,8 @@ declare namespace API { }; type PbcRequirement_ = { + /** 商户id,不要使用这个参数 */ + businessId?: number; /** 当前页 */ current?: number; /** 是否是指定小哥,0不是,1是 */ @@ -3144,7 +3553,7 @@ declare namespace API { pbcApprovalStatus?: number; /** 需求预算,可以填入文字描述 */ pbcBudget?: string; - /** 需求状态,0表示进行中,1表示已解决,2表示已关闭 */ + /** 需求状态,0表示进行中,1表示已采纳,2表示已取消 */ pbcBusinessState?: number; /** 创建时间 */ pbcCreateAt?: string; @@ -3173,12 +3582,23 @@ declare namespace API { /** 更新人 */ pbcUpdateByUserName?: string; pbcUsers?: PbcUsers; - /** 后端使用,创建结束时间 */ + /** 后台使用,创建结束时间 */ publishEndTime?: string; - /** 后端使用,创建开始时间 */ + /** 后台使用,创建开始时间 */ publishStartTime?: string; /** 不用传,返回的时候这个参数存放留言信息 */ replyList?: PbcRequirementReply_[]; + /** 用户id,不要使用这个参数 */ + userId?: number; + }; + + type PbcRequirementAdoptVO = { + /** 已完取消数量 */ + cancelRequirementCount?: number; + /** 已完成数量 */ + completeRequirementCount?: number; + /** 跟进中的数量 */ + followUpRequirementCount?: number; }; type PbcRequirementReply_ = { @@ -3834,6 +4254,7 @@ declare namespace API { createDate?: string; productId?: number; productImages?: string; + productTitle?: string; }; type PbcUserProductScanRecordVO = { @@ -4096,6 +4517,11 @@ declare namespace API { id: number; }; + type removeInnovativeServiceUsingGETParams = { + /** pbcId */ + pbcId: number; + }; + type removeInstructionDetailUsingGETParams = { /** pbcId */ pbcId: number; diff --git a/src/services/pop-b2b2c/wxController.ts b/src/services/pop-b2b2c/wxController.ts index b126063..55c6b10 100644 --- a/src/services/pop-b2b2c/wxController.ts +++ b/src/services/pop-b2b2c/wxController.ts @@ -2,6 +2,21 @@ /* eslint-disable */ import request from '@/utils/request'; +/** 生成二维码 GET /b2b2c/wx/createQrCode */ +export async function createQrCodeUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.createQrCodeUsingGETParams, + options?: { [key: string]: any }, +) { + return request('/b2b2c/wx/createQrCode', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + /** 获取微信小程序的token GET /b2b2c/wx/fetchMiniAppAccessToken */ export async function getWxSignUsingGet(options?: { [key: string]: any }) { return request('/b2b2c/wx/fetchMiniAppAccessToken', {