<template>
	<view>
		<uni-table border stripe emptyText="暂无更多数据" min-width='250px' >
			<uni-tr>
				<uni-th align="center" width="80">港口</uni-th>
				<uni-th align="center" width="100">价格</uni-th>
				<uni-th align="center" width="50">水分</uni-th>
				<uni-th align="center" width="50">容重</uni-th>
			</uni-tr>
			
			<uni-tr v-for="(item, index) in portInfo" >
				<uni-td align="center">{{item.port+"("+item.northSouth+")"}}</uni-td>
				<uni-td align="center">{{item.price+"("+item.newOld+")"}}</uni-td>
				<uni-td align="center">{{item.waterContent}}</uni-td>
				<uni-td align="center">{{item.bulkDensity}}</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				portInfo:[]
			}
		},
		onLoad(){
			this.loadData()
		},
		onPullDownRefresh() {
			this.loadData()
		},
		methods: {
			loadData(){
				uni.showLoading({
					title: '正在加载',
					mask:true
				})
				var that = this
				that.$api.request('port', 'getNewsInfo', failres => {
					that.$api.msg(failres.errmsg)
					uni.hideLoading()
					uni.stopPullDownRefresh()
				}).then(res => {
					this.portInfo = res.data
					uni.hideLoading()
					uni.stopPullDownRefresh()
				})
			}
		}
	}
</script>

<style>
</style>