refactor: 更新搜索页面样式和逻辑以支持多端兼容性

- 修改 search.scss 文件,优化样式以适应小程序和 H5/APP-PLUS 端
- 更新 searchPage.vue 文件,调整条件编译指令以支持多端展示
- 移除不必要的计算逻辑,简化代码结构,提高可读性
This commit is contained in:
田香琪
2026-08-10 14:08:01 +08:00
parent 359d1ad24c
commit f51fcad9c2
2 changed files with 25 additions and 80 deletions

View File

@@ -133,14 +133,23 @@ page {
margin-bottom: 20rpx;
}
}
.scoll-page,
.goods-scroll {
.scoll-page {
flex: 1;
min-height: 0;
height: 100%;
box-sizing: border-box;
}
/* #ifdef MP */
.goods-scroll {
flex: 1;
height: 0;
min-height: 0;
width: 100%;
box-sizing: border-box;
}
/* #endif */
.search-navbar-wrap {
box-sizing: border-box;
flex-shrink: 0;
@@ -163,6 +172,12 @@ page {
background: $bg-color;
}
/* #ifdef MP */
.goods-content {
height: 0;
}
/* #endif */
.content {
background-color: $bg-color;
height: 100vh;
@@ -171,14 +186,16 @@ page {
flex-direction: column;
}
/* #ifdef H5 */
/* #ifdef H5 || APP-PLUS */
.content--goods {
display: block;
height: auto;
min-height: 100vh;
overflow: visible;
}
.goods-content--h5 {
display: block;
flex: none;
min-height: auto;
overflow: visible;
@@ -440,6 +457,7 @@ page {
display: flex;
width: 100%;
height: 80rpx;
flex-shrink: 0;
background: #fff;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
z-index: 10;