<template>
	<view class="main">

		<view class="detail">
			<view class="item">
				<view class="title">培训主题:</view>
				<view class="info">{{detail.name}}</view>
			</view>
			
			<view class="item">
				<view class="title">组织部门:</view>
				<view class="info">{{detail.org_name}}</view>
			</view>
			
			<view class="item">
				<view class="title">开展时间:</view>
				<view class="info">{{detail.drawup}}</view>
			</view>
			
			<view class="item">
				<view class="title">结束时间:</view>
				<view class="info">{{detail.enddrawup}}</view>
			</view>
			
			<view class="item">
				<view class="title">培训地点:</view>
				<view class="info">{{detail.location}}</view>
			</view>
			
			<view class="item">
				<view class="title">主持人:</view>
				<view class="info">{{detail.anchor}}</view>
			</view>		
		</view>
		
		<button size="default" type="primary" style="margin-top: 30rpx;background-color:#008782;" @click="goToEnroll">前往报名</button>

	</view>
</template>

<script>
	export default {
		data() {
			return {
			    m_id:0,
				detail:''
			}
		},
		onLoad({m_id}) {
			this.m_id = m_id
			this.getDetail(m_id);
		},
		methods: {
			getDetail(id)
			{
	            getApp().globalData.request.post(
				  "learn/train/manageInfo",
				  {id:id}
				).then(res=>{
					this.detail = res.data
				})
			},
			goToEnroll()
			{
				uni.navigateTo({
					url:'enroll_user?m_id='+this.m_id
				})
			}
		}
	}
</script>

<style scoped lang="scss">
 .main{
	  padding: 30rpx;
	  font-size: 28rpx;
	  background-color: #f4f9ff;
  }
  .detail{
	  padding: 20rpx;
	  background-color: #fff;
	  border-radius: 20rpx;
  }
  .item{
	  display: flex;
	  justify-content: space-between;
	  margin: 23rpx 0;
	  .title{
		  color:#797979;
		  width: 150rpx;
	  }
	  .info{
		  flex:1;
		  text-align: right;
		  color:#6d6d6d;
	  }
  }
</style>

