<template>

	<view class="container">
		<!-- 轮播图 -->
		<swiper class="swiper-container" indicator-dots="true" autoplay="true" interval="3000" circular="true">
			<swiper-item>
				<image class="swiper-image" src="" />
			</swiper-item>
			<swiper-item>
				<image class="swiper-image" src="" />
			</swiper-item>
			<swiper-item>
				<image class="swiper-image" src="" />
			</swiper-item>
		</swiper>

		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="handleClick">整车仓库前端</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="detectionEcuClick">测试中控</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="qrcodeClick">更换二维码</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="handleClick">车辆签收</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="ecuunbindClick">解绑中控</button>
		</view>
		<view>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="bindhelmetClick">绑定头盔</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="wholeClick">整车绑定</button>
		</view>
		<!-- 按钮 -->
		<view class="ebikelistclass">
			<button @click="blueClick">蓝牙扫码</button>
		</view>

	</view>

</template>

<script>
	import * as api from '@/utils/api.js';
	export default {
		methods: {
			handleClick() {
				console.log('电动车列表按钮被点击');
				// 跳转到电动车列表页面
				uni.navigateTo({
					url: "/pages/warehouse/ebikehouse/ebikelist"
				});
			},
			wholeClick() {
				uni.navigateTo({
					url: "/pages/warehouse/wholebind/wholebind"
				});
				// api.callCoreApi("online", { "ecuId" : "259806157202280448" }, 'get').then((res) => {
				// 		console.log("apiapiapiapiapiapiapiapi" ,res);
				// });
			},
			ecuunbindClick() {
				uni.navigateTo({
					url: "/pages/warehouse/ecuunbind/ecuunbindlist"
				});
			},
			qrcodeClick() {
				uni.navigateTo({
					url: "/pages/warehouse/qrcodereplace/qrcodereplace"
				});
			},
			detectionEcuClick() {
				uni.navigateTo({
					url: "/pages/warehouse/detectionecu/detectionecu"
				});
			},
			blueClick() {
				uni.navigateTo({
					url: "/pages/warehouse/bluetooth/bluetoothscan"
				});
			},
			bindhelmetClick() {
				uni.navigateTo({
					url: "/pages/warehouse/bindhelmet/bindhelmet"
				});
			}

		}
	};
</script>

<style scoped>
	.container {
		padding: 20px;
		text-align: center;
	}

	.swiper-container {
		width: 100%;
		height: 300px;
	}

	.swiper-image {
		width: 100%;
		height: 100%;
	}

	.ebikelistclass {
		margin-top: 20%;
	}
</style>