From 46625d6394dad7b7b2cf346e046d777e28c6a0fd Mon Sep 17 00:00:00 2001 From: zhangjing1 Date: Tue, 9 Sep 2025 15:16:13 +0800 Subject: [PATCH] bug(custom): eCX-7264 --- .env | 10 +++++----- src/app.js | 22 ++++++++++++---------- src/components/sp-page/index.js | 4 +--- src/pages/index.js | 5 +++-- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.env b/.env index f53bd29e3..c433749a1 100644 --- a/.env +++ b/.env @@ -1,16 +1,16 @@ APP_BASE_URL=https://demo-ecshopx.ishopex.cn/api/h5app/wxapp APP_WEBSOCKET=wss://demo-ecshopx.ishopex.cn/ws -APP_COMPANY_ID=38 -APP_PLATFORM=standard +APP_COMPANY_ID=5 +APP_PLATFORM=platform APP_CUSTOM_SERVER=https://ecshopx-h5.ex-sandbox.com/ APP_HOME_PAGE=/pages/index APP_TRACK=youshu APP_YOUSHU_TOKEN=bi281e87ab2424481a -APP_ID=wx1e25e45145b70faa -APP_MAP_KEY=PSPBZ-KQ5CW-CSGRF-ON2S4-K2HQJ-XEBQG +APP_ID=wxf7abee400d50e0d0 +APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe APP_MAP_NAME=oneX新零售门店定位 APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop -APP_DIANWU_URL=https://demo-ecshopx-dianwu.shopex123.com +APP_DIANWU_URL= APP_MERCHANT_URL= APP_ADAPAY= diff --git a/src/app.js b/src/app.js index 256f6c7c7..715abbe11 100644 --- a/src/app.js +++ b/src/app.js @@ -147,6 +147,14 @@ function App({ children }) { }) const getSystemConfig = async () => { + const [homeRes, appBaseRes, priceSetting, appSettingInfo, enterStoreRule] = await Promise.all([ + api.shop.homeSetting(), + api.shop.getAppBaseInfo(), + api.shop.getAppGoodsPriceSetting(), + api.groupBy.getCompanySetting(), + VERSION_STANDARD ? api.shop.getStoreEnterRule() : Promise.resolve(null) + ]) + const { echat, meiqia, @@ -155,7 +163,7 @@ function App({ children }) { nostores_status = false, distributor_param_status = false, point_rule_name = '积分' - } = await api.shop.homeSetting() + } = homeRes const { tab_bar, @@ -164,16 +172,10 @@ function App({ children }) { is_open_official_account: openOfficialAccount, color_style: { primary, accent, marketing }, title // 商城应用名称 - } = await api.shop.getAppBaseInfo() + } = appBaseRes - const priceSetting = await api.shop.getAppGoodsPriceSetting() - - const appSettingInfo = await api.groupBy.getCompanySetting() // 获取小程序头像 - - let enterStoreRule = null, - entryStoreRules = [] - if (VERSION_STANDARD) { - enterStoreRule = await api.shop.getStoreEnterRule() + let entryStoreRules = [] + if (VERSION_STANDARD && enterStoreRule) { entryStoreRules = Object.entries({ distributor_code: enterStoreRule.distributor_code, shop_assistant: enterStoreRule.shop_assistant, diff --git a/src/components/sp-page/index.js b/src/components/sp-page/index.js index aaddedb41..e7d029f55 100644 --- a/src/components/sp-page/index.js +++ b/src/components/sp-page/index.js @@ -439,9 +439,8 @@ const SpPage = memo( {/* 没有页面自动义头部配置样式,自动生成自定义导航 */} {state.customNavigation && RenderCustomNavigation()} - {props.loading && } - {!props.isDefault && !props.loading && ( + {!props.isDefault && ( 0 && } renderFooter={} - loading={loading} ref={pageRef} navigateMantle={navigateMantle} onReady={({ footerHeight }) => { @@ -285,6 +285,7 @@ function Home() { scrollY onScroll={handleScroll} > + {loading && } {isShowHomeHeader && ( {fixedTop && } )}