🐞 fix(ID1001456): 【内部商城】-商品详情搜索没有的颜色时,一直显示加载
This commit is contained in:
parent
9a406901b9
commit
90e2a79e6c
@ -119,6 +119,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posBox {
|
.posBox {
|
||||||
|
|||||||
@ -191,12 +191,10 @@ const ShoppingCart = (props: prosObj, ref) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{goodList.length === 0 && (
|
{goodList.length === 0 && (
|
||||||
<>
|
<View className={styles.loading_more}>
|
||||||
<View className={styles.loading_more}>
|
暂无更多
|
||||||
加载中
|
{/* <DotLoading /> */}
|
||||||
<DotLoading />
|
</View>
|
||||||
</View>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{!hasBottom && <View style={{ height: '100rpx' }}></View>}
|
{!hasBottom && <View style={{ height: '100rpx' }}></View>}
|
||||||
{/* <View className={classnames(hasBottom === true ? styles.posBox : styles.noBottom)}> */}
|
{/* <View className={classnames(hasBottom === true ? styles.posBox : styles.noBottom)}> */}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { goLink } from '@/common/common'
|
|||||||
import { KindListApi, ProductListApi } from '@/api/index'
|
import { KindListApi, ProductListApi } from '@/api/index'
|
||||||
// import useLogin from '@/use/useLogin'
|
// import useLogin from '@/use/useLogin'
|
||||||
import { ClientListApi, MpProductColorList, MpShoppingCartProductColorList } from '@/api/order'
|
import { ClientListApi, MpProductColorList, MpShoppingCartProductColorList } from '@/api/order'
|
||||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
|
||||||
|
|
||||||
const Index = () => {
|
const Index = () => {
|
||||||
const product_kind_id_ref = useRef(0)
|
const product_kind_id_ref = useRef(0)
|
||||||
@ -234,9 +234,9 @@ const Index = () => {
|
|||||||
}, [goodList])
|
}, [goodList])
|
||||||
|
|
||||||
// 输入了搜索关键字
|
// 输入了搜索关键字
|
||||||
const getSearchData = useCallback((eq) => {
|
const getSearchData = debounce((eq) => {
|
||||||
setSearchObj(e => ({ ...e, code_or_name: eq }))
|
setSearchObj(e => ({ ...e, code_or_name: eq }))
|
||||||
}, [])
|
}, 300)
|
||||||
|
|
||||||
// 加入购物车
|
// 加入购物车
|
||||||
const { fetchData: preViewFetch } = MpShoppingCartProductColorList()
|
const { fetchData: preViewFetch } = MpShoppingCartProductColorList()
|
||||||
@ -402,7 +402,7 @@ const Index = () => {
|
|||||||
handPlus={item => handPlus(item)}
|
handPlus={item => handPlus(item)}
|
||||||
obj={goodObj}
|
obj={goodObj}
|
||||||
ref={ShopCartRef}
|
ref={ShopCartRef}
|
||||||
getSearchData={(e) => { getSearchData(e) }}
|
getSearchData={getSearchData}
|
||||||
onBlur={(e, id) => onBlur(e, id)}
|
onBlur={(e, id) => onBlur(e, id)}
|
||||||
reduceNums={(item) => { reduceNums(item) }}
|
reduceNums={(item) => { reduceNums(item) }}
|
||||||
addNums={(item) => { handAdd(item) }}
|
addNums={(item) => { handAdd(item) }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user