<template>
	<view class="pages-box">
		<uv-navbar autoBack title="经营数据" placeholder bgColor="transparent" />
		<uv-tabs :list="list" lineWidth="110rpx" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"
			lineColor="#FF0000" />
		<ShopData :business-id="BusinessId" :business-type="BusinessType" />

	</view>
</template>

<script lang="ts" setup>
	import { onMounted, ref } from 'vue';
	import { onLoad } from "@dcloudio/uni-app";
	import ShopData from "./components/ShopData.vue";
	import { getManageDataApi } from "@/api/ShopContent.ts";
	import { businessUserInfo_Api } from "@/api/userInfo.js";
	import { BusinessTypeEnum } from "@/util/Enum.ts";
	const lineColor = ref('#FF0000');
	const activeStyle = { color: '#FF0000', fontSize: '32rpx', fontFamily: 'PingFang SC, PingFang SC-Bold', fontWeight: 700 };
	const inactiveStyle = { color: '#1a1a1a', fontSize: '32rpx', fontFamily: 'PingFang SC, PingFang SC-Regular', fontWeight: 400 }
	const list = [
		{
			name: '店铺数据',
		},
		{
			name: '数据统计',
		}
	]



	const BusinessType = ref(); // 店铺类型
	const BusinessId = ref(); // 店铺ID

	// const getUserBusiness = async () => {
	// 	try {
	// 		const Business = await businessUserInfo_Api();
	// 		console.log('Business = ' , Business)
	// 	} catch (error) {
	// 		//TODO handle the exception
	// 	}
	// }


	// const getManageData = () => {

	// 	getManageDataApi()

	// };

	// onMounted(() => {
	// 	getUserBusiness()
	// })

	onLoad((opt) => {
		const { businessType, businessId } = opt || {}
		BusinessType.value = Number(businessType);
		BusinessId.value = Number(businessId);
	})
</script>

<style lang="scss" scoped>
	:deep(.uni-scroll-view-content) {
		display: flex;
		flex-direction: row;
		justify-content: center;
	}
</style>