<template>
	<view class="content">
		<view class="container">
			<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
			<view class="box_" v-for="(item,index) in guideList" @click="toDetail(item.id)" :key="index">
				<view class="img_">
					<image :src="item.imgUrl" mode=""></image>
				</view>
				<view class="right-box">
					<view class="title-">
						{{item.title}}
					</view>
					<view class="hui-">
						查看次数:{{item.showCount}}
					</view>
					<view class="hui-">
						创建时间:{{item.createDate}}
					</view>
				</view>
			</view>
			<!-- <u-loadmore :status="status" v-if="show == true" /> -->
		</view>

	</view>
</template>

<script>
	import config from '@/config'
	import request from '../../utils/request.js'
	import headers from '../../components/header/headers.vue'

	export default {
		data() {
			return {
				type: '3',
				page: 1,
				limit: 10,
				totalPage: 0,
				guideList: [],
				titles: "指南列表",
				msg: "1",
				dataList: [],
				show: false,
				status: 'loading',
			}
		},
		onShow() {
			this.getGuideList();
		},
		components: {
			headers

		},
		methods: {
			toDetail(id) {

				let url = config.baseUrl + "app/h5/guideDetail?id=" + id
				uni.navigateTo({
					url: '/components/h5/webView?url=' + url
				})
			},
			//指南列表
			getGuideList() {
				request({
					url: '/app/uaBase/guideList',
					method: 'post',
					data: {
						limit: 100000,
						page: this.page,
						type: this.type,
					}
				}).then(res => {
					if (res.data) {

						this.guideList = res.data


					}
				})
			},
			goback() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		background: #f4f5f6;

		height: 100vh;
	}

	.container {
		width: 100%;
		background: #f4f5f6;
		box-sizing: border-box;
		padding-top: 88px;
	}

	.box_ {
		width: 100%;
		display: flex;
		box-sizing: border-box;
		padding: 10px;
		background: #fff;
		justify-content: space-between;
	}

	.title- {
		margin-bottom: 15px;
	}

	.img_ {
		width: 100px;
		height: 100px;
		background: #006b1e;
		border-radius: 4px;
		overflow: hidden;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.right-box {
		width: 70%;

	}

	.hui- {
		color: #838384;
		margin-bottom: 10px;
	}
</style>