<template>
	<view class="container">
		<!-- #ifdef H5 -->
		<view style="color: #fff;">
			<tn-nav-bar backgroundColor="#26B3A0" :bottomShadow="false">任务详情
				<!-- 	<template slot="right">
					课程购买记录
				</template> -->
			</tn-nav-bar>
			<view :style="{ height: tobheight + 'px' }"></view>
		</view>
		<!-- #endif -->


		<view class="detailBox">
			<image class="topImg"
				:src="detail.task&&detail.task.cover_image?detail.task.cover_image:'/static/posImg.png'" mode="">
			</image>
			<view class="money">
				<view class="label" style="color:#666;font-size: 34rpx;">
					佣金:
				</view>
				<view class="num">
					￥{{detail.commission}}
				</view>
			</view>
			<view class="title">
				{{detail.task_name}}
			</view>
			<view class="des" style="color:#999;font-size: 30rpx;">
				任务人数：{{detail.task.success_count }}人/{{detail.task.max_count}}人
			</view>
			<view class="content" v-if='detail.task'>
				{{detail.task.intro}}
			</view>
			<view class="div">

			</view>
			<view class="sunTitle">
				任务说明
			</view>
			<view class="desCon">
				<u-parse v-if='detail.task' :content="detail.task.description"></u-parse>
			</view>
			<view class="sunTitle">
				接单须知
			</view>
			<view class="desCon">
				<u-parse v-if='detail.task' :content="detail.task.receive_notice"></u-parse>
			</view>
		</view>
		<view class="kefuAndBtn">
			<!-- 	<view class="iconBox">
				<u-icon class="icon" name="server-fill" color="#26B3A0" size="22"></u-icon>
			</view> -->
			<view class="btn" @click="">
				{{detail.audit_status_text}}
			</view>
		</view>
	</view>
</template>

<script>
	import {
		myTaskOrderDetail
	} from '@/api/my/index.js'
	export default {
		components: {},
		data() {
			return {
				tobheight: 45,
				detail: {}
			};
		},
		computed: {

		},
		watch: {

		},
		async onLoad(o) {
			let res = await myTaskOrderDetail({
				task_order_id: o.id
			})
			if (res.code == 0) {
				this.detail = res.data
			}
			console.log('任务详情', this.detail);
		},
		onReady() {

		},
		onShow() {

		},
		onUnload() {

		},
		methods: {
			goPay() {
				uni.navigateTo({
					url: '/pages/index/scorePaySuc/index'
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	@import './index.scss';
</style>