<template>
	<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
		<template v-slot:left>
			<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
		</template>
		<template v-slot:center>
			<text style="color:#ffffff">{{title}}</text>
		</template>
	</uv-navbar>
	<view class="bg-white">
		<uv-cell-group>
			<uv-cell @click="gopage('/pages/customer/index')" icon="http://sys.znkjfw.com/imgs/crmimages/19.png" title="待跟进客户"
				iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
				<template v-slot:right-icon>
					<view class="flex align-center">
						<uv-badge type="error" max="99" :value="indexCount.followCustomerCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
			<uv-cell isLink url="/pages/components/pages/clues/index" icon="http://sys.znkjfw.com/imgs/crmimages/17.png"
				title="待跟进线索" iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
				<template v-slot:right-icon>
					<view class="flex align-center">
						<uv-badge type="error" max="99" :value="indexCount.followCluesCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
			<uv-cell isLink url="/pages/components/pages/business/index" icon="http://sys.znkjfw.com/imgs/crmimages/18.png"
				title="待跟进商机" iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
				<template v-slot:right-icon>
					<view class="flex align-center">
						<uv-badge type="error" max="99" :value="indexCount.followBusinessCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
		</uv-cell-group>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		useMainStore
	} from '@/store/store'
	import {
		storeToRefs
	} from 'pinia'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	const main = useMainStore()
	const {
		indexCount
	} = storeToRefs(main)
	const title = ref('待办事项')

	const gopage = (url) => {
		uni.switchTab({
			url
		})
	}
</script>

<style lang="scss">

</style>