mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 09:25:55 +08:00
bug(ECX-7320):
This commit is contained in:
@@ -12568,5 +12568,55 @@
|
|||||||
"zh-cn": "首次加车",
|
"zh-cn": "首次加车",
|
||||||
"en": "The first additional vehicle",
|
"en": "The first additional vehicle",
|
||||||
"zh-tw": "首次加車"
|
"zh-tw": "首次加車"
|
||||||
|
},
|
||||||
|
"piuijod": {
|
||||||
|
"zh-cn": "用户服务协议和隐私政策提示",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"t65t3227": {
|
||||||
|
"zh-cn": "感谢您使用小程序,为更好地保护您的个人信息安全,我们将提供《隐私政策》和《会员服务协议》来帮助您了解:我们如何收集、使用及储存您的个人信息,以及您享有的权利;",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"accsd08": {
|
||||||
|
"zh-cn": "若您已阅读并同意",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"uwz0okl": {
|
||||||
|
"zh-cn": ",请点击“同意并继续”开始使用我们的服务。",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"dw16kn5": {
|
||||||
|
"zh-cn": "同意并继续",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"gr2vmpa": {
|
||||||
|
"zh-cn": "登录即可解锁更多权益",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"2r66lo8": {
|
||||||
|
"zh-cn": "请先勾选隐私协议",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"tst9oy7": {
|
||||||
|
"zh-cn": "手机号快捷登录",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"aa2fon4": {
|
||||||
|
"zh-cn": "以下全选",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
|
},
|
||||||
|
"97t8d6w": {
|
||||||
|
"zh-cn": "同意佛罗伦萨小镇及FV线上商城向我推送会员活动信息及品牌促销信息",
|
||||||
|
"en": "",
|
||||||
|
"zh-tw": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,33 +1,20 @@
|
|||||||
import React, { useRef, useEffect, useState } from 'react'
|
import React, { useRef, useEffect, useState } from 'react'
|
||||||
import { View, Text, ScrollView } from '@tarojs/components'
|
import { View } from '@tarojs/components'
|
||||||
import Taro, { getCurrentInstance, useDidShow } from '@tarojs/taro'
|
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||||
import { connect } from 'react-redux'
|
|
||||||
import { useImmer } from 'use-immer'
|
import { useImmer } from 'use-immer'
|
||||||
import { withPager, withBackToTop } from '@/hocs'
|
|
||||||
import { AtDrawer, AtTabs } from 'taro-ui'
|
|
||||||
import {
|
import {
|
||||||
BackToTop,
|
|
||||||
Loading,
|
|
||||||
TagsBar,
|
|
||||||
SpFilterBar,
|
SpFilterBar,
|
||||||
GoodsItem,
|
|
||||||
SpTagBar,
|
SpTagBar,
|
||||||
SpGoodsItem,
|
SpGoodsItem,
|
||||||
SpSearchBar,
|
SpSearchBar,
|
||||||
SpNavBar,
|
|
||||||
SpLoadMore,
|
|
||||||
TabBar,
|
|
||||||
SpPage,
|
SpPage,
|
||||||
SpScrollView,
|
SpScrollView,
|
||||||
SpDrawer,
|
|
||||||
SpSelect,
|
|
||||||
SpSkuSelect
|
SpSkuSelect
|
||||||
} from '@/components'
|
} from '@/components'
|
||||||
import doc from '@/doc'
|
import doc from '@/doc'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import { pickBy, classNames, isWeixin, getDistributorId, styleNames, showToast } from '@/utils'
|
import { pickBy, classNames, showToast } from '@/utils'
|
||||||
import { Tracker } from '@/service'
|
import { Tracker } from '@/service'
|
||||||
import CompTabbar from './comps/comp-tabbar'
|
|
||||||
|
|
||||||
import './item-list.scss'
|
import './item-list.scss'
|
||||||
|
|
||||||
@@ -36,7 +23,6 @@ const MSpSkuSelect = React.memo(SpSkuSelect)
|
|||||||
const initialState = {
|
const initialState = {
|
||||||
leftList: [],
|
leftList: [],
|
||||||
rightList: [],
|
rightList: [],
|
||||||
brandList: [],
|
|
||||||
brandSelect: [],
|
brandSelect: [],
|
||||||
filterList: [
|
filterList: [
|
||||||
{ title: '综合' },
|
{ title: '综合' },
|
||||||
@@ -48,28 +34,23 @@ const initialState = {
|
|||||||
tagList: [],
|
tagList: [],
|
||||||
curTagIdx: 0,
|
curTagIdx: 0,
|
||||||
keywords: '',
|
keywords: '',
|
||||||
show: false,
|
|
||||||
fixTop: 0,
|
|
||||||
info: null,
|
info: null,
|
||||||
skuPanelOpen: false,
|
skuPanelOpen: false,
|
||||||
selectType: 'picker'
|
selectType: 'picker'
|
||||||
}
|
}
|
||||||
|
|
||||||
function StoreItemList(props) {
|
function StoreItemList() {
|
||||||
const $instance = getCurrentInstance()
|
const $instance = getCurrentInstance()
|
||||||
const [state, setState] = useImmer(initialState)
|
const [state, setState] = useImmer(initialState)
|
||||||
const {
|
const {
|
||||||
keywords,
|
keywords,
|
||||||
leftList,
|
leftList,
|
||||||
rightList,
|
rightList,
|
||||||
brandList,
|
|
||||||
brandSelect,
|
brandSelect,
|
||||||
curFilterIdx,
|
curFilterIdx,
|
||||||
filterList,
|
filterList,
|
||||||
tagList,
|
tagList,
|
||||||
curTagIdx,
|
curTagIdx,
|
||||||
show,
|
|
||||||
fixTop,
|
|
||||||
info,
|
info,
|
||||||
skuPanelOpen,
|
skuPanelOpen,
|
||||||
selectType
|
selectType
|
||||||
@@ -81,23 +62,6 @@ function StoreItemList(props) {
|
|||||||
|
|
||||||
useEffect(() => {}, [])
|
useEffect(() => {}, [])
|
||||||
|
|
||||||
// useDidShow(() => {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// Taro.createSelectorQuery()
|
|
||||||
// .select('#item-list-head')
|
|
||||||
// .boundingClientRect((res) => {
|
|
||||||
// console.log('boundingClientRect:', res) //
|
|
||||||
// if (res) {
|
|
||||||
// setState((draft) => {
|
|
||||||
// draft.fixTop = res.bottom
|
|
||||||
// console.log('fixTop:', res.bottom) //
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .exec()
|
|
||||||
// }, 200)
|
|
||||||
// })
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (skuPanelOpen) {
|
if (skuPanelOpen) {
|
||||||
pageRef.current.pageLock()
|
pageRef.current.pageLock()
|
||||||
@@ -145,7 +109,6 @@ function StoreItemList(props) {
|
|||||||
const {
|
const {
|
||||||
list,
|
list,
|
||||||
total_count,
|
total_count,
|
||||||
item_params_list = [],
|
|
||||||
select_tags_list = [],
|
select_tags_list = [],
|
||||||
brand_list
|
brand_list
|
||||||
} = await api.item.search(params)
|
} = await api.item.search(params)
|
||||||
@@ -174,7 +137,6 @@ function StoreItemList(props) {
|
|||||||
tag_id: 0
|
tag_id: 0
|
||||||
}
|
}
|
||||||
].concat(select_tags_list)
|
].concat(select_tags_list)
|
||||||
v.fixTop = fixTop + 34
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -239,30 +201,8 @@ function StoreItemList(props) {
|
|||||||
goodsRef.current.reset()
|
goodsRef.current.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangeBrand = (val) => {
|
|
||||||
setState((draft) => {
|
|
||||||
draft.brandSelect = val
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const onConfirmBrand = async () => {
|
|
||||||
await setState((draft) => {
|
|
||||||
draft.leftList = []
|
|
||||||
draft.rightList = []
|
|
||||||
draft.show = false
|
|
||||||
})
|
|
||||||
goodsRef.current.reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
const onResetBrand = async () => {
|
|
||||||
await setState((draft) => {
|
|
||||||
draft.brandSelect = []
|
|
||||||
draft.leftList = []
|
|
||||||
draft.rightList = []
|
|
||||||
draft.show = false
|
|
||||||
})
|
|
||||||
goodsRef.current.reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleClickStore = (item) => {
|
const handleClickStore = (item) => {
|
||||||
const url = `/subpages/store/index?id=${item.distributor_info.distributor_id}`
|
const url = `/subpages/store/index?id=${item.distributor_info.distributor_id}`
|
||||||
@@ -290,7 +230,6 @@ function StoreItemList(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('page-store-item-list', fixTop)
|
|
||||||
return (
|
return (
|
||||||
<SpPage
|
<SpPage
|
||||||
scrollToTopBtn
|
scrollToTopBtn
|
||||||
@@ -330,9 +269,6 @@ function StoreItemList(props) {
|
|||||||
</View>
|
</View>
|
||||||
<SpScrollView
|
<SpScrollView
|
||||||
className='item-list-scroll'
|
className='item-list-scroll'
|
||||||
style={styleNames({
|
|
||||||
marginTop: `${fixTop}px`
|
|
||||||
})}
|
|
||||||
ref={goodsRef}
|
ref={goodsRef}
|
||||||
fetch={fetch}
|
fetch={fetch}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user