2.0 KiB
2.0 KiB
Why
The device exchange popup currently collects the shipping address as a single free-text field. This makes Chinese address entry error-prone, does not support selecting province/city/district from a standard area dataset, and forces users to manually rewrite recipient details even when they already copied a full shipping string from another app.
The homepage top summary card already loads asset information from /api/c/v1/asset/info, but it does not surface the ICCID value even though the response now provides data.iccid. Users need that value visible above the package name on the homepage.
What Changes
- Replace the single shipping-address input in
pages/device-exchange/device-exchange.vuewith province/city/district selection backed byelement-china-area-dataplus a separate detailed-address input - Add a pasteable shipping-info input so the page can recognize and prefill recipient name, phone number, and address from one copied string
- Keep the existing exchange shipping submission API contract and assemble the selected region text together with the detailed address into
recipient_address - Add an
ICCIDline above the package name in the homepage top summary card - Use
data.iccidfrom/api/c/v1/asset/info?identifier=...as the homepageICCIDsource of truth
Capabilities
New Capabilities
device-exchange-shipping-entry: Define structured shipping entry, pasted shipping-text recognition, and payload composition for the device exchange popupindex-asset-summary: Define homepage summary display rules forICCID
Modified Capabilities
Impact
- Affected code:
pages/device-exchange/device-exchange.vue,pages/index/index.vue,components/UserInfoCard.vue, related address parsing helpers if introduced - Affected dependencies:
element-china-area-data - Affected API usage:
/api/c/v1/exchange/{id}/shipping-info,/api/c/v1/asset/info - No backend API contract change is required if the frontend continues submitting a composed
recipient_addressstring