From 4191e86b46f3a1fcbaafa8537a0337f0b815106d Mon Sep 17 00:00:00 2001 From: lukaijie Date: Fri, 29 Aug 2025 16:59:50 +0800 Subject: [PATCH] fix(custom): m --- src/hocs/withPageWrapper.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/hocs/withPageWrapper.js b/src/hocs/withPageWrapper.js index 58389c436..8298afbfc 100644 --- a/src/hocs/withPageWrapper.js +++ b/src/hocs/withPageWrapper.js @@ -234,13 +234,8 @@ function withPageWrapper(Component) { contentAlign: 'center' }) if (resModalConnectStore.confirm) { - Taro.makePhoneCall({ - phoneNumber: currentShopInfo.phone, - fail: async () => { - return await resloveCheckUserInStoreWhiteList(currentShopInfo) - } - }) - throw new Error('PHONE_CALL_TO_STORE') + await makePhoneCall(currentShopInfo.phone) + dispatch(updateShopInfo(myShopInfo)) } else { dispatch(updateShopInfo(myShopInfo)) } @@ -284,6 +279,20 @@ function withPageWrapper(Component) { } } + const makePhoneCall = async (phoneNumber) => { + return new Promise((resolve, reject) => { + Taro.makePhoneCall({ + phoneNumber: phoneNumber, + success: async () => { + resolve() + }, + fail: async () => { + reject() + } + }) + }) + } + if (state) { return } else {