<template>
	<view>
		<!-- 蒙层 -->
		<view class="maskWrapper" v-if="isShowInvite">
		    <view>
		        <text>请您从下方列表中，选中一条课程或需求信息，作为邀请的具体内容，发给对方！</text>
		    </view>
		    <scroll-view class="scrollVertical" scroll-y>
		        <radio-group class="chooseList">
					<view v-for="(item, index) in item11" :key="index">
						<radio class="chooseDetail" @click="clickRadio(item)">
						    <view class="courseTitle">
						        <text>课程号</text>
						        <text class="courseDetail" v-if="item.courseId">{{item.courseId}}</text>
								<text class="courseDetail" v-if="item.requireId">{{item.requireId}}</text>
						    </view>
						    <view class="courseTitle">
						        <text>辅导科目</text>
								<text class="courseDetail" v-if="item.subject">{{item.subject}}</text>
						        <text class="courseDetail" v-else>{{item.subjectBig}}/{{item.subjectSmall}}</text>
						    </view>
						</radio>
					</view>
		
		        </radio-group>
		    </scroll-view>
		    <view class="commitAndCancel">
		        <view class="cancel" @click="cancelChosed">取消</view>
		        <view class="commit" @click="commitChosed">发送</view>
		    </view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-invite",
		data() {
			return {
			};
		},
		props: {
			isShowInvite: {
				type: Boolean,
				default: false
			},
			item11: {
				type: Array
			}
		},
		methods: {
			cancelChosed() {
				this.$emit("cancelChosed")
			},
			commitChosed() {
				this.$emit("commitChosed")
			},
			clickRadio(course) {
				this.$emit("clickRadio", course)
			}
		}
	}
</script>

<style lang="scss">
/* 以下是蒙层样式 */

.maskWrapper{
    z-index: 999;    
    // margin-left: -20rpx;
    padding-left: 20rpx;
    position: fixed;
    height: 55%;
    bottom: 0;
    background-color: #D1D1D1;
    border-top-left-radius: 30rpx;
    border-top-right-radius: 30rpx;
}
/* 可滚动区域 */
.scrollVertical{
    height: 76%;
}

/* 选项区 */
.chooseList{
    display: flex;
    flex-direction: column;
}
/* 单个选项样式 */
.chooseDetail{
    width: 94%;
    padding: 10rpx;
    margin: 10rpx 0;
    border: 1rpx solid gray;
    border-radius: 20rpx;
    background-color: #DEEBF7;
}
/* 设置选项与圆圈的距离 */
.courseTitle{
    margin-left: 30rpx;
}
/* 课程号、辅导科目详情 */
.courseDetail{
    margin-left: 20rpx;
    font-weight: bold;
}
/* 底部按钮 */
.commitAndCancel{
    display: flex;
    width: 100%;
    justify-content: space-around;
    position: fixed;
    bottom: 40rpx;
}
.cancel,
.commit{
    font-size: 40rpx;
    border: 1rpx solid gray;
    padding: 10rpx 60rpx;
    border-radius: 40rpx;
    background-color: #8FAADC;
    color: white;
}

</style>