<template>
	<view class="Dynamiclist">
		<view class="Dynamic" v-for=" (item,index) in list" :key="index" @click="details(item.id)">
			<view class="DynamicImg">
				<image :src="localimg+item.images" mode=""></image>
			</view>
			<view class="DynamicText">
				<view class="textOne">
					<text>{{item.title}}</text>
				</view>
				<view class="textthree">
					<text>{{item.createTime}} </text>
				</view>
			</view>
		</view>
	
	</view>
</template>

<script>
	export default{
		data(){
			return{
				localimg:'https://zsy-m.mianyang.cn',
				host:"https://zsy-m.mianyang.cn",
				list:[]
			}
		},
		onLoad() {
			uni.request({
				url:`${this.host}/open/getConsulting`,
				method:"GET",
				success:(res)=> {
					console.log(res);
					this.list=res.data
				}
			})
		},
		onShareAppMessage() {
			return {
				title: "", // 默认是小程序的名称(可以写slogan等)
				path: '/pages/Dynamiclist/Dynamiclist',
			}
		},
		methods:{
			details(id){
				uni.navigateTo({
					url: `../ConsultingTheDynamic/ConsultingTheDynamic?id=${id}`,
				})
			}
		}
	}
</script>

<style>
	@import "./Dynamiclist.scss"
</style>
