fix(mobile): replace App-Plus unsupported date and query APIs

`URLSearchParams` is absent from the App-Plus JS core, and
`toLocaleDateString('sv-SE', { timeZone: 'Asia/Shanghai' })` depends on full
ICU data that the App runtime does not ship, so the work-result pages built
either a broken query string or the device-local date.

Build query strings with `encodeURIComponent`, and centralise the business day
in `currentShanghaiDate()`, which shifts the epoch by a fixed UTC+8 offset
before slicing the ISO date. Asia/Shanghai has no DST, so the fixed offset is
exact rather than an approximation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-25 23:57:06 +08:00
co-authored by Claude Opus 5
parent 27f4cdac70
commit 3055d2bec9
7 changed files with 45 additions and 17 deletions
@@ -528,9 +528,9 @@ const markReviewed = async () => {
nextReason: nextScenarioId.value ? nextReason.value.trim() : undefined,
confirmedGrowthLevel: confirmedGrowthLevel.value || undefined
});
const params = new URLSearchParams({ id: String(detail.value.id) });
if (assignedScenario) params.set('assigned', assignedScenario);
uni.redirectTo({ url: `/pages/supervisor/review/done?${params.toString()}` });
const params = [`id=${encodeURIComponent(String(detail.value.id))}`];
if (assignedScenario) params.push(`assigned=${encodeURIComponent(assignedScenario)}`);
uni.redirectTo({ url: `/pages/supervisor/review/done?${params.join('&')}` });
} catch (error) {
handleRequestError(error, '标记失败');
} finally {