<template>
	<view class="content">
		<!-- <BackButton />
		<view class="">
			园门修真转
		</view> -->

		<scroll-view scroll-y="true"  @scroll="handleScroll" :scroll-top="scrollTop" :show-scrollbar="false">
			<view class="chapter" v-for="item in directoryList" :key="item.chapterId" @click="changePlay">
				<view class="">
					{{item.name}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import directoryModule from './components/directory.js'
	// 正确解构 directoryList
	const directoryListJs = directoryModule.chaptersList || directoryModule.default?.chaptersList || [];
	export default {
		data() {
			return {
				directoryList: directoryListJs,
			}
		},
		methods: {
			changePlay(){
				uni.navigateTo({
					url:'/subPackages/other/playNovel'
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.content{
		padding: 30rpx;
		background: #595959;
		color: #fff;
		.chapter{
			padding-bottom: 30rpx;
			font-size: 28rpx;
		}
	}
</style>