🐞 fix(ID1001456): 【内部商城】-商品详情搜索没有的颜色时,一直显示加载

This commit is contained in:
xuan 2023-03-07 10:16:27 +08:00
parent 9a406901b9
commit 90e2a79e6c
3 changed files with 10 additions and 10 deletions

View File

@ -119,6 +119,8 @@
align-items: center;
width: 100%;
justify-content: center;
font-size: 26px;
color: #ccc;
}
.posBox {

View File

@ -191,12 +191,10 @@ const ShoppingCart = (props: prosObj, ref) => {
</>
)}
{goodList.length === 0 && (
<>
<View className={styles.loading_more}>
<DotLoading />
</View>
</>
<View className={styles.loading_more}>
{/* <DotLoading /> */}
</View>
)}
{!hasBottom && <View style={{ height: '100rpx' }}></View>}
{/* <View className={classnames(hasBottom === true ? styles.posBox : styles.noBottom)}> */}

View File

@ -10,7 +10,7 @@ import { goLink } from '@/common/common'
import { KindListApi, ProductListApi } from '@/api/index'
// import useLogin from '@/use/useLogin'
import { ClientListApi, MpProductColorList, MpShoppingCartProductColorList } from '@/api/order'
import { dataLoadingStatus, getFilterData } from '@/common/util'
import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
const Index = () => {
const product_kind_id_ref = useRef(0)
@ -234,9 +234,9 @@ const Index = () => {
}, [goodList])
// 输入了搜索关键字
const getSearchData = useCallback((eq) => {
const getSearchData = debounce((eq) => {
setSearchObj(e => ({ ...e, code_or_name: eq }))
}, [])
}, 300)
// 加入购物车
const { fetchData: preViewFetch } = MpShoppingCartProductColorList()
@ -402,7 +402,7 @@ const Index = () => {
handPlus={item => handPlus(item)}
obj={goodObj}
ref={ShopCartRef}
getSearchData={(e) => { getSearchData(e) }}
getSearchData={getSearchData}
onBlur={(e, id) => onBlur(e, id)}
reduceNums={(item) => { reduceNums(item) }}
addNums={(item) => { handAdd(item) }}