<template>
	<view>
		<view>
			{{yhName}}
		</view>
		<view v-for="(item,index) in biaoqingList" :key="index" >
			<view @click="goZhuantiInfo(item)">{{item.name}}</view>
			<view >{{item.icon}}</view>
		</view>

		<CustomTabBar :currentTabNumber="1"></CustomTabBar>
	</view>

</template>

<script setup>
	import {
		toast,
		getUserIdentity
	} from "@/utils/common";
	import cacheManager from '@/utils/cacheManager.js';
	import {

	} from '@/api/zhuanti.js'

	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
	import {
		reactive,
		ref
	} from "vue";
	import {
		onLoad
	} from '@dcloudio/uni-app';
	const youkeFlag = ref(null);
	const yhName = ref(null);
	const biaoqingList = ref(
		[{
				icon: '',
				name: '开心',
				type: 'kaixin'
			},
			{
				icon: '',
				name: '愤怒',
				type: 'fennu'
			},
			{
				icon: '',
				name: '悲伤',
				type: 'beishang'
			},
			{
				icon: '',
				name: '害怕',
				type: 'haipa'
			},
			{
				icon: '',
				name: '得意',
				type: 'deyi'
			},
			{
				icon: '',
				name: '嫉妒',
				type: 'jidu'
			},
			{
				icon: '',
				name: '压抑',
				type: 'yayi'
			},
			{
				icon: '',
				name: '抱怨',
				type: 'baoyuan'
			}
		]

	)
	onLoad((options) => {
		if (cacheManager.get('auth')) {
			youkeFlag.value = true
			yhName.value = cacheManager.get('auth').realName || ''
		} else {
			// 游客
			youkeFlag.value = false
		}
	})

	function goZhuantiInfo(data) {
		console.log('data', data);
		uni.redirectTo({
			url: '/pages/zhuanti/zhuantiInfo?type='+data.type
		})
	}
</script>