fix(mini-user): address URL, form align, agreement checkbox, shop scan resume
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -82,6 +82,7 @@ export default function AddressEditPage() {
|
||||
const validationError = validateForm();
|
||||
if (validationError) {
|
||||
setError(validationError);
|
||||
toast(validationError);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -110,7 +111,9 @@ export default function AddressEditPage() {
|
||||
});
|
||||
}, 400);
|
||||
} catch (e) {
|
||||
setError(e instanceof Error ? e.message : '保存失败');
|
||||
const msg = e instanceof Error ? e.message : '保存失败';
|
||||
setError(msg);
|
||||
toast(msg);
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,9 @@ export default function AddressesPage() {
|
||||
className="address-action"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
Taro.navigateTo({ url: buildAddressEditUrl(a.id, checkoutCtx) });
|
||||
Taro.navigateTo({ url: buildAddressEditUrl(a.id, checkoutCtx) }).catch((err) => {
|
||||
toast(err instanceof Error ? err.message : '无法打开编辑页');
|
||||
});
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
@@ -120,7 +122,11 @@ export default function AddressesPage() {
|
||||
</View>
|
||||
<View
|
||||
className="address-fab"
|
||||
onClick={() => Taro.navigateTo({ url: buildAddressEditUrl(undefined, checkoutCtx) })}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: buildAddressEditUrl(undefined, checkoutCtx) }).catch((e) => {
|
||||
toast(e instanceof Error ? e.message : '无法打开新增地址页');
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Text>新增地址</Text>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user