<template>
	<el-layout>
		<el-navbar :placeholder="true" :fixed="true" :autoBack="true" :border="true" title="帮助中心"></el-navbar>
		
		<view class="wrapper">
			
			<view class="list-wrap">
				
				<view class="list-box" v-for="(value,index) in list" :key="index" @click="navigateTo(`pages/ucenter/help/detail?id=${value.id}`)">
					<view>{{ value.title }}</view>
					<view>
						<uni-icons type="right" color="#999"></uni-icons>
					</view>
				</view>
				
			</view>
			
		</view>
	</el-layout>
</template>

<script setup>
	import { ref } from "vue";
	import { onLoad } from "@dcloudio/uni-app";
	import { navigateTo } from "@/el-ui/libs/navigate.js"
	
	const list = ref([]);
	onLoad(()=>{
		uni.$http.get("ucenter.help/index").then(res=>{
			if(res.code){
				list.value = res.data;
			}
		});
	});
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}
	.wrapper {
		padding: 20rpx;
		.list-wrap {
			.list-box {
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				height: 80rpx;
				line-height: 80rpx;
				color: #333;
				font-size: 30rpx;
				border-bottom: 2rpx solid #eee;
				&:last-child {
					border-bottom: 0;
				}
			}
		}
	}
</style>