创新服务
parent
3ae53739a0
commit
dc9da7f205
@ -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<API.PbcInnovativeService_>;
|
||||
|
||||
export type UpdateFormProps = {
|
||||
onCancel: (flag?: boolean, formVals?: FormValueType) => void;
|
||||
onSubmit: (values: FormValueType) => Promise<void>;
|
||||
updateModalVisible: boolean;
|
||||
values: Partial<API.PbcInnovativeService_>;
|
||||
};
|
||||
|
||||
const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
||||
const formRef = useRef<ProFormInstance>();
|
||||
const [pbcType, setPbcType] = useState<number>(1);
|
||||
const [videoThumbnail, setVideoThumbnail] = useState<string>("");
|
||||
|
||||
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<Blob>((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 (
|
||||
<DrawerForm
|
||||
width={640}
|
||||
title={props.values.pbcId ? '编辑创新服务' : '新增创新服务'}
|
||||
open={props.updateModalVisible}
|
||||
formRef={formRef}
|
||||
onFinish={async (value: any) => {
|
||||
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();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<ProFormText
|
||||
placeholder={'请输入标题'}
|
||||
label="标题"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '标题为必填项',
|
||||
},
|
||||
]}
|
||||
width="md"
|
||||
name="pbcTitle"
|
||||
/>
|
||||
<ProFormRadio.Group
|
||||
name="pbcType"
|
||||
label="类型"
|
||||
options={[
|
||||
{
|
||||
label: '图片',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '视频',
|
||||
value: 2,
|
||||
},
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择类型',
|
||||
},
|
||||
]}
|
||||
fieldProps={{
|
||||
onChange: (e) => {
|
||||
setPbcType(e.target.value)
|
||||
formRef.current?.setFieldValue('pbcImage', []);
|
||||
formRef.current?.setFieldValue('pbcVideo', []);
|
||||
},
|
||||
}}
|
||||
/>
|
||||
{pbcType === 1 ? <ProFormUploadButton
|
||||
label="上传图片"
|
||||
name="pbcImage"
|
||||
max={9}
|
||||
fieldProps={{
|
||||
name: 'file',
|
||||
accept: 'image/*',
|
||||
multiple: true,
|
||||
headers: {
|
||||
authorization: localStorage.getItem('token') ?? '',
|
||||
},
|
||||
onChange: (info: any) => {
|
||||
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: '请上传图片' },
|
||||
]}
|
||||
/> :
|
||||
<ProFormUploadButton
|
||||
label="上传视频"
|
||||
name="pbcVideo"
|
||||
max={1}
|
||||
fieldProps={{
|
||||
name: 'file',
|
||||
accept: 'video/mp4',
|
||||
multiple: true,
|
||||
headers: {
|
||||
authorization: localStorage.getItem('token') ?? '',
|
||||
},
|
||||
onChange: (info: any) => {
|
||||
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: '请上传视频' },
|
||||
]}
|
||||
/>}
|
||||
<ProForm.Item
|
||||
name="pbcContent"
|
||||
label="创新服务内容"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '创新服务内容为必填项',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Editor />
|
||||
</ProForm.Item>
|
||||
</DrawerForm>
|
||||
);
|
||||
};
|
||||
|
||||
export default UpdateForm;
|
||||
@ -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<any> = () => {
|
||||
const access: any = useAccess();
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false);
|
||||
const [stepFormValues, setStepFormValues] = useState<API.PbcInnovativeService_>({});
|
||||
|
||||
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<API.PbcInnovativeService_>[] = [
|
||||
{
|
||||
title: '标题',
|
||||
dataIndex: 'pbcTitle',
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'pbcType',
|
||||
valueEnum: {
|
||||
1: '图片',
|
||||
2: '视频',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'pbcCreateAt',
|
||||
valueType: 'date',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: 180,
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
<Access key="switch" accessible={access.innovativeServiceUpdateState}>
|
||||
<Switch
|
||||
checked={record.pbcState === 1}
|
||||
onChange={async (value) => {
|
||||
const success = await handleUpdateState(record.pbcId || 0, value ? 1 : 2);
|
||||
if (success) {
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Access>
|
||||
<Access key="config" accessible={access.innovativeServiceSave}>
|
||||
<Button
|
||||
size="small"
|
||||
type="link"
|
||||
onClick={() => {
|
||||
handleUpdateModalVisible(true);
|
||||
setStepFormValues(record);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
</Access>
|
||||
<Access key="remove" accessible={access.innovativeServiceRemove}>
|
||||
<Popconfirm
|
||||
title={`确定需要删除该创新服务?`}
|
||||
onConfirm={async () => {
|
||||
const success = await handleRemove(record);
|
||||
if (success) actionRef.current?.reload();
|
||||
}}
|
||||
>
|
||||
<Button size="small" type="link" danger>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Access>
|
||||
</span>
|
||||
),
|
||||
},
|
||||
];
|
||||
return (
|
||||
<PageContainer
|
||||
header={{
|
||||
title: '',
|
||||
breadcrumb: {},
|
||||
}}
|
||||
>
|
||||
<ProTable<API.PbcInnovativeService_>
|
||||
columns={columns}
|
||||
actionRef={actionRef}
|
||||
request={fetchData}
|
||||
rowKey="pbcId"
|
||||
size="small"
|
||||
bordered
|
||||
search={{
|
||||
labelWidth: 'auto',
|
||||
span: 6,
|
||||
optionRender: ({ searchText }, { form }) => {
|
||||
return [
|
||||
<Button
|
||||
key="button"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form?.submit();
|
||||
}}
|
||||
>
|
||||
{searchText}
|
||||
</Button>,
|
||||
<Access key="primary" accessible={access.innovativeServiceSave}>
|
||||
<Button
|
||||
icon={<PlusOutlined />}
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
handleUpdateModalVisible(true);
|
||||
setStepFormValues({
|
||||
pbcId: undefined,
|
||||
});
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
</Access>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
pagination={{
|
||||
defaultPageSize: 20,
|
||||
showSizeChanger: true,
|
||||
}}
|
||||
scroll={{
|
||||
y: 'calc(100vh - 320px)',
|
||||
}}
|
||||
dateFormatter="string"
|
||||
options={false}
|
||||
toolBarRender={() => []}
|
||||
/>
|
||||
<UpdateForm
|
||||
onSubmit={handleAdd}
|
||||
onCancel={() => {
|
||||
handleUpdateModalVisible(false);
|
||||
setStepFormValues({});
|
||||
}}
|
||||
updateModalVisible={updateModalVisible}
|
||||
values={stepFormValues}
|
||||
/>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default TableList;
|
||||
@ -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<API.AjaxResultString_>(
|
||||
'/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<API.AjaxResultPbcInnovativeService_>(
|
||||
'/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<API.AjaxResultString_>(
|
||||
'/b2b2c/pbcInnovativeService/changeInnovativeServiceState',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 前端使用获取可用的创新服务列表 列表 GET /b2b2c/pbcInnovativeService/getInnovativeServiceList */
|
||||
export async function getInnovativeServiceListUsingGet(options?: { [key: string]: any }) {
|
||||
return request<API.AjaxResultListPbcInnovativeService_>(
|
||||
'/b2b2c/pbcInnovativeService/getInnovativeServiceList',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 后台获取创新服务分页 分页 POST /b2b2c/pbcInnovativeService/getInnovativeServicePage */
|
||||
export async function getInnovativeServicePageUsingPost(
|
||||
body: API.PbcInnovativeService_,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.AjaxResultIPagePbcInnovativeService_>(
|
||||
'/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<API.AjaxResultIPagePbcInnovativeService_>(
|
||||
'/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<API.AjaxResultPbcInnovativeService_>(
|
||||
'/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<API.AjaxResultString_>('/b2b2c/pbcInnovativeService/removeInnovativeService', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
@ -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<API.AjaxResultString_>('/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<API.AjaxResultString_>('/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<API.AjaxResultString_>('/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<API.AjaxResultString_>('/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<API.AjaxResultString_>('/b2b2c/pbclocation/geo', {
|
||||
method: 'PATCH',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue