fix(custom): 修改进店逻辑

This commit is contained in:
lukaijie
2025-07-31 16:18:05 +08:00
parent 3e0adf6980
commit 455603d37d
2 changed files with 8 additions and 3 deletions

View File

@@ -109,7 +109,11 @@ function withPageWrapper(Component) {
})
if (res.confirm) {
if (entryDefalutStore == '1') {
await checkStoreWhiteList()
try {
await checkStoreWhiteList()
} catch (err) {
await handleStoreWhiteList()
}
} else {
Taro.redirectTo({
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=davild`

View File

@@ -3,7 +3,7 @@ import { useSelector, useDispatch } from 'react-redux'
import Taro from '@tarojs/taro'
import api from '@/api'
import S from '@/spx'
import { pickBy, getDistributorId, entryLaunch } from '@/utils'
import { pickBy, getDistributorId, entryLaunch, isEmpty } from '@/utils'
import doc from '@/doc'
import { useShopInfo } from '@/hooks'
import { updateShopInfo } from '@/store/slices/shop'
@@ -31,7 +31,7 @@ export default () => {
if (dtid) {
params['distributor_id'] = dtid
} else if (entryStoreByLBS) {
if (!location) {
if (isEmpty(location)) {
const locationInfo = await entryLaunch.getLocationInfo()
dispatch(updateLocation(locationInfo))
params['lat'] = locationInfo?.lat
@@ -154,6 +154,7 @@ export default () => {
return {
checkEnterStoreRule,
checkStoreWhiteList,
checkUserInStoreWhiteList,
getUserWhiteShop
}