mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-12 14:25:38 +08:00
fix(custom): test5
This commit is contained in:
12
src/app.js
12
src/app.js
@@ -93,12 +93,12 @@ function App({ children }) {
|
||||
|
||||
useLaunch((options) => {
|
||||
console.log('useLaunch ***********', options)
|
||||
__non_webpack_require__ &&
|
||||
__non_webpack_require__('subpages/i18n/index', (res) => {
|
||||
const langJSON = Taro['langJSON']
|
||||
console.log('langJSON--------', langJSON)
|
||||
langObj.setLanguagePackage(langJSON)
|
||||
})
|
||||
// __non_webpack_require__ &&
|
||||
// __non_webpack_require__('subpages/i18n/index', (res) => {
|
||||
// const langJSON = Taro['langJSON']
|
||||
// console.log('langJSON--------', langJSON)
|
||||
// langObj.setLanguagePackage(langJSON)
|
||||
// })
|
||||
})
|
||||
|
||||
useDidShow(async (options) => {
|
||||
|
||||
@@ -131,7 +131,7 @@ const SpPage = memo(
|
||||
const custom_navigation = isWeixin ? navigationStyle === 'custom' : false
|
||||
setState((draft) => {
|
||||
draft.btnReturn = _btnReturn
|
||||
draft.btnHome = _btnHome
|
||||
draft.btnHome = _btnHome && props.btnHomeEnable
|
||||
draft.customNavigation = custom_navigation
|
||||
draft.cusCurrentPage = pages.length
|
||||
draft.ipx = isIphoneX()
|
||||
@@ -499,6 +499,7 @@ const SpPage = memo(
|
||||
|
||||
SpPage.defaultProps = {
|
||||
onReady: () => {},
|
||||
btnHomeEnable: true,
|
||||
className: '',
|
||||
children: null,
|
||||
defaultMsg: '',
|
||||
|
||||
@@ -88,7 +88,7 @@ function withPageWrapper(Component) {
|
||||
await checkStoreWhiteList()
|
||||
} else {
|
||||
Taro.redirectTo({
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=1`
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=davild`
|
||||
})
|
||||
}
|
||||
// Taro.exitMiniProgram()
|
||||
|
||||
@@ -45,7 +45,7 @@ export default () => {
|
||||
entryDefalutStore === '2'
|
||||
) {
|
||||
Taro.redirectTo({
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=1`
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=davild`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export default () => {
|
||||
await checkStoreWhiteList()
|
||||
} else if (entryDefalutStore === '2') {
|
||||
Taro.redirectTo({
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=1`
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=davild`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ export default () => {
|
||||
await checkStoreWhiteList()
|
||||
} else if (entryDefalutStore === '2') {
|
||||
Taro.redirectTo({
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=1`
|
||||
url: `/pages/custom/custom-page?id=${guidderTemplateId}&fromConnect=davild`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { useEffect, useRef } from 'react'
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import { useImmer } from 'use-immer'
|
||||
import Taro, {
|
||||
useRouter,
|
||||
getCurrentInstance,
|
||||
useShareAppMessage,
|
||||
useShareTimeline,
|
||||
@@ -42,6 +43,7 @@ function CustomPage(props) {
|
||||
const pageRef = useRef()
|
||||
const loginRef = useRef()
|
||||
const { open_divided } = useSelector((state) => state.sys)
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
fetch()
|
||||
@@ -66,6 +68,7 @@ function CustomPage(props) {
|
||||
})
|
||||
const url = `/pageparams/setting?${pathparams}`
|
||||
const { config, share } = await req.get(url)
|
||||
|
||||
setState((draft) => {
|
||||
draft.wgts = config
|
||||
draft.loading = false
|
||||
@@ -129,6 +132,7 @@ function CustomPage(props) {
|
||||
const pageData = wgts.find((wgt) => wgt.name == 'page')
|
||||
return (
|
||||
<SpPage
|
||||
btnHomeEnable={router.params.fromConnect !== 'davild'}
|
||||
immersive={pageData?.base?.isImmersive}
|
||||
scrollToTopBtn
|
||||
className='page-custom-page'
|
||||
|
||||
@@ -842,5 +842,4 @@ function EspierDetail(props) {
|
||||
)
|
||||
}
|
||||
|
||||
export default EspierDetail
|
||||
// export default withPageWrapper(EspierDetail)
|
||||
export default withPageWrapper(EspierDetail)
|
||||
|
||||
Reference in New Issue
Block a user