mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-07 21:15:47 +08:00
bug(跳转):
This commit is contained in:
@@ -23,7 +23,7 @@ import './index.scss'
|
||||
})
|
||||
)
|
||||
export default class Detail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -17,7 +17,7 @@ import './index.scss'
|
||||
memberData: user.userInfo
|
||||
}))
|
||||
export default class Flop extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import './index.scss'
|
||||
})
|
||||
)
|
||||
export default class Pay extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { SpNavBar } from '@/components'
|
||||
import './index.scss'
|
||||
|
||||
export default class PayDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ function SpCashier(props) {
|
||||
salesman = false,
|
||||
isPurchase = false
|
||||
} = props
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { userInfo } = useSelector((state) => state.user)
|
||||
const { customerLnformation } = useSelector((state) => state.cart)
|
||||
const [state, setState] = useImmer(initialState)
|
||||
|
||||
@@ -22,7 +22,7 @@ function SpChat(props) {
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { isWeAppKefu } = state
|
||||
const { echat, meiqia } = useSelector((state) => state.sys)
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
useEffect(() => {
|
||||
init()
|
||||
|
||||
@@ -91,7 +91,7 @@ function SpDeliver(props, ref) {
|
||||
activeTimeIdMerchant
|
||||
} = state
|
||||
const formRef = useRef()
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { cart_type } = $instance?.router?.params || {}
|
||||
// useEffect(() => {
|
||||
// fetch()
|
||||
|
||||
@@ -23,7 +23,7 @@ function SpLogin(props) {
|
||||
updateAddress()
|
||||
}
|
||||
})
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ const defaultTabList = []
|
||||
// cartCount: cart.cartCount
|
||||
// }))
|
||||
export default class TabBar extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ function useThemsColor() {
|
||||
const sys = useSelector((state) => state.sys)
|
||||
const { colorPrimary, colorMarketing, colorAccent, rgb } = sys
|
||||
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
const themeColor = () => {
|
||||
const { page, router } = $instance
|
||||
|
||||
@@ -13,7 +13,7 @@ import S from '@/spx'
|
||||
import { SG_DIANWU_TOKEN } from '@/consts/localstorage'
|
||||
|
||||
export default (props = {}) => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
useEffect(() => {
|
||||
const { token } = $instance?.router?.params || {}
|
||||
|
||||
@@ -29,7 +29,7 @@ export default (props = {}) => {
|
||||
const dispatch = useDispatch()
|
||||
const { userInfo, isNewUser } = useSelector((state) => state.user)
|
||||
const { invite_code } = useSelector((state) => state.purchase)
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
// const policyTime = useRef(0)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -15,10 +15,10 @@ export default (props = {}) => {
|
||||
})
|
||||
}
|
||||
|
||||
const { page } = getCurrentInstance()
|
||||
const { page } = getCurrentInstance() || {}
|
||||
const allPages = Taro.getCurrentPages()
|
||||
console.log('allPages:', allPages)
|
||||
page.config['navigationBarTitleText'] = title
|
||||
console.log('allPages:', allPages,page)
|
||||
page && (page.config.navigationBarTitleText = title)
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -24,7 +24,7 @@ export default (props = {}) => {
|
||||
// const [state, setState] = useImmer(initialState)
|
||||
// const { params, orderInfo } = state
|
||||
const cashierResultUrl = `/pages/cart/cashier-result`
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const currentPath = $instance?.router?.path
|
||||
const router = useRouter()
|
||||
const callbackRef = useRef()
|
||||
@@ -188,7 +188,7 @@ export default (props = {}) => {
|
||||
|
||||
// 微信H5 JSDK
|
||||
const wxpayjsPay = async (params, orderInfo) => {
|
||||
// const $instance = getCurrentInstance()
|
||||
// const $instance = getCurrentInstance() || {}
|
||||
const { order_id, code } = router?.params
|
||||
if (!code) {
|
||||
// 微信客户端code授权
|
||||
|
||||
@@ -16,7 +16,7 @@ import './shop-category.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DistributionShopCategory extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
spPageRef = React.createRef()
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -19,7 +19,7 @@ import './goods.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DistributionGoods extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
spPageRef = React.createRef()
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -16,7 +16,7 @@ import './qrcode.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class DistributionQrcode extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import './shop-category.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DistributionShopCategory extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import api from '@/api'
|
||||
import './shop-form.scss'
|
||||
|
||||
export default class DistributionShopForm extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import './shop-goods.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DistributionShopGoods extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import './shop-home.scss'
|
||||
|
||||
@withPager
|
||||
export default class DistributionShopHome extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import './shop.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class DistributionShop extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import './trade.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DistributionTrade extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import './espier-evaluation.scss'
|
||||
)
|
||||
@withPager
|
||||
export default class EvaluationDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
static options = {
|
||||
addGlobalClass: true
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import './espier-evaluation.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class Evaluation extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
static options = {
|
||||
addGlobalClass: true
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import { getDtidIdUrl } from '@/utils/helper'
|
||||
import './group-detail.scss'
|
||||
|
||||
export default class GroupDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -22,7 +22,7 @@ import './rate.scss'
|
||||
() => ({})
|
||||
)
|
||||
export default class TradeRate extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import './seckill-goods-list.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class SeckillGoodsList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import './activity-detail.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class ActivityDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function AddressIndex(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const colors = useSelector((state) => state.sys)
|
||||
const { address } = useSelector((state) => state.user)
|
||||
|
||||
@@ -15,7 +15,7 @@ import './coupon-detail.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class CouponDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ const { store } = configStore()
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class SettingIndex extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -27,7 +27,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function AddressIndex(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const colors = useSelector((state) => state.colors.current)
|
||||
const dispatch = useDispatch()
|
||||
|
||||
@@ -14,7 +14,7 @@ import { normalizeQuerys } from '@/utils'
|
||||
import './shopping-guide-card.scss'
|
||||
|
||||
export default class ShoppingGuideCard extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ const isWeapp = Taro.getEnv() === Taro.ENV_TYPE.WEAPP
|
||||
() => ({})
|
||||
)
|
||||
export default class Reg extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import './plusprice.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DetailPluspriceList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import './plusprice.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class DetailPluspriceList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import './goods-reservate.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class GoodsReservate extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function GoodReservate(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const colors = useSelector((state) => state.colors.current)
|
||||
const dispatch = useDispatch()
|
||||
|
||||
@@ -13,7 +13,7 @@ import { normalizeQuerys, getAppId } from '@/utils'
|
||||
import './index.scss'
|
||||
|
||||
export default class AuthLogin extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -23,7 +23,7 @@ import './coupon-picker.scss'
|
||||
)
|
||||
@withPager
|
||||
export default class CouponPicker extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -17,7 +17,7 @@ import './history.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class History extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { formatTime } from '@/utils'
|
||||
import './index.scss'
|
||||
|
||||
export default class ArticleIndex extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function AddPersonnel() {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { setNavigationBarTitle } = useNavigation()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function CashierResult(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
const { cashierPayment } = usePayment()
|
||||
const [state, setState] = useImmer(initialState)
|
||||
|
||||
@@ -24,7 +24,7 @@ const initialState = {
|
||||
orderInfo: {}
|
||||
}
|
||||
function CashierWeApp(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
// const { params, orderInfo } = $instance?.router?.params
|
||||
// const _params = JSON.parse(decodeURIComponent(params))
|
||||
// const _orderInfo = JSON.parse(decodeURIComponent(orderInfo))
|
||||
|
||||
@@ -89,7 +89,7 @@ function CompDeliver(props, ref) {
|
||||
activeTimeIdMerchant
|
||||
} = state
|
||||
const formRef = useRef()
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { cart_type } = $instance?.router?.params || {}
|
||||
// useEffect(() => {
|
||||
// fetch()
|
||||
|
||||
@@ -15,7 +15,7 @@ import './deliver.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class Deliver extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
static defaultProps = {
|
||||
list: [],
|
||||
curStore: {},
|
||||
|
||||
@@ -58,7 +58,7 @@ import CompPointUse from './comps/comp-pointuse'
|
||||
import './espier-checkout.scss'
|
||||
|
||||
function CartCheckout(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { updateAddress } = useLocation()
|
||||
const { isLogin, getUserInfoAuth } = useLogin({
|
||||
autoLogin: true,
|
||||
|
||||
@@ -58,7 +58,7 @@ function CartIndex() {
|
||||
})
|
||||
|
||||
const dispatch = useDispatch()
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const router = $instance?.router
|
||||
|
||||
const [state, setState] = useImmer(initialState)
|
||||
|
||||
@@ -37,7 +37,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function OfflineTransfer() {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const colors = useSelector((_state) => _state.colors.current)
|
||||
const { params } = useRouter()
|
||||
|
||||
@@ -43,7 +43,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function CompsCategoryAddCart(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
// const { purchase_share_info = {} } = useSelector((state) => state.purchase)
|
||||
const {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { SpPage } from '@/components'
|
||||
import './index.scss'
|
||||
|
||||
function ChatIndex(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
const { url } = $instance?.router?.params
|
||||
const webviewSrc = decodeURIComponent(url)
|
||||
|
||||
@@ -34,7 +34,7 @@ const initialState = {
|
||||
footerHeight: 0
|
||||
}
|
||||
function CustomPage(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { wgts, loading, shareInfo, skuPanelOpen, selectType, info, isShowTabBar } = state
|
||||
const MSpSkuSelect = React.memo(SpSkuSelect)
|
||||
|
||||
@@ -17,7 +17,7 @@ import './landing.scss'
|
||||
})
|
||||
)
|
||||
export default class Landing extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import doc from '@/doc'
|
||||
import { getGlobalBaseStyle } from '../helper'
|
||||
import './index.scss'
|
||||
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
function WgtCouponCard(props) {
|
||||
const [state, setState] = useImmer({
|
||||
couponCardList: []
|
||||
|
||||
@@ -13,7 +13,7 @@ import { needLoginPageType, needLoginPage } from '@/consts'
|
||||
import { WgtsContext } from './wgts-context'
|
||||
import './full-slider.scss'
|
||||
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const initState = {
|
||||
curIdx: 0,
|
||||
play: false,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { WgtsContext } from '../wgts-context'
|
||||
import { getGlobalBaseStyle } from '../helper'
|
||||
import './index.scss'
|
||||
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const initState = {
|
||||
curIdx: 0,
|
||||
play: false,
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class WgtGoodsScroll extends Component {
|
||||
addGlobalClass: true,
|
||||
info: null
|
||||
}
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -12,7 +12,7 @@ import { needLoginPageType, needLoginPage } from '@/consts'
|
||||
import { getGlobalBaseStyle } from '../helper'
|
||||
import './index.scss'
|
||||
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
const initialState = {
|
||||
curIdx: 0,
|
||||
|
||||
@@ -30,7 +30,8 @@ import {
|
||||
pickBy,
|
||||
log,
|
||||
showToast,
|
||||
buildSharePath
|
||||
buildSharePath,
|
||||
isWeb
|
||||
} from '@/utils'
|
||||
import {
|
||||
updatePurchaseShareInfo,
|
||||
@@ -124,23 +125,21 @@ function Home() {
|
||||
// 仅当定位结果真正变化(如城市/区县)时重拉首页配置,避免每次 useDidShow→updateAddress 导致 location 引用变化就整页重载
|
||||
useEffect(() => {
|
||||
if (!location || !VERSION_STANDARD) return
|
||||
const key = [location.city, location.district, location.lat, location.lng].filter(Boolean).join('|')
|
||||
if (locationKeyRef.current === key) return
|
||||
locationKeyRef.current = key
|
||||
fetchWgts()
|
||||
}, [location])
|
||||
|
||||
useEffect(() => {
|
||||
if (skuPanelOpen) {
|
||||
pageRef.current.pageLock()
|
||||
pageRef.current?.pageLock()
|
||||
} else {
|
||||
pageRef.current.pageUnLock()
|
||||
pageRef.current?.pageUnLock()
|
||||
}
|
||||
}, [skuPanelOpen])
|
||||
|
||||
// H5:手动滚动到目标 section,等布局完成再测量并预留吸顶导航高度
|
||||
useEffect(() => {
|
||||
if (process.env.TARO_ENV !== 'h5' || !scrollIntoView) return
|
||||
if (!isWeb || !scrollIntoView) return
|
||||
console.log('scrollIntoView:', scrollIntoView)
|
||||
const id = String(scrollIntoView).replace(/^#/, '')
|
||||
if (!id) return
|
||||
const navH = state.navbarHeight || 0
|
||||
|
||||
@@ -25,7 +25,7 @@ function CompGoodsBuyToolbar(props) {
|
||||
} = props
|
||||
const { cartCount = 0 } = useSelector((state) => state.cart)
|
||||
const { favs = [] } = useSelector((state) => state.user)
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const dispatch = useDispatch()
|
||||
const btns = []
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
function EspierDetail(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const pageRef = useRef()
|
||||
|
||||
const { userInfo } = useSelector((state) => state.user)
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ParamsItem } from './comps'
|
||||
import './item-params.scss'
|
||||
|
||||
export default class ItemParams extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -55,7 +55,7 @@ function PurchaseAuth() {
|
||||
const dispatch = useDispatch()
|
||||
const codeRef = useRef()
|
||||
const { showModal } = useModal()
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
|
||||
const { invite_code, activity_id, enterprise_id, is_activity } = state
|
||||
|
||||
@@ -29,7 +29,7 @@ const initialState = {
|
||||
collectArticleStatus: false
|
||||
}
|
||||
function GuideRecommendDetail(props) {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { img, shareImageUrl, itemId, title, content, articleFocusNum, updated } = state
|
||||
const { userInfo } = useSelector((state) => state.guide)
|
||||
|
||||
@@ -9,7 +9,7 @@ import { View, WebView } from '@tarojs/components'
|
||||
|
||||
const initialState = {}
|
||||
function WebviewIndex() {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { url } = $instance?.router?.params
|
||||
const webviewSrc = decodeURIComponent(url)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function parseUrlStr(urlStr) {
|
||||
}
|
||||
|
||||
export default class PcAuth extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
state = {
|
||||
checkStatus: false
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import payFailPng from '../../../assets/imgs/pay_fail.png'
|
||||
import './cashier-result.scss'
|
||||
|
||||
export default class CashierResult extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import api from '@/api'
|
||||
import './we.scss'
|
||||
|
||||
export default class WeappBtn extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
static options = {
|
||||
addGlobalClass: true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import api from '@/api'
|
||||
import './we.scss'
|
||||
|
||||
export default class WeappBtn extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
static options = {
|
||||
addGlobalClass: true
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import './index.scss'
|
||||
}))
|
||||
@withLogin()
|
||||
export default class Cashier extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
state = {
|
||||
info: null,
|
||||
env: '',
|
||||
|
||||
@@ -34,7 +34,7 @@ const steps = [
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class EditShare extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(...props) {
|
||||
super(...props)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import '../../pages/member/qrcode-buy.scss'
|
||||
@withPager
|
||||
@withBackToTop
|
||||
export default class QrcodeBuy extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import './detail.scss'
|
||||
}))
|
||||
@withPager
|
||||
export default class recommendDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
props = props || {}
|
||||
// props.pageSize = 50
|
||||
|
||||
@@ -28,7 +28,7 @@ import './after-sale-detail.scss'
|
||||
pointName: sys.pointName
|
||||
}))
|
||||
export default class TradeDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import './list.scss'
|
||||
@withPager
|
||||
@withLogin()
|
||||
export default class AfterSale extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const TEXTCOUNT = 255
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class TradeCancel extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -20,7 +20,7 @@ import './list.scss'
|
||||
}))
|
||||
@withPager
|
||||
export default class TradePickList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -70,7 +70,7 @@ const statusImg = {
|
||||
purchase: purchase.purchase_share_info
|
||||
}))
|
||||
export default class TradeDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import './list.scss'
|
||||
@withPager
|
||||
@withLogin()
|
||||
export default class TradePickList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -35,7 +35,7 @@ import './list.scss'
|
||||
}))
|
||||
@withPager
|
||||
export default class TradeList extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import api from '@/api'
|
||||
import './refund-detail.scss'
|
||||
|
||||
export default class TradeRefundDetail extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import './refund-sendback.scss'
|
||||
// 'JTSD': '极兔速递',
|
||||
// }
|
||||
export default class TradeRefundSendback extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -21,7 +21,7 @@ import './refund.scss'
|
||||
colors: colors.current
|
||||
}))
|
||||
export default class TradeRefund extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import './vipgrades.scss'
|
||||
})
|
||||
)
|
||||
export default class VipIndex extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { setTokenAndRedirect, getToken } from './util'
|
||||
import './auth-loading.scss'
|
||||
|
||||
const AuthLoading = () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const {
|
||||
params: { code, redi_url }
|
||||
} = $instance?.router
|
||||
|
||||
@@ -26,7 +26,7 @@ const initialValue = {
|
||||
}
|
||||
|
||||
const PageBindPhone = () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const {
|
||||
params: { unionid, redi_url }
|
||||
} = $instance?.router
|
||||
|
||||
@@ -11,7 +11,7 @@ import './comp-otherlogin.scss'
|
||||
|
||||
const CompOtherLogin = () => {
|
||||
const handleClickWexin = async () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
//跳转
|
||||
const { redirect = '' } = $instance?.router?.params
|
||||
const redirectUrl =
|
||||
|
||||
@@ -22,7 +22,7 @@ const initialValue = {
|
||||
}
|
||||
|
||||
const PageEditPassword = () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
|
||||
const {
|
||||
params: { phone, unionid, vcode }
|
||||
|
||||
@@ -28,7 +28,7 @@ const initialValue = {
|
||||
}
|
||||
|
||||
const PageBindPhone = () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const {
|
||||
params: { phone, redi_url }
|
||||
} = $instance?.router
|
||||
|
||||
@@ -23,7 +23,7 @@ import './login.scss'
|
||||
(dispatch) => ({ dispatch })
|
||||
)
|
||||
export default class Login extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import './reg-rule.scss'
|
||||
|
||||
@withPager
|
||||
export default class RegRule extends Component {
|
||||
$instance = getCurrentInstance()
|
||||
$instance = getCurrentInstance() || {}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const initialState = {
|
||||
function CaseDetail() {
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { detail } = state
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { design_id, plan_id } = $instance?.router?.params || {}
|
||||
const { levelinfo } = detail || {}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const initialState = {
|
||||
function ViewCase() {
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { designWorks } = state
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { design_works } = $instance?.router?.params || {}
|
||||
useEffect(() => {
|
||||
if (design_works) {
|
||||
|
||||
@@ -55,7 +55,7 @@ function ApplyChief(props) {
|
||||
loading
|
||||
} = state
|
||||
const { colorPrimary } = useSelector((state) => state.sys)
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const formRef = useRef()
|
||||
const { distributor_id: dtid, scene = '' } = $instance?.router?.params
|
||||
let distributor_id = dtid
|
||||
|
||||
@@ -39,7 +39,7 @@ const BoxList = () => {
|
||||
const { startDate, startTime, endDate, endTime, activeIndex, list, itemBoxNum, itemPieceNum } =
|
||||
state
|
||||
const goodsRef = useRef()
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { activity_id } = $instance?.router?.params
|
||||
|
||||
// useEffect(() => {
|
||||
|
||||
@@ -19,7 +19,7 @@ const initialState = {
|
||||
}
|
||||
function PointRule(props) {
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { content } = state
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -23,7 +23,7 @@ const initialState = {
|
||||
function CommunityEdit(props) {
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const { ziti_name, address, areaValue, province, city, area } = state
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { id } = $instance?.router?.params
|
||||
useEffect(() => {
|
||||
if (id) {
|
||||
|
||||
@@ -26,7 +26,7 @@ const initialState = {
|
||||
}
|
||||
|
||||
const EspierCheckout = () => {
|
||||
const $instance = getCurrentInstance()
|
||||
const $instance = getCurrentInstance() || {}
|
||||
const { activity_id, items } = $instance?.router?.params
|
||||
const { address, chiefInfo, checkIsChief } = useSelector((state) => state.user)
|
||||
const { cashierPayment } = usePayment()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user