<template>
	<view>
		<u-navbar title="操作指南"></u-navbar>
		<view class="collapse">
			<u-collapse v-if="itemList.length">
				<u-collapse-item :title="item.title" v-for="(item, index) in itemList" :key="index">
					{{item.content}}
				</u-collapse-item>
			</u-collapse>
		</view>
	</view>
</template>

<script>
	import * as API from '@/apis/user.js'
	
	export default {
		data() {
			return {
				itemList: [],
			}
		},
		onReady() {
			this.getHomePage()
		},
		methods: {
			getHomePage(){
						uni.showLoading({
							title: "加载中",
							mask: true,
						})
						API.helpList({
							category:2
						}).then((res) => {
							this.itemList = res.data.helpList
						
						
							uni.hideLoading()
							
						}).catch(error => {
							uni.showToast({
								title: error
							})
						})
					}
		}
	}
</script>
<style>
	page{
		background-color: #F7F7F7;
	}
</style>
<style lang="scss" scoped>
	.collapse{
		background-color: #fff;
		padding:10px;
	}
</style>
