fix(auth): transfer WeChat id on merge; stop false phone prompts
CI / verify (pull_request) Has been cancelled

Merge used to drop wxOpenId so OAuth created a new guest without phone every time. Now migrate WeChat identity, recover legacy merged openIds, return accountMerged and force page reload, and only soft-prompt when phone is truly unbound.
This commit is contained in:
2026-07-15 21:25:34 +08:00
parent 5c55d3c385
commit d3d56150c5
7 changed files with 229 additions and 14 deletions
@@ -168,7 +168,10 @@ export default function OrderConfirmPage() {
if (!phonePromptSkipped.current) {
try {
const profile = await fetchUserProfile();
if (!profile.phoneVerified) {
const phoneBound =
!!profile.phoneVerified ||
(!!profile.phone && /^1[3-9]\d{9}$/.test(String(profile.phone)));
if (!phoneBound) {
const { confirm, cancel } = await Taro.showModal({
title: '建议绑定手机号',
content: '绑定后便于订单通知与售后联系;也可跳过,不绑定也能继续下单。',