🐞 fix(ID1001458): 【内部商城】-购物车没显示结算按钮-{偶现bug}
【【内部商城】-购物车没显示结算按钮-{偶现bug}】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001458
This commit is contained in:
parent
d0c3b1405b
commit
d67d214d46
@ -5,7 +5,7 @@
|
||||
justify-content: space-between;
|
||||
background-color: white;
|
||||
padding: 16px 24px;
|
||||
|
||||
box-shadow: 0 1px 2px 1px #c2c2c2;
|
||||
.bottomLeft {
|
||||
margin-left: 12px;
|
||||
.moneyText {
|
||||
@ -26,5 +26,4 @@
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,37 +6,33 @@
|
||||
background-color: white;
|
||||
padding: 16px 24px;
|
||||
box-shadow: 0 1px 2px 1px #c2c2c2;
|
||||
.bottomLeft{
|
||||
margin-left: 12px;
|
||||
.moneyText{
|
||||
.bottomLeft {
|
||||
margin-left: 12px;
|
||||
.moneyText {
|
||||
font-size: 28px;
|
||||
font-family: $font_family;
|
||||
font-weight: 400;
|
||||
color: rgba($color: #000000, $alpha: 0.6);
|
||||
}
|
||||
.moneyNumber{
|
||||
|
||||
.moneyNumber {
|
||||
font-size: 28px;
|
||||
font-family: $font_family;
|
||||
font-weight: 550;
|
||||
color: $color_money;
|
||||
}
|
||||
}
|
||||
.bottomRight{
|
||||
|
||||
.bottomRight {
|
||||
}
|
||||
|
||||
|
||||
.bottomButton {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.unit{
|
||||
.unit {
|
||||
font-size: 22px;
|
||||
transform: scale(.7);
|
||||
transform: scale(0.7);
|
||||
margin-right: 10px;
|
||||
}
|
||||
.money{
|
||||
.money {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
@ -8,12 +8,17 @@
|
||||
}
|
||||
&--context {
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
.shopping__list__container{
|
||||
.shopping__list__container {
|
||||
flex: 0 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.bottomBar{
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
.flexBox {
|
||||
display: flex;
|
||||
|
||||
@ -90,21 +90,21 @@ const ShoppingCartContainer: FC = () => {
|
||||
console.log('useLayoutEffect')
|
||||
await fetchData(getFilterData(searchOptions))
|
||||
isFirst.current = false
|
||||
const query = Taro.createSelectorQuery()
|
||||
console.log('query', query)
|
||||
query.select('#shoppingContainer').boundingClientRect()
|
||||
query.select('#topBar').boundingClientRect()
|
||||
query.select('#bottomBar').boundingClientRect()
|
||||
query.exec((res) => {
|
||||
console.log('res==>', res)
|
||||
const containerHeight = res[0].height
|
||||
const topBarHeight = res[1].height
|
||||
const bottomBarHeight = res[2].height
|
||||
const listHeight = containerHeight - topBarHeight - bottomBarHeight
|
||||
listHeightRef.current = `${listHeight}px`
|
||||
// 强制刷新
|
||||
setForceUpdate({})
|
||||
})
|
||||
// const query = Taro.createSelectorQuery()
|
||||
// console.log('query', query)
|
||||
// query.select('#shoppingContainer').boundingClientRect()
|
||||
// query.select('#topBar').boundingClientRect()
|
||||
// query.select('#bottomBar').boundingClientRect()
|
||||
// query.exec((res) => {
|
||||
// console.log('res==>', res)
|
||||
// const containerHeight = res[0].height
|
||||
// const topBarHeight = res[1].height
|
||||
// const bottomBarHeight = res[2].height
|
||||
// const listHeight = containerHeight - topBarHeight - bottomBarHeight
|
||||
// listHeightRef.current = `${listHeight}px`
|
||||
// // 强制刷新
|
||||
// setForceUpdate({})
|
||||
// })
|
||||
})()
|
||||
}, [])
|
||||
|
||||
@ -222,7 +222,7 @@ const ShoppingCartContainer: FC = () => {
|
||||
</View>
|
||||
<View className={classnames('flex-item', 'flex-col', styles['shopping--context'])}>
|
||||
<View id="shoppingListContainer" className={classnames(styles.shopping__list__container, 'flex-item')} style={{ height: listHeightRef.current }}>
|
||||
<InfiniteScroll statusMore={statusMore} refresherEnabled selfOnRefresherRefresh={handleRefresh} refresherTriggered={refreshStatus}>
|
||||
<InfiniteScroll safeAreaInsetBottom={false} statusMore={statusMore} refresherEnabled selfOnRefresherRefresh={handleRefresh} refresherTriggered={refreshStatus}>
|
||||
{
|
||||
!!shoppingCartData?.list?.length
|
||||
&& shoppingCartData?.list?.map((item, index) => {
|
||||
@ -231,20 +231,20 @@ const ShoppingCartContainer: FC = () => {
|
||||
}
|
||||
</InfiniteScroll>
|
||||
</View>
|
||||
</View>
|
||||
<View id="bottomBar">
|
||||
{isManageStatus
|
||||
? (
|
||||
<BottomEditBar
|
||||
disabled={currentCheckedPurchaserId < 0}
|
||||
isSelectAll={isMultipleSelection}
|
||||
onDelete={handleDelete}
|
||||
onSelectCheckbox={isAll => handleSelectAllCheckbox(isAll)}
|
||||
></BottomEditBar>
|
||||
)
|
||||
: (
|
||||
<BottomSettleBar onSettleAccount={handleSettleAccount} amount={selectedAmount}></BottomSettleBar>
|
||||
)}
|
||||
<View className={styles.bottomBar}>
|
||||
{isManageStatus
|
||||
? (
|
||||
<BottomEditBar
|
||||
disabled={currentCheckedPurchaserId < 0}
|
||||
isSelectAll={isMultipleSelection}
|
||||
onDelete={handleDelete}
|
||||
onSelectCheckbox={isAll => handleSelectAllCheckbox(isAll)}
|
||||
></BottomEditBar>
|
||||
)
|
||||
: (
|
||||
<BottomSettleBar onSettleAccount={handleSettleAccount} amount={selectedAmount}></BottomSettleBar>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user