diff --git a/.gitignore b/.gitignore index 19526e2..6fb8cb3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ node_modules/ .swc *.local .env -design/ \ No newline at end of file +design/ +TODO.md diff --git a/src/lib/cdn.ts b/src/lib/cdn.ts index f5bb81c..d1d59ee 100644 --- a/src/lib/cdn.ts +++ b/src/lib/cdn.ts @@ -10,8 +10,8 @@ export const RECEIPT_STAMP_DONE = `${STATIC_CDN}/images/oderDetailCallBackSucces export const RECEIPT_STAMP_PENDING = `${STATIC_CDN}/images/oderDetailCallBack.png` export const ENTITY_LABELS = { - entityName: '商户名称', - entityAddress: '经营地址', + entityName: '门店名称', + entityAddress: '门店地址', entityMapLocation: '门店位置', } diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index 2a6152e..bf5a72e 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -227,12 +227,6 @@ margin-left: 12px; } -.order-card__pay-icon { - width: 36px; - height: 36px; - margin-right: 8px; -} - .order-card__fee { color: #f53f3f; font-size: 28px; diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index a72910c..bba880d 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -17,7 +17,6 @@ import { getOrderCardActions, getStatusMeta, ORDER_TABS, - PAY_ICON, type OrderTabKey, } from '@/lib/status' import ContactModal, { ContactFab } from './contact' @@ -150,11 +149,11 @@ export default function Index () { {visibleOrders.map((order, index) => ( { - if (!order.out_trade_no) return - Taro.setClipboardData({ data: String(order.out_trade_no) }) + if (!order.transaction_id) return + Taro.setClipboardData({ data: String(order.transaction_id) }) }} onViewDetail={() => setDetailOrder(order)} onResubmit={() => openOrderPage('/pages/resubmit/index', order)} @@ -199,7 +198,6 @@ function OrderCard ({ }) { const status = getStatusMeta(order.process_status, order.process_status_name) const actions = getOrderCardActions(order) - const payIcon = PAY_ICON[order.pay_type] return ( @@ -210,20 +208,19 @@ function OrderCard ({ - + - 订单ID: - {order.out_trade_no || '-'} - {order.out_trade_no ? ( + 交易单号: + {order.transaction_id || '-'} + {order.transaction_id ? ( ) : null} - 支付方式: - {payIcon ? : null} + 订单金额: ¥{order.total_fee || '-'} diff --git a/src/pages/map/index.scss b/src/pages/map/index.scss index d724ae8..85783e4 100644 --- a/src/pages/map/index.scss +++ b/src/pages/map/index.scss @@ -56,8 +56,10 @@ right: 24px; bottom: 360px; z-index: 2; + box-sizing: border-box; width: 96px; height: 96px; + padding: 0 12px; border-radius: 48px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); @@ -68,6 +70,23 @@ font-size: 24px; } +.map-page__locate--active { + width: 620px; + max-width: calc(100% - 48px); + height: 80px; + padding: 0 24px; + border-radius: 8px; + color: #ff2020; + font-size: 24px; +} + +.map-page__locate-text { + overflow: hidden; + max-width: 100%; + white-space: nowrap; + text-overflow: ellipsis; +} + .map-page__panel { position: absolute; right: 0; diff --git a/src/pages/map/index.tsx b/src/pages/map/index.tsx index 3056374..b2ec165 100644 --- a/src/pages/map/index.tsx +++ b/src/pages/map/index.tsx @@ -13,6 +13,7 @@ import './index.scss' const DEFAULT_CENTER = { lng: 116.397428, lat: 39.90923 } const MAP_ID = 'picker-map' +const LOCATION_ACCURACY_RADIUS_METERS = 100 function asNumber (value?: string) { const next = Number(value) @@ -36,6 +37,7 @@ export default function MapPage () { const [center, setCenter] = useState(DEFAULT_CENTER) const [selected, setSelected] = useState(DEFAULT_CENTER) const [locating, setLocating] = useState(false) + const [locatedCenter, setLocatedCenter] = useState<{ lng: number, lat: number } | null>(null) const [resolving, setResolving] = useState(false) const geocodeSeq = useRef(0) @@ -85,6 +87,9 @@ export default function MapPage () { try { const location = await Taro.getLocation({ type: 'gcj02' }) applyCenter(location.longitude, location.latitude, true) + if (!silent) { + setLocatedCenter({ lng: location.longitude, lat: location.latitude }) + } } catch { if (!silent) { Taro.showToast({ title: '定位失败,请检查定位权限', icon: 'none' }) @@ -158,6 +163,14 @@ export default function MapPage () { scale={16} showLocation enablePoi + circles={locatedCenter ? [{ + longitude: locatedCenter.lng, + latitude: locatedCenter.lat, + radius: LOCATION_ACCURACY_RADIUS_METERS, + color: '#0261FCE6', + fillColor: '#7AB5FF33', + strokeWidth: 1, + }] : []} onError={() => undefined} onRegionChange={handleRegionChange} onPoiTap={(event) => { @@ -179,8 +192,17 @@ export default function MapPage () { {placeText === '滑动选择位置' ? '搜索地点' : placeText} - void locateCurrent()}> - {locating ? '定位中' : '定位'} + void locateCurrent()} + > + + {locating + ? '定位中' + : locatedCenter + ? '已定位到您当前位置范围,请点击地图精确标点' + : '定位'} + diff --git a/src/pages/resubmit/index.tsx b/src/pages/resubmit/index.tsx index 0cb5df5..39e62ad 100644 --- a/src/pages/resubmit/index.tsx +++ b/src/pages/resubmit/index.tsx @@ -35,7 +35,7 @@ const STOREFRONT_EXAMPLES = [ ] const DISCLAIMER_BODY = - '我们仅代客户提交商户、企业位置资料,所提供服务为商业有偿咨询及资料提交服务,全程由工作人员处理,不代表任何第三方机构,也不能编辑第三方网站的原始内容,请知悉。' + '提交信息后,平台将进行审核。审核通过后,您的商户信息将在地图上展示,并同步生成专属详情页面。海量用户可通过地图搜索并快速找到您的位置,进一步提升品牌曝光与到店流量。' function FieldLabel ({ icon, text, required }: { icon: string, text: string, required?: boolean }) { return ( @@ -230,11 +230,11 @@ export default function ResubmitPage () { return } if (!isValidPhone(values.entity_phone || '')) { - Taro.showToast({ title: '请填写正确的联系电话1', icon: 'none' }) + Taro.showToast({ title: '请填写正确的门店电话', icon: 'none' }) return } if (!isValidPhone(values.entity_phone2 || '')) { - Taro.showToast({ title: '请填写正确的联系电话2', icon: 'none' }) + Taro.showToast({ title: '请填写正确的办理人电话', icon: 'none' }) return } @@ -275,17 +275,17 @@ export default function ResubmitPage () { updateField('entity_name', value)} /> - 请确保商户名称与门头照片店名一致 + 请确保门店名称与门头照片店名一致 - {values.entity_address_name || '请选择经营地址'} + {values.entity_address_name || '请选择门店地址'} @@ -302,7 +302,7 @@ export default function ResubmitPage () { - + - +