🐞 fix(ID1001458): 【内部商城】-购物车没显示结算按钮-{偶现bug}

【【内部商城】-购物车没显示结算按钮-{偶现bug}】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001458
This commit is contained in:
xuan 2023-03-07 19:19:58 +08:00
parent d0c3b1405b
commit d67d214d46
4 changed files with 45 additions and 45 deletions

View File

@ -5,7 +5,7 @@
justify-content: space-between; justify-content: space-between;
background-color: white; background-color: white;
padding: 16px 24px; padding: 16px 24px;
box-shadow: 0 1px 2px 1px #c2c2c2;
.bottomLeft { .bottomLeft {
margin-left: 12px; margin-left: 12px;
.moneyText { .moneyText {
@ -26,5 +26,4 @@
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
} }
} }

View File

@ -6,37 +6,33 @@
background-color: white; background-color: white;
padding: 16px 24px; padding: 16px 24px;
box-shadow: 0 1px 2px 1px #c2c2c2; box-shadow: 0 1px 2px 1px #c2c2c2;
.bottomLeft{ .bottomLeft {
margin-left: 12px; margin-left: 12px;
.moneyText{ .moneyText {
font-size: 28px; font-size: 28px;
font-family: $font_family; font-family: $font_family;
font-weight: 400; font-weight: 400;
color: rgba($color: #000000, $alpha: 0.6); color: rgba($color: #000000, $alpha: 0.6);
} }
.moneyNumber{ .moneyNumber {
font-size: 28px; font-size: 28px;
font-family: $font_family; font-family: $font_family;
font-weight: 550; font-weight: 550;
color: $color_money; color: $color_money;
} }
} }
.bottomRight{ .bottomRight {
} }
.bottomButton { .bottomButton {
} }
} }
.unit{ .unit {
font-size: 22px; font-size: 22px;
transform: scale(.7); transform: scale(0.7);
margin-right: 10px; margin-right: 10px;
} }
.money{ .money {
font-size: 36px; font-size: 36px;
} }

View File

@ -8,12 +8,17 @@
} }
&--context { &--context {
justify-content: space-between; justify-content: space-between;
overflow: hidden;
height: 100%; height: 100%;
.shopping__list__container{ .shopping__list__container {
flex: 0 1 auto; flex: 0 1 auto;
overflow: hidden; overflow: hidden;
} }
} }
.bottomBar{
position: relative;
z-index: 999;
}
} }
.flexBox { .flexBox {
display: flex; display: flex;

View File

@ -90,21 +90,21 @@ const ShoppingCartContainer: FC = () => {
console.log('useLayoutEffect') console.log('useLayoutEffect')
await fetchData(getFilterData(searchOptions)) await fetchData(getFilterData(searchOptions))
isFirst.current = false isFirst.current = false
const query = Taro.createSelectorQuery() // const query = Taro.createSelectorQuery()
console.log('query', query) // console.log('query', query)
query.select('#shoppingContainer').boundingClientRect() // query.select('#shoppingContainer').boundingClientRect()
query.select('#topBar').boundingClientRect() // query.select('#topBar').boundingClientRect()
query.select('#bottomBar').boundingClientRect() // query.select('#bottomBar').boundingClientRect()
query.exec((res) => { // query.exec((res) => {
console.log('res==>', res) // console.log('res==>', res)
const containerHeight = res[0].height // const containerHeight = res[0].height
const topBarHeight = res[1].height // const topBarHeight = res[1].height
const bottomBarHeight = res[2].height // const bottomBarHeight = res[2].height
const listHeight = containerHeight - topBarHeight - bottomBarHeight // const listHeight = containerHeight - topBarHeight - bottomBarHeight
listHeightRef.current = `${listHeight}px` // listHeightRef.current = `${listHeight}px`
// 强制刷新 // // 强制刷新
setForceUpdate({}) // setForceUpdate({})
}) // })
})() })()
}, []) }, [])
@ -222,7 +222,7 @@ const ShoppingCartContainer: FC = () => {
</View> </View>
<View className={classnames('flex-item', 'flex-col', styles['shopping--context'])}> <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 }}> <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?.length
&& shoppingCartData?.list?.map((item, index) => { && shoppingCartData?.list?.map((item, index) => {
@ -231,8 +231,7 @@ const ShoppingCartContainer: FC = () => {
} }
</InfiniteScroll> </InfiniteScroll>
</View> </View>
</View> <View className={styles.bottomBar}>
<View id="bottomBar">
{isManageStatus {isManageStatus
? ( ? (
<BottomEditBar <BottomEditBar
@ -247,6 +246,7 @@ const ShoppingCartContainer: FC = () => {
)} )}
</View> </View>
</View> </View>
</View>
) )
} }
export const Shopping: FC = () => { export const Shopping: FC = () => {