<template>

	<view class="news-item" v-for="(item,index) in state.data" :key='index'>
		<view class="left-text">
			<view class="tit description">{{item.title}}</view>
			<view class="span">{{item.copywriting}}</view>
		</view>
		<view class="image-box">
			<image :src="fileURLList + item.imgUrl"></image>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { reactive } from "vue";
	import { onLoad } from "@dcloudio/uni-app";
	import { fileURL, fileURLList } from "@/datas/fileURL.js";
	const state = reactive({
		data: []
	})
	onLoad((option) => {
		const params = JSON.parse(decodeURIComponent(option.item))
		state.data.push(params)
		console.log("params", params)
	})
</script>
<style>
	page {
		background: #eef7f7;
	}
</style>
<style lang="scss" scoped>
	.news-item {
		display: flex;
		border: 1rpx solid #dcdcdc;
		padding: 40rpx;
		font-size: 30rpx;
		box-sizing: border-box;
		width: 90%;
		margin: 30rpx auto;
		background-color: white;
	}

	.image-box image {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
	}

	.news-item .span {
		font-size: 22rpx;
		display: inline-block;
		text-align: center;
		background: #bae0f1;
		border-radius: 6rpx;
		color: #0a8f8a;
		padding: 4rpx 8rpx;
	}

	.news-item .more {
		font-size: 24rpx;
		text-align: center;
		color: #0a8f8a;
		padding: 22rpx 0;
	}
</style>