From 8936876c8f08a6596cdc9337774ce2441ccd4735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=81=B0=E7=81=B0?= Date: Tue, 27 Sep 2022 22:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=A8=A1=E6=9D=BF=E5=BA=93=E5=86=85=E7=82=B9=E9=A4=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=A0=B7=E5=BC=8F=E6=95=88=E6=9E=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/template/diancan/list/list.scss | 2 +- .../pages/template/diancan/list/list.vue | 50 ++++++++++++------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.scss b/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.scss index dc53c9d1..59c57426 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.scss +++ b/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.scss @@ -73,7 +73,7 @@ } -.cart-box { position: absolute; bottom: 30rpx; left: 30rpx; right: 30rpx; height: 96rpx; border-radius: 48rpx; box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); background-color: #FFFFFF; display: flex; align-items: center; justify-content: space-between; z-index: 10; +.cart-box { position: fixed; bottom: 30rpx; left: 30rpx; right: 30rpx; height: 96rpx; border-radius: 48rpx; box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); background-color: #FFFFFF; display: flex; align-items: center; justify-content: space-between; z-index: 10; .cart-img { width: 96rpx; height: 96rpx; position: relative; margin-top: -48rpx; } .pay-btn { height: 100%; padding: 0 30rpx; color: #FFFFFF; border-radius: 0 50rpx 50rpx 0; display: flex; align-items: center; font-size: 28rpx; } .mark { padding-left: 46rpx; margin-right: 30rpx; position: relative; diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.vue b/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.vue index 488edcb7..d40acd7b 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/template/diancan/list/list.vue @@ -41,7 +41,7 @@ - + @@ -50,14 +50,11 @@ - - + - - @@ -74,10 +71,8 @@ - - @@ -85,16 +80,7 @@ - - - - - {{cartNums}} - - ¥{{cartMoney}} - - - + + + + + + + {{cartNums}} + + ¥{{cartMoney}} + + + @@ -123,7 +120,6 @@ menuScrollIntoView: '', good: {}, currentCateId: 0,//默认分类 - scrollTop: 0, loadStatus: 'loadmore', loadIconType: 'flower', loadText: { @@ -141,6 +137,9 @@ skuMode: 1, // 后端返回的商品信息 goodsSkuInfo: {}, + + headerH: 0, + scorllH: 0, //滚动区域全屏 } }, computed: { @@ -166,6 +165,20 @@ }, }, onShow() { + uni.getSystemInfo({ + success: (e) => { + // #ifndef MP + this.StatusBar = e.statusBarHeight; + if (e.platform == 'android') { + this.headerH = e.statusBarHeight + 50; + } else { + this.headerH = e.statusBarHeight + 45; + }; + // #endif + this.scorllH = e.windowHeight - e.statusBarHeight - 180; + } + }) + this.categories(); // 获取购物车数量 this.getCartNums(); @@ -315,7 +328,6 @@ this.page = 1; this.goodsList = []; this.getGoods(); - //this.$nextTick(() => this.cateScrollTop = this.goods.find(item => item.id == id).top) }, categories() { this.$u.api.categories().then(res => {