fix(优惠券中心):携程订单接口对接第一版完成对接,新增加密请求体方法

This commit is contained in:
2025-08-14 20:17:29 +08:00
parent 31c62956e8
commit 993fcc2fa4
13 changed files with 172 additions and 15 deletions
@@ -485,12 +485,17 @@ const Welcome: React.FC = () => {
{/* 新增二维码选择器 */}
<Select
placeholder="选择二维码"
style={{ width: 200 }}
style={{ width: 250 }}
allowClear
disabled={!selectedTourism}
options={getCurrentTourismQrcodes()}
value={selectedQrcode}
onChange={setSelectedQrcode}
showSearch
optionFilterProp="label"
filterOption={(input, option) =>
(String(option?.label) ?? '').toLowerCase().includes(input.toLowerCase())
}
/>
{/* 新增平台分账比例选择 */}
<span>平台分账比例:</span>
@@ -88,6 +88,18 @@ const UpdateForm: React.FC<UpdateFormProps> = ({
rules={[{ required: true, message: '此项为必填项' }]}
placeholder="请选择状态"
/>
<ProFormSelect
name="showInHomepage"
label="首页显示"
width="md"
options={[
{ label: '显示', value: 1 },
{ label: '不显示', value: 0 },
]}
rules={[{ required: true, message: '此项为必填项' }]}
placeholder="请选择是否在首页显示"
tooltip="控制景区是否在首页附近景区列表中显示"
/>
</ProForm.Group>
<ProForm.Group>
@@ -204,6 +204,23 @@ const TableList: React.FC = () => {
'0': { text: '未启用', status: 'Error' },
},
},
{
title: '首页显示',
dataIndex: 'showInHomepage',
valueType: 'select',
valueEnum: {
'1': { text: '显示', status: 'Success' },
'0': { text: '不显示', status: 'Default' },
},
render: (_, record) => {
const showInHomepage = record.showInHomepage ?? 1; // 默认为1(显示)
return showInHomepage === 1 ? (
<Tag color="green">显示</Tag>
) : (
<Tag color="default">不显示</Tag>
);
},
},
{
title: '创建时间',
dataIndex: 'createTime',
@@ -318,6 +335,18 @@ const TableList: React.FC = () => {
rules={[formRules.required]}
initialValue="1"
/>
<ProFormSelect
name="showInHomepage"
label="首页显示"
width="md"
options={[
{ label: '显示', value: 1 },
{ label: '不显示', value: 0 },
]}
rules={[formRules.required]}
initialValue={1}
tooltip="控制景区是否在首页附近景区列表中显示"
/>
</ProForm.Group>
<ProForm.Group>
@@ -39,6 +39,7 @@ declare namespace ORDERS {
status: number;
tenantId?: string;
updateTime?: string;
showInHomepage?: number; // 是否在首页显示(0:不显示,1:显示)
}
type TourismWithDistance = Tourism & {