mall.vue 802 字节
<template>
	<view class="mall_container">
		<!-- 头部模块 -->
		<MallHeared />
		<!-- 商品展示 -->
		<MallSelect :scrollHeight="scrollHeight" />
	</view>
</template>

<script>
	import { rpx2px } from '@/utils/util.js'
	import MallSelect from '@/components/mall/mallSelect.vue'
	import MallHeared from '@/components/mall/mallHeared.vue'
	export default {
		components: { MallHeared, MallSelect },
		data() {
			return {
				scrollHeight: 0, // 计算当前可用高度
			};
		},
		onLoad() {
			this.setListHeight()
		},
		methods: {
			// 设置列表内容的高度
			setListHeight() {
			  const { windowHeight } = uni.getSystemInfoSync()
			  this.scrollHeight = windowHeight - rpx2px(700)
			},
		}
	}
</script>

<style lang="scss" scoped>
.mall_container{
	min-height: 100vh;
}
</style>