<!-- 蓝牙平台限制 todo https://uniapp.dcloud.io/api/system/bluetooth?id=stopbluetoothdevicesdiscovery -->
<template>
	<view>
		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" title="我的关注" color="#000000" fixed="true" :border="false">
			<view slot="left">
				<view class=" flex align-center margin-left">
					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
				</view>
			</view>

		</uni-nav-bar>

		<view v-if="gameList.length==0" class="text-xs text-center text-gray margin-top">
			<text>下拉刷新列表</text>
		</view>
		<view v-else class="cu-list menu margin-top">
			<view class="cu-item" :class="true?'arrow':''" v-for="(item,index) in gameList" :key="index">
				<view class="content" @tap="_onConnectDevice(item,$event)">
					<image :src="item.icon" mode="aspectFit"></image>
					<text class="text-grey">{{item.name}}</text>
				</view>
			</view>

		</view>
	</view>


</template>

<script>
	import reqUtil from "@/util/util-js/requstUtil.js"
	import config from "@/common/config.js"

	export default {
		data() {
			return {
				gameList: []
			}
		},
		onLoad() {
			// reqUtil.requestData(config.URL.FAVORITESGET).then(res => {
			// 		console.log('FAVORITESADD =====', res);
			// 		if (res.code == 0) {

			// 		}

			// 	},
			// 	e => {
			// 		console.log(e)
			// 	});

			// reqUtil.requestData(config.URL.RECENTLYPLAYINGADD).then(res => {
			// 		console.log('RECENTLYPLAYINGADD =====', res);
			// 		if (res.code == 0) {

			// 		}

			// 	},
			// 	e => {
			// 		console.log(e)
			// 	});

			reqUtil.requestData(config.URL.RECENTLYPLAYINGGET).then(res => {
					console.log('RECENTLYPLAYINGGET =====', res);
					if (res.code == 0) {

					}

				},
				e => {
					console.log(e)
				});


		},
		methods: {

			onPullDownRefresh(e) {
				reqUtil.requestData(config.URL.FAVORITESGET).then(res => {
						console.log('FAVORITESADD =====', res);
						if (res.code == 0) {

						}

					},
					e => {
						console.log(e)
					});
			},
			onBack(){
				uni.navigateBack({
					delta:1
				})
			}
		}

	}
</script>

<style>
</style>
