diff --git a/components/common/product-seckill-card.vue b/components/common/product-seckill-card.vue index 9698248..462c047 100644 --- a/components/common/product-seckill-card.vue +++ b/components/common/product-seckill-card.vue @@ -180,7 +180,7 @@ export default { background-color: #ffffff; border-radius: 24rpx; margin-bottom: 20rpx; - width: 100%; + width: 700rpx; } .seckill_card_left { diff --git a/pages/home/home.vue b/pages/home/home.vue index c95cdd2..bec7ee3 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -261,23 +261,23 @@ export default { newsShow: false, // 是否显示公告弹窗 seckillGoodsList: [], // 秒杀商品列表 superGoodsList: [], // 超级补贴商品列表 - homeActivedList: [ - { - id: 2, - title: "活动预告", - title_text: "限时秒杀", - title_icon: "https://static.tbmall.xin/static/new-home/home_10.png", - path: "limited-time", - rightText: "专属补贴 . 低价秒杀", - activedType: "seckill", - }, { - id: 1, - title: "超级补贴", - title_icon: "https://static.tbmall.xin/static/new-home/home_9.png", - path: "super-subsidy", - rightText: "官方补贴 .100%正品", - activedType: "super", - } + homeActivedList: [{ + id: 1, + title: "超级补贴", + title_icon: "https://static.tbmall.xin/static/new-home/home_9.png", + path: "super-subsidy", + rightText: "官方补贴 .100%正品", + activedType: "super", + }, + { + id: 2, + title: "活动预告", + title_text: "限时秒杀", + title_icon: "https://static.tbmall.xin/static/new-home/home_10.png", + path: "limited-time", + rightText: "专属补贴 . 低价秒杀", + activedType: "seckill", + } ], // 首页活动列表 activedTabId: "seckill", // 当前选中的活动类型 attributes: {}, @@ -341,13 +341,11 @@ export default { const menuButtonLeft = menuButton.left; const windowWidth = systemInfo.windowWidth; - // Calculate padding-right to avoid the capsule button (add extra margin of 10px) - const paddingRight = windowWidth - menuButtonLeft + 10; - - // Dynamic styles for MP + // Calculate top offset below capsule button specifically for WeChat Mini Program + const headerTop = menuButtonTop + menuButtonHeight + 8; this.mpHeaderStyle = { - paddingTop: `${menuButtonTop}px`, - paddingRight: `${paddingRight}px`, + paddingTop: `${headerTop}px`, + paddingRight: '15px', paddingBottom: '10px', paddingLeft: '15px', height: `${menuButtonHeight}px`, @@ -363,7 +361,7 @@ export default { alignItems: 'center' }; - const warpPaddingTop = menuButtonTop + menuButtonHeight + 15; + const warpPaddingTop = headerTop + menuButtonHeight; this.mpHeaderWarpStyle = { paddingTop: `${warpPaddingTop}px` }; @@ -767,9 +765,8 @@ export default { background: linear-gradient(270deg, #af39c4 0%, #7732ff 100%); padding: calc(var(--status-bar-height) + 20rpx) 30rpx 20rpx; box-sizing: border-box; - /* 解决部分机型下 fixed 定位底部出现 1px 渲染缝隙(白线)的问题 */ - border-bottom: 1px solid transparent; - border-image: linear-gradient(270deg, #af39c4 0%, #7732ff 100%) 1; + /* 消除 fixed 定位与下方重叠层之间的 1px GPU 子像素渲染缝隙(白线) */ + box-shadow: 0 2rpx 0 #9336df; } .header_right_warp { diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index 9bc3d15..717f10a 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -454,18 +454,17 @@ export default { const menuButton = uni.getMenuButtonBoundingClientRect(); const sysInfo = uni.getSystemInfoSync(); if (menuButton && menuButton.top && menuButton.top > 0) { - paddingTop = (menuButton.top + 2) + 'px'; - if (sysInfo && sysInfo.windowWidth && menuButton.left) { - paddingRight = (sysInfo.windowWidth - menuButton.left + 10) + 'px'; - } + const menuButtonHeight = menuButton.height || 32; + paddingTop = (menuButton.top + menuButtonHeight + 12) + 'px'; + paddingRight = '30rpx'; } else { const statusBarHeight = (sysInfo && sysInfo.statusBarHeight) || 20; - paddingTop = (statusBarHeight + 10) + 'px'; - paddingRight = '96px'; + paddingTop = (statusBarHeight + 54) + 'px'; + paddingRight = '30rpx'; } } catch (e) { - paddingTop = '90rpx'; - paddingRight = '96px'; + paddingTop = '180rpx'; + paddingRight = '30rpx'; } // #endif diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index 210fb13..b0c3cde 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -3,8 +3,10 @@ - + + + + @@ -534,10 +538,13 @@ export default { const res = await uni.getImageInfo({ src: imgUrl }); - const ratio = res.height / res.width; - this.swiperHeight = Math.round(750 * ratio); + if (res && res.width && res.height) { + const ratio = res.height / res.width; + this.swiperHeight = Math.round(750 * ratio); + } } catch (e) { console.error('calcSwiperHeight error:', e); + this.swiperHeight = 750; } }, @@ -975,9 +982,10 @@ export default { this.isShowCart = this.activedType === 'seckill' || data.type == 3 ? 1 : 0; // 商品图 if (data.goodsGraph) { - this.swiperList = data.goodsGraph.split(","); + this.swiperList = data.goodsGraph.split(",").map(item => item.trim()).filter(Boolean); this.calcSwiperHeight(); } + console.log('----', data.goodsGraph, this.swiperList) data.addressObj = {}; // 收件人地址 data.quantity = 1; // 数量 data.inventory = 0; // 库存 @@ -1382,6 +1390,12 @@ export default { border-radius: 16rpx !important; } +::v-deep(.u-swiper__wrapper) { + .u-swiper__wrapper__item__wrapper { + height: 100%; + } +} + .product_info_warp { min-height: 100vh; background-color: $app-bj; diff --git a/pages/rwa_package/shop/fen-shop.vue b/pages/rwa_package/shop/fen-shop.vue index aa8e170..7a9e16d 100644 --- a/pages/rwa_package/shop/fen-shop.vue +++ b/pages/rwa_package/shop/fen-shop.vue @@ -12,12 +12,12 @@ - + {{ item.label }} - + \ No newline at end of file diff --git a/pages/shopping_cart/shopping_cart.vue b/pages/shopping_cart/shopping_cart.vue index 2b0700f..fb348cc 100644 --- a/pages/shopping_cart/shopping_cart.vue +++ b/pages/shopping_cart/shopping_cart.vue @@ -441,6 +441,9 @@ export default { .shopping_cart_warp { background-color: $app-bj; padding: 104rpx 30rpx 0; + /* #ifdef MP-WEIXIN */ + padding-top: calc(var(--status-bar-height) + 140rpx) !important; + /* #endif */ overflow: hidden; height: 100%; display: flex; diff --git a/pages/supply_chain/supply_chain.vue b/pages/supply_chain/supply_chain.vue index fd7ecb2..5b17f56 100644 --- a/pages/supply_chain/supply_chain.vue +++ b/pages/supply_chain/supply_chain.vue @@ -17,10 +17,10 @@ }">{{ item.name }} - - - + + + @@ -32,9 +32,9 @@ style="margin-top: 24rpx" /> - + - + @@ -55,6 +55,16 @@ import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"; export default { mixins: [MescrollMixin], components: { Header, TopSafe, MyBtn, PingItem, CustomTabBar, MescrollUni }, + computed: { + mescrollTop() { + // #ifdef MP-WEIXIN + return '420rpx'; + // #endif + // #ifndef MP-WEIXIN + return '336rpx'; + // #endif + }, + }, data() { return { dataList: [], @@ -241,7 +251,7 @@ export default { .content-two { height: calc(100vh); padding-top: 80rpx; - background-color: #fff; + background-color: #fff; // background-color: $app-bj; } @@ -328,19 +338,14 @@ export default { .setting-view { width: 100%; - height: calc(100vh - 88rpx - 80rpx - 100rpx - var(--status-bar-height)); - display: flex; flex-direction: column; align-items: center; - overflow-y: auto; - padding: 0 32rpx; + padding: 0 32rpx 40rpx; box-sizing: border-box; - position: relative; .name-box { width: 100%; - height: calc(100vh - 88rpx - 80rpx - 100rpx - var(--status-bar-height)); display: flex; flex-direction: column; align-items: center;