fix(admin,mini-user): product on-sale tag, store coords inputs, home UX
CI / verify (pull_request) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-27 22:40:57 +08:00
parent 09eda9a11e
commit 15b878f2a4
4 changed files with 25 additions and 18 deletions
+3 -1
View File
@@ -271,7 +271,9 @@ export default function ProductsPage() {
{ title: '规格', dataIndex: 'spec', width: 120, ellipsis: true },
{ title: '售价', dataIndex: 'price', width: 80, render: (v) => `¥${v}` },
{ title: '权益额', dataIndex: 'benefitAmount', width: 80, render: (v) => `¥${v}` },
{ title: '状态', dataIndex: 'status', width: 80, render: (s) => <Tag>{PRODUCT_STATUS_LABELS[s] || s}</Tag> },
{ title: '状态', dataIndex: 'status', width: 80, render: (s) => (
<Tag color={s === 'ON_SALE' ? 'green' : undefined}>{PRODUCT_STATUS_LABELS[s] || s}</Tag>
) },
{
title: '现场取货',
dataIndex: 'allowOnSitePickup',
+19 -14
View File
@@ -329,8 +329,6 @@ export default function StoresPage() {
const selectedRegionCodes = Form.useWatch('regionCodes', createForm);
const selectedCityId = Form.useWatch('cityId', createForm);
const selectedCategoryParentId = Form.useWatch('categoryParentId', createForm);
const watchedLat = Form.useWatch('latitude', createForm);
const watchedLng = Form.useWatch('longitude', createForm);
const categoryParentOptions = useMemo(
() =>
@@ -866,12 +864,24 @@ export default function StoresPage() {
<Form.Item name="address" label="详细地址" rules={[{ required: true, message: '请填写详细地址' }]}>
<Input.TextArea rows={2} placeholder="请输入详细门牌号" />
</Form.Item>
<Form.Item name="latitude" hidden>
<InputNumber />
</Form.Item>
<Form.Item name="longitude" hidden>
<InputNumber />
</Form.Item>
<Space wrap style={{ width: '100%' }}>
<Form.Item name="latitude" label="纬度" style={{ marginBottom: 8 }}>
<InputNumber
style={{ width: 180 }}
precision={7}
step={0.000001}
placeholder="如 34.7466000"
/>
</Form.Item>
<Form.Item name="longitude" label="经度" style={{ marginBottom: 8 }}>
<InputNumber
style={{ width: 180 }}
precision={7}
step={0.000001}
placeholder="如 113.6253000"
/>
</Form.Item>
</Space>
<Space wrap style={{ marginBottom: 16 }}>
<Button
loading={locating}
@@ -903,12 +913,7 @@ export default function StoresPage() {
</Button>
<Typography.Text type="secondary">
{watchedLat != null &&
watchedLng != null &&
Number.isFinite(Number(watchedLat)) &&
Number.isFinite(Number(watchedLng))
? `坐标:${Number(watchedLat).toFixed(6)}, ${Number(watchedLng).toFixed(6)}`
: '未定位(可选,便于用户端导航与距离)'}
便
</Typography.Text>
</Space>
<Space wrap style={{ width: '100%' }}>