diff --git a/.local.config.js b/.local.config.js index 3eca70d..4c7c24a 100644 --- a/.local.config.js +++ b/.local.config.js @@ -216,7 +216,7 @@ const localDevConfig = ({ // })['local-11']; // 选择要使用的环境配置 // })['2811']; // 本地 -})['2709']; // 本地 +})['2821']; // 本地 // })['local-2']; // 本地 // })['local-11']; // 本地 // })['1-test']; // test diff --git a/components-diy/diy-category-item.vue b/components-diy/diy-category-item.vue index e379dc9..71c4907 100644 --- a/components-diy/diy-category-item.vue +++ b/components-diy/diy-category-item.vue @@ -57,7 +57,8 @@ {{ one.category_name }} - + @@ -94,7 +95,8 @@ {{ category.category_name }} - + @@ -160,7 +162,8 @@ {{ category.category_name }} - + @@ -1935,6 +1938,11 @@ export default { align-items: stretch; } + // 双列模式(视图切换): 两列窄卡 + &.double-column .goods-item { + width: calc(50% - 10rpx) !important; + } + // 图片: 占满卡片宽度, 自适应高度(类似 banner) .goods-img { width: 100%; @@ -2190,6 +2198,44 @@ export default { padding: 0; } + // 双列模式(点击搜索框右侧视图切换): 两列竖卡片(图上文下); 单列保持横卡片(图左文右) + &.double-column { + .goods-item { + width: calc(50% - 10rpx) !important; + flex-direction: column; + padding: 0; + } + + .goods-img { + width: 100%; + height: 0; + padding-top: 100%; + margin-right: 0; + border-radius: 12rpx 12rpx 0 0; + + image { + border-radius: 12rpx 12rpx 0 0; + } + } + + .info-wrap { + padding: 0 16rpx 16rpx; + } + + // 竖卡片下价格不再给右侧按钮留位 + .price-wrap { + padding-right: 0; + } + + // 加购/选规格按钮从绝对定位改为信息区底部右侧 + .footer-wrap { + position: static; + margin-top: 12rpx; + display: flex; + justify-content: flex-end; + } + } + // 右侧+按钮 / 择规格按钮 .right-wrap { display: flex; diff --git a/components-diy/diy-category.vue b/components-diy/diy-category.vue index 942d1a5..aa619f6 100644 --- a/components-diy/diy-category.vue +++ b/components-diy/diy-category.vue @@ -11,6 +11,9 @@ confirm-type="search" @tap.stop="onClickSearch()" disabled="true" /> + +