<template>
	<view class='i-page'>
		<scroll-view
			class='scroll-y-hs'
			scroll-y="true" 
			
			refresher-default-style="none"
			@scrolltoupper="toupperTop"
			@scrolltolower="lowerMore">
			
			<view class='i-line' v-if=" IndexList&& IndexList.length>0">
				<view class="line-item" v-for="item in IndexList" :key="item.id">
					<view class='item-des'>{{item.content}}</view>
					<view class='item-time'>{{item.gmtModified}}</view>
				</view>
				
				
			</view>
			<view v-else class="i-lins-null">
				<image class="footer-img" src='https://ddh.yyhock.com/ddhMall/result-null.png'></image>
				<view class='footer-text'>暂无数据哦!</view>	
			</view>
		</scroll-view>	
		<view class='my-n-footer'>
			<view class='footer-btn' @click="needSubmit()">我要发布</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				IndexList:[]
			}
		},
		onLoad() {
			this.buryingPoint('app:Ineed_pageView')
			this.init()
		},
		methods: {
			init(){
				const self=this
				self.$request('/app/need/selectLists','POST').then(res => {
					console.log(res,'selectLists');
						self.IndexList=res.result
				
					
				}).catch(err=>{
				  console.log(err,'请求出错')
				})
			},
			needSubmit(){
				this.Go('uni:/subPackage/myneed/myneed')
			},
			toupperTop(e){
				console.log(e,'到顶了');
			},
			lowerMore(e){
				console.log(e,'触底了');
			}
		},
		onShow() {
			this.init()
		}
	}
</script>

<style src='./index.less' lang="less" scoped></style>