<template>
	<view class="content">
		<view class="info-detail" v-if="item!=null">
			<view class="item">
				<text class="label">接收者:</text>
				<text class="text">{{item.externalUserName}}</text>
			</view>
			<view class="item">
				<text class="label">发送时间:</text>
				<text class="text">{{item.sendTime}}</text>
			</view>
			<view class="item">
				<text class="label">实际发送时间:</text>
				<text class="text">{{item.realSendTime}}</text>
			</view>
			<view class="item" v-for="(item,index ) in contents.setting">
				<text class="label">发送内容</text>
				<text class="text" v-if="item.contentType==1" v-html="item.value"></text>
				<text v-if="item.contentType==2"  >
					<image style="width:100rpx;height:100rpx;" :src="item.imgUrl"></image>
				</text>
				<text v-if="item.contentType==3"  >
					链接:{{item.linkTitle}}
				</text>
				<text v-if="item.contentType==6"  >
					视频:{{item.videoUrl}}
				</text>
				<text v-if="item.contentType==5"  >
					文件:{{item.fileUrl}}
				</text>
				<text v-if="item.contentType==7"  >
					语音:{{item.voiceUrl}}
				</text>
				<text v-if="item.contentType==9"  >
					小程序:
				</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {getQwSopSendCustomerList} from '@/api/qwSop.js'
	export default {
		data() {
			return {
				id:null,
				item:null,
				contents:[],
			}
		},
		onLoad(option) {
			// this.id = option.id;
			var that=this;
			this.item=JSON.parse(uni.getStorageSync("sop"));
			console.log(this.item)
			this.contents=JSON.parse(this.item.contentJson);
			
			
		},
		onShow() {
			 
		},
		methods: {
			 
			getUserInfoByUserId(userId){
				var data = {userId:userId};
				var that=this;
				getUserInfoByUserId(data).then(
					res => {
						that.bindUser(res);
						
					},
					rej => {}
				);
			},
			 
		}
	}
</script>

<style lang="scss">
	page{
		
		height: 100%;
		background: #f6f6f6;
	}
</style>
<style scoped lang="scss">
	.content{
		// 详细信息
		.info-detail{
			padding: 0 24upx;
			background-color: #fff;
			.item{
				padding: 20upx 0;
				border-bottom: 1px solid #f7f7f7;
				.label{
					font-size: 30upx;
					color: #999;
					margin-right: 20upx;
				}
				.text{
					font-size: 30upx;
					color: #333;
				}
				 
			}
		}
	}
</style>
