<template>
	<view style="position: relative;">
		<!-- 胶囊 -->
		<mvBar :mysNavConfig="mysNavConfig"></mvBar>
		<view :style="{marginTop:navH}"></view>

		<view class="script" v-for="item in List">
			<view style="margin: 20rpx;">
				<p style="margin-bottom: 10rpx;">上传时间：{{item.create_at}}</p>
				<!-- 图片 -->
				<p>{{item.link_url}}</p>
				<view style="display: flex;">
					<image :src="item.photo_url" mode="aspectFit"></image>
				</view>
			</view>
			<view class="heng-line" v-if="item.is_review && !item.is_ok"></view>
			<view style="margin: 20rpx;color: red;" v-if="item.is_review && !item.is_ok">
				<p style="margin-bottom: 10rpx;">驳回时间：{{item.reject_at}}</p>
				<p>{{item.revise_opinion}}</p>
			</view>
		</view>
		<view style="height: 100rpx;width: 100%;"></view>
	</view>
</template>

<script>
	import mvBar from "@/components/mys_navBar/mysNavBar";
	export default {
		components: {
			mvBar,
		},
		data() {
			return {
				navH: getApp().globalData.navHeight,
				List: [],
				mysNavConfig: {
					/* 开启单页显示首页图标 */
					isHome: true,
					/* 固定导航  */
					navFixed: true,
					/* 标题 （屏幕中心居中 两边图标中心居中使用slot center1） */
					navTitle: {
						text: "查看修改/反馈记录",
						color: "",
						fontSize: "32rpx", // px upx rpx
						fontWeight: "normal", // 100 - 700
					},
					btnType: "type2",
					onLeftClick: '',
					/* type2 按钮 */
					type2Config: {
						// 左图标
						leftPath: "/static/img/png2.png",
						// 右图标
						rightPath: "/static/img/png4.png",
						// 圆角
						radius: "40rpx",
					},
				},
			}
		},

		onShow() {
			this.getList();
		},

		onLoad(options) {
			let data = options.textObj.replace(/""/g, "");
			data = JSON.parse(decodeURIComponent(data))
			this.taskId = data.taskId
			console.log(this.taskId)
		},
		methods: {
			// 获取初稿审阅记录
			getList() {
				this.$https.get('/youngee/c/t/g/get-task-link' +
						"?" +
						"task_id" +
						"=" +
						this.taskId)
					.then(res => {
						console.log(res)
						this.List = res.data.data
					})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.script {
		margin-bottom: 100rpx;
	}

	.heng-line {
		width: 100%;
		border-bottom: 1rpx solid #dadada;
	}
</style>
