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 => {