<template>
	<view>
		<view>
			<view @click="handleBack"><</view>
			<view>选择版本</view>
		</view>
		
		<view v-for="item in data.banbenList" :key="item.id">
			<!-- 封面 -->
			<image :src="item.cover" mode=""></image>
			<!-- 名称+等级 -->
			<view>{{item.chanpinName}} {{item.dengjiName}}</view>
			<!-- 版本名称 -->
			<view>{{item.name}}</view>
			
			<view>播放按钮</view>
		</view>
	</view>
	<footTabbarVue :currentTabNumber="0"></footTabbarVue>
</template>

<script setup>
	import {reactive} from "vue";
	import {onLoad} from "@dcloudio/uni-app"
	import * as shuxueHttp from "@/api/chanpinShuxue.js"
	import footTabbarVue from "./components/footTabbar.vue";
	
	const data = reactive({
		dengjiId: null,
		banbenList: []
	})
	function getBanbenList() {
		shuxueHttp.getShuxueChanpinBanbenList({dengjiId: data.dengjiId}).then(res => {
			data.banbenList = res.data;
		})
	}
	
	function handleBack() {
		uni.navigateBack()
	}
	
	onLoad((options) => {
		data.dengjiId = options.dengjiId;
		getBanbenList();
	})
	
	
</script>

<style>

</style>
