<template>
	<view>
		<u-list @scrolltolower="scrolltolower">
			<u-list-item v-for="(item, index) in questionList" :key="index">
				<u-cell :title="item.suggestionTime" @click="gotoDetail(item.id)">
					<u-icon name="arrow-right" slot="icon" color="#606266" size="20"></u-icon>
				</u-cell>
			</u-list-item>
		</u-list>
	</view>
</template>

<script>
	import {
		listSuggestion
	} from '@/api/indexpage/question/index.js'
	export default {
		data() {
			return {
				questionList: [], //问题列表
			};
		},
		mounted() {
			this.getList()
		},
		methods: {
			getList() {
				listSuggestion().then(res => {
					this.questionList = res.rows
					console.log(this.questionList);
				})
			},
			gotoDetail(id) {
				this.$tab.navigateTo(`/pages/mine/question/historyQuestion/detail/detail?id=${id}`)
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	/deep/.u-cell__body__content {
		flex-direction: row-reverse;

	}
</style>