mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 09:25:55 +08:00
bug(ECX-7309):
This commit is contained in:
@@ -13,6 +13,7 @@ import S from '@/spx'
|
|||||||
|
|
||||||
function withPageWrapper(Component) {
|
function withPageWrapper(Component) {
|
||||||
return function EnhancedComponent(props) {
|
return function EnhancedComponent(props) {
|
||||||
|
console.log('withPageWrapper', props)
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const { initState, entryStoreRules, entryStoreByLBS, entryDefalutStore, guidderTemplateId } =
|
const { initState, entryStoreRules, entryStoreByLBS, entryDefalutStore, guidderTemplateId } =
|
||||||
useSelector((state) => state.sys)
|
useSelector((state) => state.sys)
|
||||||
@@ -39,6 +40,19 @@ function withPageWrapper(Component) {
|
|||||||
}
|
}
|
||||||
}, [shopInfo])
|
}, [shopInfo])
|
||||||
|
|
||||||
|
// 监听语言切换,刷新店铺信息
|
||||||
|
useEffect(() => {
|
||||||
|
const onLangChanged = async () => {
|
||||||
|
try {
|
||||||
|
await checkStoreWhiteList(shopInfo?.distributor_id)
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
Taro.eventCenter && Taro.eventCenter.on('languageChanged', onLangChanged)
|
||||||
|
return () => {
|
||||||
|
Taro.eventCenter && Taro.eventCenter.off('languageChanged', onLangChanged)
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
const resolveInStoreRule = async () => {
|
const resolveInStoreRule = async () => {
|
||||||
// 启动时(冷启动+热启动)执行云店进店规则
|
// 启动时(冷启动+热启动)执行云店进店规则
|
||||||
if (VERSION_STANDARD && Taro.getStorageSync(SG_CHECK_STORE_RULE) == 0) {
|
if (VERSION_STANDARD && Taro.getStorageSync(SG_CHECK_STORE_RULE) == 0) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { AtButton } from 'taro-ui'
|
|||||||
import { SpPage, SpCell, SpFloatLayout, SpCheckbox } from '@/components'
|
import { SpPage, SpCell, SpFloatLayout, SpCheckbox } from '@/components'
|
||||||
import { isWeb } from '@/utils'
|
import { isWeb } from '@/utils'
|
||||||
import { View } from '@tarojs/components'
|
import { View } from '@tarojs/components'
|
||||||
|
import withPageWrapper from '@/hocs/withPageWrapper'
|
||||||
import i18n from '@/lang/consts'
|
import i18n from '@/lang/consts'
|
||||||
import './settings.scss'
|
import './settings.scss'
|
||||||
|
|
||||||
@@ -98,4 +99,4 @@ const Settings = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Settings
|
export default withPageWrapper(Settings)
|
||||||
|
|||||||
Reference in New Issue
Block a user