<template>
	<view class="w-body" v-if="authStore.isLogin">
		<w-public />
		<w-navbar fixed :title="$env.title"></w-navbar>
		<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback">
		
		</mescroll-body>
		<c-tabbar />
	</view>
</template>

<script setup>
import { onShow } from '@dcloudio/uni-app'
import { getCurrentInstance, ref, computed } from 'vue';


import { useAuthStore } from '@/store';

const authStore = useAuthStore();

const { proxy } = getCurrentInstance();

const init = async () => {
}

onShow(() => {
	
});

//分页逻辑
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"

const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom)

const upCallback = (mescroll) => {
	init();
	mescroll.endSuccess(1, true);
};


onShow(init);
</script>

<style lang="scss" scoped>
.w-index-page {
	min-height: 100vh;
	background-color: var(--w-bg);
	color: var(--w-text);
	font-size: .9rem;
}
</style>