<template>
	<view>
		<public-module></public-module>
		<z-nav-bar title="班级详情"></z-nav-bar>
		<!-- <text class="small_btn retake border_radius_10" @click="goTest()">再考一次</text> -->
		<!-- <text class="" @click="showSubmit">提交证件资料</text> -->
		<!-- <view class="stickyyy" offset-top="60"  v-if="buyCourseMsg != ''">
			<text>{{buyCourseMsg}} 课程未购买</text>
		</view> -->		
		<view :class="['classStatus',
		thisClass.state == '0' ? 'daikai' :'',
		thisClass.state == '1' ? 'xuexizhong' :'',
		thisClass.state == '2' ? 'yijieban' :'',
		thisClass.state == '3' ? 'kaoshizhou' :''
		]">
			班级状态：{{getClassStatus}}
		</view>
		<view class="mainContent" v-if="thisClass.id">

			<view class="className">
				<h3>{{thisClass.title}}</h3>
				<text class="tuichu" v-if="thisClass.state == '0' && isHave" @click="outClass()">退出班级</text>
			</view>
			<view class="otherItems flex_box">
				<view v-if="thisClass.state == '0'">
					<text class="ciyao">创建日期</text><text class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
				</view>
				<view v-if="thisClass.state == '1' || thisClass.state == '3' ">
					<text class="ciyao">开班日期</text><text class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
				</view>
				<view v-if="thisClass.state == '2'">
					<text class="ciyao">结班日期</text><text class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
				</view>
				<!-- <view >
					<text class="ciyao">教学时长</text><text
						class="mainTxt">{{classModel.days}} 天</text>
				</view> -->
				<view><text class="ciyao">班级类型</text>
					<text class="mainTxt" v-if="classModel.type == '0'">普通小班</text>
					<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
					<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
				</view>
				<view><text class="ciyao">学员人数</text><text
						class="mainTxt">{{students.length}}/{{thisClass.number}}人</text></view>
				<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
			</view>			
			
			<template v-if="isHave">				
				<view class="pingfenBox testBox" v-if=" thisClass.state == '2'">
					<view class="scoreTitle">
						<view class="titles flex_box">
							<text>总分</text><uni-icons type="help" size="18" color="#fff"
								@click="showTestTips = true"></uni-icons>
						</view>
					</view>
					<view class="chengji zong" style="text-align: center;" v-if="this.classModel.isExam == 1 && paperList.length > 0 || this.classModel.isExam == 0 ">
						<view style="margin-top: 20rpx;">总成绩：
							<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text>分
							<view class="">
								<view class="" style="margin: 10rpx 0;">
									（<text class="c999" v-if="performanceScore.examScore >= 0">{{performanceScore.examScore}}分考试分 <uni-icons type="eye"
											size="20" color="#999" @click="showPaperList = true"></uni-icons></text>
											<text v-if="performanceScore.examScore >= 0 && performanceScore.usualScore >= 0">，</text>
									<text class="c999" v-if="performanceScore.usualScore >= 0"> {{performanceScore.usualScore}}分表现分</text>）
								</view>
							</view>
						</view>
						<view class="" v-if="certificate && certificate.id">
							<text>恭喜您获得</text>
							<text :class="[certificate.type=='A' ? 'yellowScore':'blueScore']" v-if=" performanceScore.userScore >= 70"> {{certificate.type}} 证</text>
							<!-- <text class=""
								v-else-if="performanceScore.userScore >= 60 && performanceScore.userScore < 70"> B 证</text> -->
							<text class="small_btn border_radius_10 zhengshu"
								@click="showSubmit">
								{{certificate && certificate.id && certificate.certificateUrl.length > 0 ? '查看证书' : '去生成证书'}}
								</text>
						</view>
						<template v-if="performanceScore.userScore < 60">
							<view class="flex_box flex_center align-items_box" style="justify-content: center;">
								<text style="text-align: center;">很遗憾，您的成绩未达标</text>								
								<view class="" style="text-align: center;"
									v-if="newCLass && newCLass != null && newCLass.id">
									<text class="small_btn chongxiu border_radius_10"
										@click="onPageJump('/pages/miniClass/classInfo',newCLass.id)">加入新班级重修</text>
								</view>
							</view>
						</template>
					</view>				
										
				</view>
				<view class="pingfenBox testBox" v-if=" thisClass.state == '3' && classModel.isExam == 1">					
								<view class="scoreTitle">
									<view class="titles flex_box">
										<text>考试分</text><uni-icons type="help" size="18" color="#fff"
											@click="showTestTips = true"></uni-icons>
									</view>
								</view>		
					<view class="optionsBox" v-if="thisClass.state == '3' " style="margin-top: 20rpx;">
						<view class=" ">
							<view class="">
								<!--  -->
								<view class="gotoExams" @click="goTest" v-if="paperList.length <= 0">
									<text>去考试</text>
								</view>
				
								<view class="" v-else-if="paperList.length > 0 && showCountDown">
									<view class="flex_box flex_between align-items_box">
										<view class="">
											<uni-countdown @timeup="timeup" :font-size="20" :show-day="false"
												:hour="timeDif.hour" :minute="timeDif.minutes" :second="timeDif.second"
												color="#ffaa7f" />
										</view>
										<view class="">
											<text class="small_btn retake border_radius_10"
												@click="continueTest(examId)">继续考试</text>
										</view>
									</view>
								</view>
								<view class="flex_box flex_center align-items_box userScore" v-else
									style="color: #666; justify-content: space-around !important">
				
									<view class="flex_box align-items_box">
										<view class="">
											<h3>笔试成绩：</h3>
										</view>
										<view>
											<text class="PM_font mainTxt"
												style="font-size: 60rpx; color: #55aaff !important;">{{paperSore}}</text>
											分 </view>
										<uni-icons type="eye" size="20" color="#999"
											@click="showPaperList = true"></uni-icons>
									</view>
									<view class="" v-if="paperList.length == 1">
										<text class="small_btn retake border_radius_10" @click="goTest()">再考一次</text>
									</view>
								</view>
							</view>
						</view>
					</view>					
				</view>
				<view class="pingfenBox" v-if="thisClass.state != '0' && tijiaoTitleList.length > 0">
					<view class="scoreTitle">
						<view class="titles flex_box">
							<text>表现分</text><uni-icons type="help" size="18" color="#fff"
								@click="clickHelp"></uni-icons>
						</view>
					</view>
					<view :class="['otherItems' ,'flex_box' ,'userScore', 
					blankNumber == 1 ?  'alcenterss' : '',
					blankNumber == 2 ?  'alcentertt' : '',
					 ]">

						<view v-if="classModel.isTask == 1" :class="['ite', blankNumber < 3 ? 'flex_box' : '']">
							<text class="ciyao">作业得分</text>
							<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.task0Score}}</i>分</text>
						</view>
						<view v-if="classModel.isMedicalcase == 1" :class="['ite', blankNumber < 3 ? 'flex_box' : '']">
							<text class="ciyao">医案得分</text>
							<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.task1Score}}</i>分</text>
						</view>
						<view v-if="classModel.isExperience == 1" :class="['ite', blankNumber < 3 ? 'flex_box' : '']">
							<text class="ciyao">心得得分</text>
							<text class="ciyao"><i
									class="mainTxt PM_font">{{performanceScore.experienceScore}}</i>分</text>
						</view>
						<view v-if="classModel.isQuestion == 1" :class="['ite', blankNumber < 3 ? 'flex_box' : '']">
							<text class="ciyao">思考题分</text>
							<text class="ciyao"><i
									class="mainTxt PM_font">{{performanceScore.questionScore}}</i>分</text>
						</view>
						<!-- <view v-if="classModel.isExam == 1 && thisClass.state == '2'">
							<text class="ciyao">考试分</text>
							<text class="ciyao"><i
									class="mainTxt PM_font">{{performanceScore.questionScore}}</i>分</text>
						</view> -->
					</view>
				</view>
			</template>
			<view class="mainBox">
				<view class="">
					<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
						:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
						itemStyle="padding-left:10rpx; background-color:#fff;  padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
				</view>
				<!-- 课程列表 -->
				<view class="" v-if="tabId == '0'">
					<!-- <uni-section class="mb-10 nobg nopad" title="班内课程" type="line"></uni-section> -->
					<view class="newBox" v-show="courses.length > 0 ">
						<view class="item flexbox" v-for="(item, index) in courses" :key="index"
							@click="onPageJump('/pages/course/courseDetail',item.id)">
							<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
							<view class="imgcontainer">
								<image :src="item.image" mode="aspectFit"></image>
							</view>
							<view class="buyItems">
								<view class="txt555">
									{{item.title}}
								</view>
								<view class="jianjie" v-html="item.content"></view>
							</view>
						</view>
						<view class="" v-if="classModel.days > 0"
							style="text-align: center; color: #999; font-size: 28rpx;">
							——— 教学时长：{{classModel.days}} 天 ———
						</view>
					</view>
					<view class="" v-show="courses.length == 0">
						<u-divider text="暂无课程"></u-divider>
					</view>
					<!-- <view class="" v-if="thisClass.content != ''">
					<text class="adminName">教学目标/班级简介</text>
				</view> -->
					<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
					<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
					<view class="qrcode" v-if="thisClass.qrcode != ''">
						<uni-section class="mb-10 nobg" title="群二维码" type="line"></uni-section>
						<image :src="thisClass.qrcode" mode="widthFix"></image>
					</view>
				</view>

				<!-- 班内同学 -->
				<template v-if="tabId == '2'">
					<template v-if="students.length> 0">
					<view class="" style=" overflow: hidden; margin:20rpx 0">
						<text style="font-size: 26rpx; color: #666;">共 {{students.length}} 名学员</text>
						<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title=""></uni-section> -->
					</view>
						<view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')">
							<view class="newBox flexbox">
								<view :class="['item']" v-for="(item, index) in students" :key="index">
									<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
									<view class="flexbox">
										<view class="classmateImg">
											<image v-if="item.student.avatar != null && item.student.avatar != ''"
												:src="item.student.avatar" mode="aspectFit"></image>
											<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
										</view>
										<view class="textItems flex_box">
											<text class="txt555"
												v-if="item.student.nickname != null && item.student.nickname != ''">
												{{item.student.nickname}}
											</text>
											<text v-else>匿名用户</text>
										</view>
									</view>
								</view>
							</view>
						</view>
						<sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId"
							:thisClass="thisClass" @chooseStudent="chooseStudent"
							v-if="(thisClass.state == '3' || thisClass.state == '2') && students.length > 0"></sutdent-score-list>
					</template>
					<view class="" v-else>
						<u-divider text="暂无学员加入"></u-divider>
					</view>
				</template>

				<!-- {{getTijiaoTitleList}} -->
				<!-- 班内提交 -->
				<view class="" v-if="tabId == '3' && thisClass.state != '0' && isHave">
					<view class="flex_box tijiaoTitle">
						<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item,index)"
							v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
					</view>
					<!-- 课程排序 -->
					<view class="courseTab border_radius_10" v-if="questionsList.length > 1 && tijiaoTitleId == '3'">
						<view class="flex_box flex_between" v-if="tabCourseList.length <= 3 ">							
							<text :class="['item','border_radius_10',curCourseId == item.id ? 'cur' :'']"
								@click="clickCourseTab(index,item.id)" v-for="(item, index) in tabCourseList"
								:key="index">{{item.title}}</text>							
						</view>
						<template v-if="tabCourseList.length > 3 && tijiaoTitleId == '3'">						
						    <u-tabs :list="tabCourseList" lineWidth="0" lineHeight="0" @click="tabsClickCourseTab" :activeStyle="courseActiveStyle" :current="curCourseIndex"></u-tabs>
						</template>
					</view>
					<!-- 班内任务 --><!-- 医案 --> <!-- 心得 --><!-- 思考题 -->
					<view class="" v-if="tijiaoTitleId != '3'">
						<view class="" style="margin-bottom: 20rpx;"
							v-if="tijiaoTitleId == 2 && thisClass.state == '1' && roleCode.includes('0')">
							<view class="noanser">
								<view class="">
									<text>快来添加一条记录吧~</text>
								</view>
								<view class="btn">
									<text @click="addXinde('/pages/miniClass/addHomeWork',undefined,2)">写心得</text>
								</view>
							</view>
						</view>
						<view class="" v-if="tijiaoTitleId == 2 && false" style="margin: 20rpx 0;">
							<radio-group @change="radioChange1" class="flex_box">
								<view class="" style="margin-right:20rpx ;">
									<radio value="0" />全部同学的</label>
								</view>
								<view class="">
									<radio value="1" checked="true" />只看我自己的</label>
								</view>
							</radio-group>
						</view>

						<!-- <uni-section class="mb-10 nobg" title="任务列表" type="line"></uni-section> -->
						<view v-if="taskList.length > 0 ">
							<view class="submitRecode">
								<view class="newBox">
									<view class="item " v-for="(item, index) in taskList" @click="clickTask(item,index)">
										<view class="leve1 flex_box flex_between">
											<text style="flex: 1;">{{item.title}}</text>
											<view class="btn1" @click.stop="changeZheDie(item, index)">
												{{item.zhedie ? '收起' : '展开'}}
											</view>
										</view>
										<view :class="['leve2']" v-if="item.zhedie">
											<view :class="[item.zhedie ? '' : 'zhedie']" v-html="item.content"></view>
										</view>
										<view class="leve3">
											<view class="tips flex_box" v-if="item.zhedie">												
												<!-- <text>发布者：{{item.createUser.nickname != null && item.createUser.nickname != '' ? item.createUser.nickname : '匿名用户'}}</text> -->
												<text style="" class="date">日期：{{item.createTime}}</text>
											</view>
											<template v-if="tijiaoTitleId == 2 && isHave">
												<view class="">
													<view class="score" v-if="item.scoreSuccess == 0">
														等待评分
													</view>
													<!-- <view class="score" v-if="item.scoreSuccess > 0 && item.scoreSuccess ">
														正在评分
													</view> -->
													<view class="score" v-if="item.scoreSuccess >= 1">
														分数：{{item.score}}
													</view>
												</view>
												<text class="btn"
													v-show="myExperience == 1 && item.scoreSuccess == 0 && thisClass.state == '1'"
												@click.stop="editMyXinde(item)">修改</text>
											</template>
											<template v-if="roleCode.includes('0') && isHave && tijiaoTitleId != 2">
												<template  v-if="item.reply && item.otherInfo != null">
													<text v-if="item.otherInfo[0].scoreSuccess == 0">等待评分</text>
													<text class="pIng" v-if="item.otherInfo[0].scoreSuccess < 2 && item.otherInfo[0].scoreSuccess > 0">正在评分</text>
													<view class="" v-if="item.otherInfo[0].scoreSuccess >=2">
														<text class="score" >{{item.otherInfo[0].score}} 分</text>
														<!-- <text style="color: #999; padding-left: 10rpx; font-size: 26rpx;">分</text> -->
													</view>
												</template>
												<template 
													v-if="!item.reply && thisClass.state == '1'">
													<text class="no" v-if="index+1 <= currentStudyNumber || currentStudyNumber == 0">未提交答案 点击开始答题</text>
													<text class="no" v-else style="color: #a0a1a7;">暂未开始学习</text>
												</template>
												<template 
													v-if="!item.reply && (thisClass.state == '2' || thisClass.state == '3')">
													<text class="cantAnswer">未作答 已不可作答</text>
												</template>
											</template>
										</view>										
									</view>
								</view>
							</view>
						</view>

						<u-divider v-show="status == 2" text="已加载全部"></u-divider>
						<u-divider v-show="status == 3" text="暂无数据"></u-divider>
						<u-divider v-show="status == 1" text="加载中..."></u-divider>
						<!-- <view class="" v-else>
							<u-divider text="暂无数据"></u-divider>
						</view> -->
					</view>
					<template
						v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length > 0">
						<view>
							<view class="submitRecode questionbox">
								<view class="newBox">
									<view class="item "
										v-for="(item, index) in questionsList[curCourseIndex].chapterList"
										@click="jumpToVideoPage(item)">
										<view class=" flex_box align-items_box">
											<view class="pp" style="flex: 1; font-size: 28rpx;" v-html="item.title">
											</view>	
											<template v-if="item.reply == null">
												<text v-if="thisClass.state == '1'" style="color: #ff9277; font-size: 26rpx;">未作答</text>
												<text v-if="thisClass.state == '2' || thisClass.state == '3'" style="color: #999; font-size: 26rpx;">已不可作答</text>
											</template>
											<template v-else>
												<!-- <text  class=""
													style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text> -->
												<text style="padding-left: 10rpx; color: #55aa7f; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 0 && thisClass.state != '2'">
													等待评分
												</text>
												<text style="padding-left: 10rpx; color: #999; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 0 && thisClass.state == '2'">
													已结班无法评分
												</text>
												<view class="" style="margin-left: 5rpx;"  v-if="item.reply.scoreSuccess > 0">
													<text class="score">{{item.reply.score}}</text><text style="color: #999;">分</text>
												</view>
											</template>
										</view>
										
									</view>
								</view>
							</view>
						</view>
					</template>
					<view class=""
						v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length == 0">
						<u-divider text="本门课程暂无思考题可提交"></u-divider>
					</view>
				</view>
			</view>
		</view>
		<view class="bottomBox" v-if=" thisClass.state == '0' && !isHave && students.length < thisClass.number">
			<button type="primary" @click="addClass">一键加入班级</button>
		</view>
		<!-- 管理弹出 -->
		<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
			<view class="guanli">
				<h3>班内管理人员</h3>
				<view class="item">
					<text class="adminName">班长：</text>
					<view class="personbox" v-if="admins.monitor.user != null">
						<text>{{admins.monitor.user.nickname != null && admins.monitor.user.nickname != '' ? admins.monitor.user.nickname : '匿名用户'}}</text>
						<!-- <text v-if="admins.monitor.id">({{admins.monitor.user.tel}})</text> -->
					</view>
					<text v-else>暂未设置</text>
				</view>
				<view class="item">
					<text class="adminName">副班长：</text>
					<view class="personbox" v-if="admins.dmonitor.user != null">
						<text>{{admins.dmonitor.user.nickname != null && admins.dmonitor.user.nickname != '' ? admins.dmonitor.user.nickname : '匿名用户'}}</text>

						<!-- <text>({{admins.dmonitor.user.tel}})</text> -->
					</view>
					<text v-else>暂未设置</text>
				</view>
				<view class="item"><text class="adminName">学习委员：</text>

					<view class="personbox" v-if="admins.learner.user != null">
						<text>{{admins.learner.user.nickname != null && admins.learner.user.nickname != '' ? admins.learner.user.nickname : '匿名用户'}}</text>
						<!-- <text>({{admins.learner.user.tel}})</text> -->
					</view>
					<text v-else>暂未设置</text>
				</view>
				<!-- <view class="item arryItem"><text class="adminName">记分员：</text>
					<template v-if="admins.counter.length > 0">
						<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
							<template v-if="item.user != null">
							<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
							<text>({{item.user.tel}}) </text>
							</template>
						</view>
					</template>
					<text v-else>暂未设置</text>
				</view> -->
				<view class="item arryItem"><text class="adminName">评分员：</text>
					<template v-if="admins.scorer.length > 0">
						<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
							<template v-if="item.user != null">
								<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname+'，' : '匿名用户，'}}</text>
								<!-- <text>({{item.user.tel}}),</text> -->
							</template>
						</view>
					</template>
					<text v-else>暂未设置</text>
				</view>
			</view>
		</u-popup>
		<u-popup key="2" :show="showTestTips" :round="10" @close="closeManager">
			<view class="guanli">
				<h3>考试说明</h3>
				<view class="tips border_radius_10">
					<text>①、每位学员共有两次考试的机会，考试成绩以两次成绩的最高分作为最终的卷面成绩，请认真对待每次考试;<br />
						②、请在倒计时结束前完成答题，倒计时结束后将自动交卷。</text>
				</view>
			</view>
		</u-popup>
		<u-popup key="3" :show="showPaperList" :round="10" @close="closeManager">
			<view class="upopBox" style="">
				<h3 style="margin-bottom: 20rpx; text-align: center;">
					试卷列表
				</h3>
				<view class="scoreBox flex_box flex_between border_radius_10 ">
					<template v-if="classModel.isExam == 1">
						<template v-if="paperList.length == 0">
							<view class="">
								<view class="">
									未参加考试
								</view>
							</view>
						</template>
						<template v-else>
							<view class="" v-for="(item1, index1) in paperList">
								<view class="ciyao">
									{{index1 == 0 ? '一' : '二'}}次考试成绩
								</view>
								<view class="flex_box flex_center" @click.stop="goToPaper(item1.id)">
									<text class="score">{{item1.score}} 分</text>
									<view class="seePaper">
										<image src="../../static/icon/testPaperIcon.png" mode="widthFix"></image>
									</view>
								</view>

							</view>
						</template>
					</template>
					<!--  && thisClass.state == '2' -->
					<!-- <view v-if="classModel.isExam == 1" :class="['PM_font','zhengshu',thisStudent.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']"
				 ></view> -->
				</view>
			</view>
		</u-popup>
		<!-- <addCerInfo v-if="showSubmitInfoBlank" :submitInfo="submitInfo" @close="closeManager" ></addCerInfo> -->
		<u-popup key="5" :show="showSubmitInfoBlank" :round="10" @close="closeManager" z-index="998"
			overlay-style="z-index:998">
			<view class="guanli userinfoPup">
				<view class="" style="text-align: center; margin-bottom: 40rpx;">
					<h3>信息确认</h3>
					<text style="color: #666;">请确认以下证书信息，证书一经生成后不可更改</text>
				</view>
				<view class="tips border_radius_10">
					<!-- {{submitInfo.name}}-{{submitInfo.photo}} -->
					<view class="flex_box align-items_box item">
						<text class="mr20rpx">证书姓名：</text>
						<text class="mr20rpx">
							{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? submitInfo.name : '未设置'}}
						</text>
						<text class="small_btn border_radius_10"
							v-if="!submitInfo.name || submitInfo.name != '' || submitInfo.name != null"
							@click="onPageJump('/pages/mine/userInfo/persData')" style="display: block; height: 30px;">
							{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? '去修改' : '去设置'}}
						</text>

					</view>
					<view class="flex_box align-items_box item">
						<text class="mr20rpx">证书照片：</text>
						<image @click="preveImg(submitInfo.photo)" class="mr20rpx"
							v-if="submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null"
							:src="submitInfo.photo" mode="widthFix" style="width:100rpx; height:140rpx;"></image>
						<text class="mr20rpx" v-else>未上传</text>
						<text class="small_btn border_radius_10"
							v-if="!submitInfo.photo || submitInfo.photo != '' || submitInfo.photo != null"
							@click="onPageJump('/pages/mine/userInfo/persData')"
							style="display: block; height: 30px;">{{submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null ? '去修改' : '去上传'}}</text>
						</text>
					</view>
				</view>
				<view class="btn_box_certificate"><button @click="createCertificate">立即生成证书</button></view>
			</view>
		</u-popup>
		<!-- <z-navigation></z-navigation> -->
		<view>
			<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
		</view>
	</view>
</template>

<script>
	import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
	import addCerInfo from "@/components/addCerInfo.vue";
	import debounce from "@/common/debounce.js";
	import sutdentScoreList from "./components/sutdent_score_list.vue";
	// import permission from "@/js_sdk/wa-permission/permission.js"
	import $http from '@/config/requestConfig.js';
	import {
		mapState
	} from "vuex";
	export default {
		data() {
			return {
				currentStudyNumber:0,
				courseActiveStyle:{
					background:'#fff',
					color:'#666',
					padding:"10rpx",
					borderRadius:"10rpx"
				},
				certificateFlag:false,  // 证书生成中的标记
				buyCourseMsg: '',
				fileList1: [],
				questionsList: [],
				curCourseId: undefined,
				curCourseIndex: 0,
				tabCourseList: [],
				showCropper: false,
				submitInfo: {
					img: undefined, // 证件图
					name: '' // 姓名
				},
				showAlert: false, // 是否显示考试周
				horizontal: 'right',
				vertical: 'bottom',
				direction: 'vertical',
				status: 88,
				loadFlag: false,
				pattern: {
					color: '#7A7E83',
					backgroundColor: '#fff',
					selectedColor: '#7A7E83',
					buttonColor: '#007AFF',
					iconColor: '#fff'
				},
				timeDif: {},
				showCountDown: false,
				showSubmitInfoBlank: false,
				thisClass: {},
				students: [],
				tabId: undefined,
				curTagIndex: 0,
				scrollable: false,
				pPage: 0,
				// 已开班
				tabList02: [{
						name: '班内提交',
						id: '3'
					},
					{
						name: '班内课程',
						id: '0'
					},
					// {
					// 	name: '班内讨论',
					// 	id: '1'
					// }, 
					{
						name: '班内学员',
						id: '2'
					}
				],
				// 待开班
				tabList01: [{
						name: '班内课程',
						id: '0'
					},
					// {
					// 	name: '班内讨论',
					// 	id: '1'
					// }, 
					{
						name: '班内学员',
						id: '2'
					}
				],
				// 考试周及结班
				tabList03: [{
						name: '历史提交',
						id: '3'
					},
					// {
					// 	name: '班内讨论',
					// 	id: '1'
					// }, 
					{
						name: '班内学员',
						id: '2'
					},
					{
						name: '班内课程',
						id: '0'
					}
				],
				admins: {
					list: [],
					monitor: {},
					dmonitor: {},
					learner: {},
					scorer: [],
					counter: []

				},
				activeStyle: {
					color: '#333',
					fontWeight: 'bold',
					// transform: 'scale(1.2)',
					// backgroundColor: '#258feb'

				},
				classModel: {},
				courses: [],
				classId: undefined,
				refresh: true,
				userMes: {},
				isMonitor: false, // 是管理者
				isDirector: false, // 是主任
				isHave: false,
				showMan: false,
				tijiaoTitleList: [],
				defaultTijiaoTitleList: [{
						name: '班内作业',
						id: '0'
					},
					{
						name: '班内医案',
						id: '1'
					},
					{
						name: '班内心得',
						id: '2'
					}, {
						name: '思考题',
						id: '3'
					},
				],
				tijiaoTitleId: '0',
				tijiaoTitleIndex: 0,
				taskList: [], // 任务列表
				taskHaveMore: false, // 是否还有更多
				myExperience: '1',
				performanceScore: {
					task1Score: 0,
					experienceScore: 0,
					task0Score: 0,
					questionScore: 0
				},
				roleCode: [],
				firstLoad: true, // 是否是第一次请求
				blankNumber: 0,
				paperList: [],
				scrollTop: 0,
				bgiStyle: {
					background: '#fff'
				},
				iconStyle: {
					fontSize: '40rpx',
					fontWeight: 'bold',
					color: '#258feb',
				},
				paperSore: 0, // 最终的笔试成绩
				showTestTips: false,
				showPaperList: false,
				examId: undefined,
				ingPaper: undefined, // 正在进行中的试卷信息
				newCLass: undefined, // 同模型的待开班班级
				certificate: undefined, // 证书
				// stickyBgColor:'#ff9277',
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onLoad(e) {
			uni.hideTabBar();
			// #ifdef APP-PLUS
			plus.screen.lockOrientation("portrait-primary")
			// #endif
			this.classId = e.id
			console.log('this.classId', this.classId);
			this.getUserRole()
			this.getUserInfo()
			// uni.$on('refreshData', () => {
			// 	console.log('开始刷新列表数据');
			// 	this.pPage = 0
			// 	this.taskList = []
			// 	this.getList()
			// })

			// uni.$on('refreshUserAnswerList',() => {
			// 	console.log('开始刷新用户提交列表');
			// 		this.pPage = 0
			// 		this.taskList = []
			// 		this.getList()
			// 	})

		},
		onReachBottom() {
			if(this.tijiaoTitleId != 3){
				if (this.status != 2 && this.status != 3) {
					this.getList()
				}
			}
		},
		async onPullDownRefresh() {
			// this.curTagIndex = 0

			console.log('this.tabId------', this.tabId);
			this.getClassInfo()
			this.getScore()
			var ll = await this.getPaperList()
			// this.pPage = 0
			// this.taskList = []
			// this.getList()
			uni.stopPullDownRefresh()
		},
		async onShow() {
			console.log('this.curTagIndex', this.curTagIndex);
			var ss = await this.getClassInfo()
			if (this.thisClass.state == '0' && this.isHave) {
				this.buyCourseMsg = await this.checkUserCourse()
			}
			// this.curTagIndex = 0
			if (this.thisClass.state != '0') {
				this.getScore()
			}
			if (this.thisClass.state == '3' || this.thisClass.state == '2') {
				var ll = await this.getPaperList()
				console.log('this.paperList.length', this.paperList.length);
				if (!this.showAlert && this.paperList.length <= 0 && this.thisClass.state == '3') {
					uni.showModal({
						title: '提示',
						content: '您好,当前教学进度已进入考试周,请尽快完成最终的笔试考试,如在结班之前未完成考试,则卷面成绩记为0分',
						confirmText: '好的',
						showCancel: false
					})
					this.showAlert = true
				}
				if (this.thisClass.state == '3' && this.paperList.length > 0) {
					// var paperData={}
					var paperEndTime = 0
					var severNowTime = -1
					// paperData = await this.getlocaltestInfo('paperEndTime')		
					var historyPaper = await this.getingPaper()
					console.log('正在进行中的试卷信息', historyPaper);
					this.ingPaper = historyPaper
					// console.log('对比----------------', historyPaper.classId, this.classId);
					if (historyPaper && historyPaper != null && historyPaper.relationId == this.classId) {
						// var planEndTimeDate = new Date(historyPaper.planEndTime)
						// paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
						paperEndTime = historyPaper.planEndTime
						console.log('+++++++++', paperEndTime);
						this.examId = historyPaper.id
					} else {
						this.examId = undefined
						paperEndTime = 0
					}
					severNowTime = await this.getServerTime()
					console.log('//////////////', paperEndTime, severNowTime);
					if (severNowTime > -1 && paperEndTime - severNowTime > 0) {
						var secondTimeDif = paperEndTime - severNowTime
						this.timeDif.hour = parseInt((secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
						this.timeDif.minutes = parseInt((secondTimeDif % (1000 * 60 * 60)) / (1000 * 60));
						this.timeDif.second = (secondTimeDif % (1000 * 60)) / 1000
						this.showCountDown = true
						console.log('时间符合吗？', this.showCountDown, secondTimeDif);
					} else {
						this.showCountDown = false
					}
				}

			}
			if (this.thisClass.state == '2') {
				var userObj = await this.getUserData()
				if (userObj) {
					this.submitInfo.name = userObj.name
					this.submitInfo.photo = userObj.photo
					// this.showSubmitInfoBlank = true
				}
			}
		},
		components: {
			sutdentScoreList,
			QfImageCropper,
			addCerInfo
		},
		computed: {
			...mapState(["userInfo"]),
			getClassStatus() {
				var _roleName = ''
				switch (this.thisClass.state) {
					case '0':
						_roleName = '待开班';
						break;
					case '1':
						_roleName = '学习中';
						break;
					case '2':
						_roleName = '已结班';
						break;
					case '3':
						_roleName = '考试周';
						break;
				}
				return _roleName
			},

			tabList() {
				console.log('是否计算tab了？')
				var ss = this.getBlankNumber
				var qq = this.blankNumber
				console.log('ss', ss, qq);
				var list = []
				if (this.thisClass.state == '0' || !this.isHave || qq == 0) {
					list = this.tabList01
				} else if (this.thisClass.state == '1') {
					list = this.tabList02
				} else {
					console.log('走这里了吗？');
					list = this.tabList03
				}

				this.tabId = list[this.curTagIndex].id
				return list
			},

			// 获得提交项目的tab
			getTijiaoTitleList() {
				if (!this.isHave) {
					this.tabId = 0
					// return
				}
				var _list = []
				if (this.classModel.isTask == 1) {
					_list.push(this.defaultTijiaoTitleList[0])
				}
				if (this.classModel.isMedicalcase == 1) {
					_list.push(this.defaultTijiaoTitleList[1])
				}
				if (this.classModel.isExperience == 1) {
					_list.push(this.defaultTijiaoTitleList[2])
				}
				if (this.classModel.isQuestion == 1) {
					_list.push(this.defaultTijiaoTitleList[3])
				}
				// return _list
				if (_list.length > 0) {
					console.log('是否进入了这里666666666666',this.tijiaoTitleIndex);
					this.tijiaoTitleList = _list
					this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex )
					// this.tijiaoTitleId = this.tijiaoTitleList[0].id
				}
				// this.tabId = 
			},
			getBlankNumber() {
				this.blankNumber = 0
				if (this.classModel.isTask == 1) {
					this.blankNumber++
				}
				if (this.classModel.isMedicalcase == 1) {
					this.blankNumber++
				}
				if (this.classModel.isExperience == 1) {
					this.blankNumber++
				}
				if (this.classModel.isQuestion == 1) {
					this.blankNumber++
				}

				// if(this.classModel.isExam == 1){
				// 	this.blankNumber++
				// }	
			}
		},
		methods: {
			// 获得思考题列表及答案
			async getQuestionsList() {
				console.log('是否进入了思考题请求？？？？？？？？？？？？');
				var list = []
				await $http.request({
						url: "common/class/getThinkQuestionListStudent",
						method: "POST",
						data: {
							"classId": this.classId
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async (res) => {
						if (res.code == 0) {
							if (res.getThinkQuestionListStudent.length > 0) {
								list = res.getThinkQuestionListStudent
							}
						} else {
							uni.showToast({
								title: res.errMsg,
								icon: "none"
							})
						}
					}).catch(e => {
						console.log('获取思考题报错', e);
						uni.showToast({
							title: e.errMsg,
							icon: "none"
						})
					});
				return list
			},
			async showSubmit() {
				// if (this.certificate && this.certificate.id && this.certificate.certificateUrl.length > 3) {
					// 已生成
					uni.navigateTo({
						url: '/pages/certificate/certificate'
					})
				// } else { // 未生成
				// 	this.showSubmitInfoBlank = true

				// }

			},
			async getUserData() {
				let that = this;
				var Ss = undefined
				// 获取个人信息
				if (this.userInfo.id != undefined) {
					await this.$http
						.post('book/user/info/' + this.userInfo.id)
						.then(async (res) => {
							Ss = res.user;
							console.log('that.userData at line 698个人中心:', res.user)
						});
					return Ss
				}
			},
			chooseImage() {
				let that = this
				uni.chooseImage({
					count: 6, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['album'], //从相册选择
					success: function(res) {
						console.log('选择的照片', JSON.stringify(res.tempFilePaths));
						that.submitInfo.img = res.tempFilePaths[0];
					}
				});
			},
			// 全角字符串转半角
			async convertToHalfWidth(str) {
				const fullWidthChars =
					"！＂＃＄％＆＇（）＊＋，－．／【】０１２３４５６７８９：；＜＝＞？＠ＡＢＣＤＥＦＧＨＩＪＫＬＭＮＯＰＱＲＳＴＵＶＷＸＹＺ［＼］＾＿｀ａｂｃｄｅｆｇｈｉｊｋｌｍｎｏｐｑｒｓｔｕｖｗｘｙｚ｛｜｝～";
				const halfWidthChars =
					"!\"#$%&'()*+,-./[]0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
				let result = "";
				for (let i = 0; i < str.length; i++) {
					const char = str[i];
					const index = fullWidthChars.indexOf(char);
					if (index !== -1) {
						result += halfWidthChars[index];
					} else {
						result += char;
					}
				}
				return result;
			},

			// 检测是否已经购买了全部课程
			async checkUserCourse() {
				var msg = ''
				await $http.request({
						url: "common/class/getUserCourseBuy",
						method: "POST",
						data: {
							"classId": this.classId
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async (res) => {
						console.log('课程购买情况',res);
						if (res.code == 0) {
							if (res.msg != '') {
								msg = res.msg
								var outputStr = await this.convertToHalfWidth(res.msg)
								uni.showModal({
									title: '提示',
									content: `您${outputStr}课程没有购买,请尽快购买班级内教学需要的课程，逾期您将被系统自动踢出班级,感谢您的理解和支持`
								})
							}
						}
					}).catch(e => {
						console.log('检测是否已经购买了全部课程报错', e);
					});
				return msg
			},
			selectImage() {
				this.chooseImage()
				// .then(res => {
				//   this.submitInfo.img = res.tempFilePaths[0];
				// });
			},
			// 选中了学生
			chooseStudent(data) {
				return
				console.log('xuesheng', data);
			},
			// 获取服务器时间
			async getServerTime() {
				var time = 0
				await $http.request({
						url: "common/classExam/getServerTime",
						method: "POST",
						data: {},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async (res) => {
						if (res.code == 0) {
							time = res.serverTime
						} else {
							time = -1
						}
					}).catch(e => {
						time = -1
					});
				return time
			},
			goToPaper(id) {
				uni.navigateTo({
					url: `/pages/miniClass/paperBack?id=${id}`
				})
			},
			timeup() {
				this.showCountDown = false
			},

			// 获取试卷列表
			async getPaperList() {
				console.log('--------------', parseInt(this.classId), this.userInfo.id);
				await $http.request({
						url: "common/classExam/getExamPaperList",
						method: "POST",
						data: {
							"classId": parseInt(this.classId),
							"userId": this.userInfo.id
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then((res) => {
						if (res.code == 0) {
							console.log('获取试卷列表', res);
							this.paperList = res.examPaper
							if (this.paperList.length > 0) {
								var _list = [...this.paperList]
								_list = _list.map(item => {
									return item.score
								})
								var maxNmber = 0
								for (var i = 0; i < _list.length; i++) {
									if (_list[i] > maxNmber) {
										maxNmber = _list[i]
									}
								}
								this.paperSore = maxNmber
							} else {
								this.paperSore = 0
							}
						} else {
							this.paperSore = 0
							uni.showToast({
								title: errMsg,
								icon: 'none'
							})
						}

					}).catch(e => {
						this.paperSore = 0
						console.log('获取试卷列表失败', e);
						uni.showToast({
							title: '获取试卷列表失败',
							icon: 'none'
						})
					});
			},
			// 考试周和结班状态下，学员的信息
			async getStudentScoreList() {
				console.log('进来了码？');
				var list = undefined
				await $http.request({
						url: "common/class/userScoreList",
						method: "POST",
						data: {
							"classId": parseInt(this.classId)
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(res => {
						// console.log('考试周班状态下，学员的信息', this.classId, res, );
						// this.userMsg = res.user
						// list = studentList
						if (res.code == 0) {
							res.result.forEach(item => {
								item.task0Score ? '' : item.task0Score = 0 // 固定任务
								item.questionScore ? '' : item.questionScore = 0 // 思考题
								item.task1Score ? '' : item.task1Score = 0 /// 医案
								item.experienceScore ? '' : item.experienceScore = 0 // 心得
								item.pingshiScore = item.task0Score + item.questionScore + item
									.task1Score + item.experienceScore
							})
							list = res.result
						} else {

							uni.showToast({
								title: res.errMsg,
								icon: 'none',
								duration: 3000
							})
						}
					}).catch(e => {
						console.log('走异常了吗？', e);
						list = []
						uni.showToast({
							title: e.errMsg,
							icon: 'none',
							duration: 3000
						})
					});
				return list
			},
			goTest() {
				console.log('this.ingPaper', this.ingPaper);
				if (this.ingPaper) {
					uni.showModal({
						title: '提示',
						content: '您有一项正在进行中的考试，请完成后再开启本班级的考试',
						showCancel: false,
						confirmText: '好的'
					})
					return
				}
				uni.navigateTo({
					url: `/pages/miniClass/test?classId=${this.thisClass.id}&testDuration=${this.classModel.examTime}`
				})
			},
			changeZheDie(item, index) {

				this.taskList[index].zhedie = !this.taskList[index].zhedie
			},
			// 获取用户身份
			getUserRole() {
				$http.request({
						url: "common/class/getUserRole",
						method: "POST",
						data: {
							"classId": this.classId
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then((res) => {
						uni.hideLoading()
						console.log('res获取身份信息', res);
						this.roleCode = res.result
					}).catch(e => {
						uni.hideLoading()
						this.roleCode = []
						uni.showToast({
							title: '获取身份信息失败',
							icon: 'error'
						})
					});

			},
			// 生成证书
			createCertificate() {
				debounce(async () => {
					if(this.certificateFlag) return
					
					if (this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != '' &&
						this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != '') {
					
					} else {
						uni.showModal({
							title: '提示',
							content: "真实姓名或证书照片未设置，请设置完成后再来生成证书吧",
							cancelText: '稍后设置',
							confirmText: '立即设置',
							success: (res) => {
								if (res.confirm) {
									uni.navigateTo({
										url: '/pages/mine/userInfo/persData'
									})
								}
							}
						})
						return
					}
					var type = undefined
					if (this.performanceScore.userScore >= 60 && this.performanceScore.userScore < 70) {
						type = 'B'
					} else if (this.performanceScore.userScore >= 70) {
						type = 'A'
					} else {
						uni.showToast({
							title: '您的成绩未达到证书水平，请继续努力',
							icon: 'none'
						})
						return
					}
					this.certificateFlag = true
					uni.showLoading({
						title:'正在生成'
					})
					var data = {
						 "id": this.certificate.id   //证书id
					}
					// console.log('证书提交数据',data,this.performanceScore.userScore);	
					$http.request({
							url: "common/class/generateCertificateClass",
							method: "POST",
							data,
							header: { //默认 无 说明：请求头
								'Content-Type': 'application/json'
							},
						})
						.then(async (res) => {
							uni.hideLoading()
							
							if (res.code == 0) {
								console.log('证书返回值', res);
								uni.showToast({
									title: '生成成功',
									icon: 'success'
								})
								setTimeout(() => {
									this.closeManager()
									this.getScore()
								}, 300)
							} else {
								uni.showToast({
									title: res.errMsg,
									icon: 'none'
								})
							}
							setTimeout(()=>{
								this.certificateFlag = false
							},300)
							
						}).catch(e => {
							 this.certificateFlag = false
							uni.hideLoading()
							uni.showToast({
								title: e.errMsg,
								icon: 'none'
							})
						});
				},300)
				
			},
			// 查询平时表现分+ 最终成绩 + 可加入的新班级 + 证书信息
			async getScore() {
				$http.request({
						url: "common/class/getUserScore",
						method: "POST",
						data: {
							"classId": this.classId,
							"userId": this.userInfo.id
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async (res) => {
						if (res.code == 0) {
							this.performanceScore = res.result
							// console.log('平时成绩e-------', this.performanceScore);
							if (this.performanceScore.userScore < 60 && this.thisClass.state == '2') {
								this.getNewCLassInfo()
							} else {
								// >= 60
								if (this.thisClass.state == '2') {
									var certificate = await this.getCertificateInfo()
									if (certificate && certificate.length > 0 && certificate[0].id) {
										this.certificate = certificate[0]
									}
									console.log('this.certificate', certificate);
								}

							}
						} else {
							uni.showToast({
								title: '平时成绩获取失败',
								icon: 'none'
							})
						}
					}).catch(e => {
						uni.showToast({
							title: '平时成绩获取失败',
							icon: 'none'
						})
					});
			},
			// 查询证书获得情况
			async getCertificateInfo() {
				var _obj = undefined
				await $http.request({
						url: "common/class/getUserCertificateByClassId",
						method: "POST",
						data: {
							"classId": this.classId,
							"userId": this.userInfo.id
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then((res) => {
						if (res.code == 0) {
							// this.newCLass = res.result
							console.log('证书数据', res);
							_obj = res.userCertificate
						}
					}).catch(e => {
						_obj = undefined
						console.log('证书接口报错', e);
						uni.showToast({
							title: e.errMsg,
							icon: 'none'
						})
					});
				return _obj
			},
			// 可加入的同模型下待开班班级
			getNewCLassInfo() {
				$http.request({
						url: "common/class/getNoOpenClassSameClass",
						method: "POST",
						data: {
							"modelId": this.classModel.id
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then((res) => {
						if (res.code == 0 && res.result != null && res.result != 'null') {
							this.newCLass = res.result
							console.log('同模型的待开班班级', this.newCLass);
						} else {
							console.log('走这里吗码码码码码');
							this.newCLass = undefined
						}
					}).catch(e => {
						this.newCLass = undefined
						console.log('e', e);
						// uni.showToast({
						// 	title: '平时成绩获取失败',
						// 	icon: 'none'
						// })
					});
			},
			editMyXinde(item) {
				// var options = JSON.stringify(item)
				uni.navigateTo({
					url: `/pages/miniClass/addHomeWork?id=${item.id}&type=2`
				})
			},
			// 继续考试
			continueTest(id) {
				uni.navigateTo({
					url: `/pages/miniClass/continueTest?id=${id}&classId=${this.classId}`
				})
			},
			radioChange1(e) {
				this.myExperience = e.detail.value
				console.log('点了', this.myExperience);
				this.pPage = 0
				this.taskList = []
				this.getList()
			},
			goPingfen(url, classId, type) {
				uni.navigateTo({
					url: `${url}?classId=${classId}&type=${type}`
				})
			},
			clickCourseTab(index, id) {
				if (this.curCourseIndex == index) {
					return
				} else {
					this.curCourseIndex = index
					this.curCourseId = id
				}

			},
			// 滑块滚动
			tabsClickCourseTab(e){
				console.log('滑块滚动',e);
				if (this.curCourseIndex == e.index) {
					return
				} else {
					this.curCourseIndex = e.index
					this.curCourseId = e.id
				}
			},
			// 跳转到播放页面
			jumpToVideoPage(val) {
				uni.navigateTo({
					url: `/pages/course/chapterDetailAndorid?navTitle=${this.questionsList[this.curCourseIndex].courseEntity.title}
						&title=${val.title}&courseId=${this.questionsList[this.curCourseIndex].courseEntity.id}
						&id=${val.id}&noRecored=false`,
				});

			},
			// 点击作业或者医案，进入详细介绍
			clickTask(item,index) {
				// var options = JSON.stringify(item)
				if (this.tijiaoTitleId == 2) {
					// 进入的是心得
					uni.navigateTo({
						url: `/pages/miniClass/xindeDetail?id=${item.id}`
					})
					return
				}
				if(index+1<=this.currentStudyNumber || this.currentStudyNumber == 0){
uni.navigateTo({
					url: `/pages/miniClass/taskDetail?id=${item.id}&classState=${this.thisClass.state}`
				})
				}
				
			},
			delClass() {
				var that = this
				uni.showModal({
					title: '提示',
					content: '您正在执行删除班级操作，是否继续？',
					success: function(res) {
						if (res.confirm) {
							$http.request({
									url: "common/class/delClass",
									method: "POST",
									data: {
										"classId": that.thisClass.id
									},
									header: { //默认 无 说明：请求头
										'Content-Type': 'application/json'
									},
								})
								.then((res) => {
									uni.showToast({
										title: '删除成功',
										icon: 'success'
									})
									setTimeout(() => {
										uni.navigateTo({
											url: '/pages/miniClass/miniClassMan'
										})
									}, 500)
								}).catch(e => {
									uni.showToast({
										title: '删除失败',
										icon: 'error'
									})
								});
						}
					}
				})
			},
			async getingPaper() {
				var obj = undefined
				await $http.request({
						url: "common/classExam/examingPaper",
						method: "POST",
						data: {},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async (res) => {
						console.log('考试中999999999999999999', res);
						if (res.code == 0) {
							if (res.classExamUser != null) {
								obj = {
									...res.classExamUser,
									planEndTime: res.planEndTime
								}
								// obj
							} else {
								obj = undefined
							}
						}
					}).catch(e => {
						console.log('考试中99999异常999', e);
					});
				return obj

			},

			getList() {
				 console.log('进入函数了吗--------------------------------------');
				this.status = 1;
				if (this.loadFlag) {
					console.log("有未完成的进程");
					return;
				}
				uni.showLoading({
					title: '加载中'
				})
				this.loadFlag = true;
				this.pPage++;
				var data = {
					"limit": 10,
					"page": this.pPage,
					"classId": this.thisClass.id,
					"type": this.tijiaoTitleId + '', //类型 0班内任务1医案2心得
					"myExperience": this.tijiaoTitleId != 2 ? "0" : "1", //0全部心得1我的心得 this.myExperience
					"title": ""
				}
				console.log('data任务/心得', this.pPage ,data);
				// let that = this
				const pp = this.pPage
				$http.request({
						url: "common/class/getClassTaskListStudent",
						method: "POST",
						data,
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(res => {
						if (res.code == 0) {
							// that.pPage = 3
							if (res.page.records.length > 0) {
								console.log('数据获取成功', res.page.records);
								var lis = res.page.records
								lis.forEach(item => {
									item.zhedie = false
								})
								this.taskList = this.taskList.concat(lis)								
								if (res.page.pages > pp) {
									this.status = 0;
								} else {
									this.status = 2;
								}
								console.log('res.page.pages > this.pPage',res.page.pages,pp,this.status);
							} else {
								this.status = 3; // 暂无数据
							}
							
							console.log('res', res);
							uni.hideLoading()
							setTimeout(()=>{
								this.loadFlag = false;
							},400)
							
						} else {
							console.log('数据获取失败.......', res);
						}
					}).catch(e => {
						console.log('数据报错', e)
						uni.hideLoading()
						this.loadFlag = false;
						uni.showToast({
							title: e.msg,
							icon: 'error'
						})
					});
			},
			async titleClick(item, textIndex) {
				
				console.log('进来了吗titleClick', item, textIndex);
				if(this.loadFlag){
					uni.showToast({
						title:'操作太快了，休息一下吧',
						icon:'none',						
					})
					return
				}
				if (item.id == '3') {
					this.tijiaoTitleId = item.id
				    this.tijiaoTitleIndex = textIndex
					this.questionsList = await this.getQuestionsList()
					if (this.questionsList.length > 0) {
						this.curCourseId = this.questionsList[this.curCourseIndex].courseEntity.id
						this.tabCourseList = this.questionsList.map(item => {							
							return item.courseEntity
						})
						this.tabCourseList.forEach(item1 => {
							item1.name = item1.title
						})
					}
					return
				}				
				this.tijiaoTitleId = item.id
				this.tijiaoTitleIndex = textIndex
				console.log('e班内提交子按钮', this.tijiaoTitleId);

				this.pPage = 0
				this.taskList = []
				this.myExperience = '1'
				this.getList()
			},
			getUserInfo() {
				// 获取个人信息
				if (this.userInfo.id != undefined) {
					this.$http.post("common/user/getUserInfo").then((res) => {
						this.userMes = res.result;
						this.isMonitor = res.isMonitor
						this.isDirector = res.isDirector
					}).catch(e => {
						uni.showToast({
							title: '获取用户信息失败',
							icon: 'none'
						})
					});
				}
			},
			// 添加心得
			addXinde(url, id, modeType) {
				uni.navigateTo({
					url: `${url}?classId=${this.thisClass.id}&type=${modeType}&sort=undefined`
				});
			},
			// 跳转
			onPageJump(url, id, modeType) {
				uni.navigateTo({
					url: `${url}?id=${id}&type=${modeType}`
				});
			},
			tabClick(e) {
				console.log('e', e);
				this.tabId = e.id
				this.curTagIndex = e.index
				if (e.id == 3) {
					console.log('心得');
					this.getList()
				}

			},
			hourUp(start, e) {
				// 比现在多几个小时
				// var end = Date.now()
				var startTimeDate = new Date(start)
				var startTime = startTimeDate.getTime();
				var step = 1000 * 60 * 60 * e // 时间间隔
				var interval = startTime + step; //开始 + 时长 = 结束的毫秒数
				// var a = new Date(interval)
				console.log('aaaaaaaaaa结束时间的毫秒数，时间戳', interval);
				return interval
			},
			formatRichText(html) {
				if (html == '') {
					return
				}
				//控制图片大小
				let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
					match = match
						.replace(/style="[^"]+"/gi, "")
						.replace(/style='[^']+'/gi, "");
					match = match
						.replace(/width="[^"]+"/gi, "")
						.replace(/width='[^']+'/gi, "");
					match = match
						.replace(/height="[^"]+"/gi, "")
						.replace(/height='[^']+'/gi, "");
					return match;
				});
				newContent = newContent.replace(
					/style="[^"]+"/gi,
					function(match, capture) {
						match = match
							.replace(/width:[^;]+;/gi, "max-width:100%;")
							.replace(/width:[^;]+;/gi, "max-width:100%;");
						return match;
					}
				);
				newContent = newContent.replace(/<br[^>]*\/>/gi, "");
				newContent = newContent.replace(
					/\<img/gi,
					'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
				);
				return newContent;
			},
			// 加入班级
			async addClass() {
				$http.request({
						url: "common/class/joinClass",
						method: "POST",
						data: {
							"classId": this.classId,
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async res => {
						if (res.code == 0) {
							// this.isHave = true
							uni.showToast({
								title: `加入成功！`,
								icon: 'success'
							})
							setTimeout(async () => {
								this.getClassInfo()
								this.buyCourseMsg = await this.checkUserCourse()
							}, 200)
						}else{
							uni.showToast({
								title: res.errMsg,
								icon: 'none'
							})
						}
					}).catch(e => {
						console.log(e, '数据报错')
						// this.status = 3
						uni.showToast({
							title: e.errMsg,
							icon: 'none'
						})
					});
			},
			// 显示班级成员
			seeManager() {
				this.showMan = true
			},

			closeManager() {
				this.showMan = false
				this.showTestTips = false
				this.showPaperList = false
				this.showSubmitInfoBlank = false
			},

			// 改变班级状态
			changeClassStatu(statusCode) {
				if (statusCode == '1') {
					// console.log('this.admins',this.admins);
					if (this.admins.list.length == 0) {
						uni.showToast({
							title: '请先完成管理人员的设置',
							icon: 'none'
						})
						return
					}
				}
				$http.request({
						url: "common/class/editClass",
						method: "POST",
						data: {
							"id": this.thisClass.id,
							"title": this.thisClass.title,
							"state": statusCode, //小班状态0待开班1已开班2完成
							"icon": this.thisClass.icon,
							"content": this.thisClass.content,
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(res => {
						if (res.code == 0) {
							// that.isHave = true
							uni.showToast({
								title: '操作成功',
								icon: 'success'
							})
							setTimeout(() => {
								this.getClassInfo()
							}, 500)
						}
					}).catch(e => {
						console.log(e, '数据报错')
						// this.status = 3
						uni.showToast({
							title: e.msg,
							icon: 'error'
						})
					});
			},
			taskEdit(item) {
				console.log('taskEdit'.item);
			},
			// 图片预览
			preveImg(url) {
				console.log('dianjile fangda tu');
				uni.previewImage({
					urls: [url],
					current: 0
				});
			},
			// 退出班级 // 踢出班级
			outClass(userId) {
				let that = this
				var _useId = undefined
				var _txt = ''
				_useId = this.userInfo.id
				_txt = '您即将退出当前班级，退出班级后，在本班级提交的作业、医案、心得都将被删除，是否继续？'


				uni.showModal({
					title: '提示',
					content: `${_txt}`,
					success: function(res) {
						if (res.confirm) {
							// console.log('用户点击确定');
							$http.request({
									url: "common/class/quitClass",
									method: "POST",
									data: {
										"classId": that.classId,
										"userId": _useId
									},
									header: { //默认 无 说明：请求头
										'Content-Type': 'application/json'
									},
								})
								.then(res => {
									if (res.code == 0) {
										// that.isHave = true
										uni.showToast({
											title: `退出成功！`,
											icon: 'success'
										})
										setTimeout(() => {
											uni.navigateTo({
												url: '/pages/miniClass/myClassList'
											})
										}, 200)
									}
								}).catch(e => {
									console.log(e, '数据报错')
									// this.status = 3
									uni.showToast({
										title: `退出失败`,
										icon: 'error'
									})
								});
						} else if (res.cancel) {
							console.log('用户点击取消');
							return
						}
					}
				});
			},
			clickHelp() {
				uni.showModal({
					title: '说明',
					content: `表现分由${this.classModel.isTask == 1 ? '作业('+this.classModel.taskScore+'%)，' : ''}${this.classModel.isMedicalcase == 1 ? '医案('+this.classModel.medicalcaseScore+'%)，' : ''}${this.classModel.isExperience == 1 ? '心得('+this.classModel.experienceScore+'%)，' : ''} ${this.classModel.isQuestion == 1 ? '思考题('+this.classModel.questionScore+'%)' : ''}构成,班内总成绩总分为100分。`,
					showCancel: false,
					confirmText: '好的'
				})
			},
			showmoreTask() {
				uni.navigateTo({
					url: `/pages/miniClass/classCaskList?id=${this.thisClass.id}&type=${this.tijiaoTitleId}`
				})
			},
			async getClassInfo() {
				uni.showLoading({
					title: '正在加载'
				})
				await $http.request({
						url: "common/class/getClassInfo",
						method: "POST", // POST、GET、PUT、DELETE，具体说明查看官方文档
						data: {
							"classId": this.classId // 班类型 0小班 1联合班 2精英班
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(async res => {
						console.log('班级信息', res);
						this.refresh = false
						if (res.code == 0) {
							this.isHave = res.result.isJoin
							this.thisClass = res.result.class



							
      const nowTime = new Date().getTime();
      console.log("nowTime at line 107:", nowTime, this.thisClass.startTime);
      var studyTime =
        Number(nowTime - new Date(this.thisClass.startTime).getTime()) / (1000 * 60 * 60 * 24) / 7;
      console.log("studyTime at line 108:", Math.ceil(studyTime));
      this.currentStudyNumber = Math.ceil(studyTime);

							// if (this.thisClass.state == '0') {
							// 	this.tabId = '0'

							// } else {
							// 	this.tijiaoTitleId = '0'
							// 	this.tabId = '3'
							// 	console.log('-------------------+');
							// }
							this.admins.list = res.result.admins
							this.admins.monitor = {}
							this.admins.dmonitor = {}
							this.admins.learner = {}
							this.admins.scorer = []
							this.admins.counter = []
							if (res.result.admins.length > 0) {
								res.result.admins.forEach(item => {
									if (item.role == '1') {
										this.admins.monitor = item
									}
									if (item.role == '2') {
										this.admins.dmonitor = item
									}
									if (item.role == '3') {
										this.admins.learner = item
									}
									if (item.role == '4') {
										// console.log('this.admins.counter',this.admins.counter);
										this.admins.scorer.push(item)
									}
									// if (item.role == '5') {
									// 	// console.log('this.admins.counter',this.admins.counter);
									// 	this.admins.counter.push(item)
									// }

								})
							}

							this.classModel = res.result.classModel
							this.courses = res.result.courses

							if (this.thisClass.state == '3' || this.thisClass.state == '2') {
								// 考试周 结班状态下的
								this.students = await this.getStudentScoreList()
								console.log('students考试周 结班状态下的', this.students);
							} else {
								this.students = res.result.students
							}
							this.refresh = true
							var ss = this.getTijiaoTitleList
							if (this.thisClass.state != 0 && this.tabId != '3') {
								this.pPage = 0
								this.taskList = []
								if (this.tijiaoTitleList.length > 0) {
									if (this.firstLoad) {
										this.firstLoad = false
										this.tijiaoTitleId = this.tijiaoTitleList[this.tijiaoTitleIndex].id

									}
									this.getList()
								}
							}
							var dd = this.getBlankNumber
						}
						uni.hideLoading()
					}).catch(e => {
						uni.hideLoading()
						console.log(e, '数据报错')
						// this.status = 3
						uni.showToast({
							title: `获取数据失败`,
							icon: 'error'
						})
					});
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "@/style/mixin.scss";
	::v-deep .xueyuanTitle {
		.uni-section-header {
			float: left;
		}
	
		.uni-section-content {
			float: right;
			margin-top: 20rpx;
			font-size: 26rpx;
		}
	}
	.score {
		color: #55aaff;
		font-size: 30rpx !important;
		font-weight: bold;
	}

	.flexbox {
		display: flex;
	}

	.classStatus {
		padding: 10rpx;
		color: #fff;
	}

	.daikai {
		background-image: linear-gradient(90deg, #258feb 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
	}

	.kaoshizhou {
		background-image: linear-gradient(90deg, #ffaa00 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);

		// background-image: linear-gradient(-90deg, # 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
	}

	.xuexizhong {
		background-image: linear-gradient(90deg, #55aa00 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
	}

	.yijieban {
		background-image: linear-gradient(90deg, #999 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
	}

	.noanser {
		padding: 20rpx;
		background-color: rgba(255, 255, 255, .6);
		text-align: center;
		border-bottom: 1px solid #eee;

		.btn {
			display: inline-block;
			border-radius: 20rpx;
			padding: 10rpx 20rpx;
			background-color: $themeColor;
			color: #fff;
		}
	}

	.taskEdit {
		color: $themeColor;
		display: inline-block;
		padding-left: 20rpx;
	}

	.scoreTitle {
		text-align: center;
		margin-bottom: 20rpx;

		.titles {
			display: inline-block;
			padding: 6rpx 20rpx;
			background-color: #258feb;
			border-radius: 0 0 30rpx 30rpx;
			color: #fff;

			text {
				font-size: 40rpx !important;
			}
		}

		span {
			display: block;
		}
	}

	.testBox {
		.mainTxt {
			color: #55aa00 !important;
		}

		.scoreTitle {
			.titles {
				background-color: #55aa00;
			}
		}
	}

	.pingfenBox {
		border: 2px dotted #bed4ee;
		padding: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
		padding-top: 0;

		.flex_box {
			justify-content: space-between;
		}

		.item {
			text-align: center;

			text {
				font-size: 28rpx;
				display: inline-block;
				padding-top: 20rpx;
			}
		}

		.img {
			width: 100rpx;
			height: 100rpx;
			margin: 0 auto;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.testBox {
		border-color: #aee5b5;
		margin-bottom: 20rpx;
	}

	.zhengshu {
		margin-left: 20rpx;
		color: #55aa7f;
		font-size: 28rpx;
		border: 1px solid #55aa7f
	}

	.chongxiu {
		color: #00aaff;
		border: 1px solid #00aaff
	}

	.greenScore {
		color: #55aa00;
	}

	.blueScore {
		color: #00aaff;
	}

	.yellowScore {
		color: #ffaa00;
	}

	.redScore {
		color: #ff8a8c;
	}

	.scoreNumber {
		// display: block; margin: 20rpx 0;
		font-size: 60rpx;
	}

	.upopBox {
		padding: 40rpx;
		max-height: 80vh;
		overflow-y: scroll;
		color: #666;

		.item {
			padding: 10rpx 0;
			border-bottom: 1px solid #eee;
		}
	}

	.scoreBox {
		align-items: center;
		border: none !important;
		margin-top: 20rpx;
		text-align: center;
		background-color: #fff;
		padding: 10rpx 20rpx;

		.ciyao {
			color: #999;
			margin-bottom: 20rpx;
		}

		.score {
			color: #258feb;
			font-weight: bold;
			font-size: 36rpx;
		}

		.seePaper {
			width: 50rpx;
			height: 50rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.stickyyy {
		padding: 20rpx;
		color: #fff;
		background-color: #ff9277;
	}

	.chengji {
		padding-top: 20rpx;
		margin-top: 20rpx;
		border-top: 1px solid #eee;
	}

	.chengji.zong {
		margin-top: 0;
		padding-top: 0;
		border-top: none;
	}

	.manBtnBox {
		justify-content: center;

		text {
			width: 30%;
			font-size: 28rpx;
			padding: 20rpx 0;
			border-radius: 10rpx;
			display: block;
			margin: 0 20rpx;
			color: #fff;
		}

		.edit {
			background-color: $themeColor;
		}

		.del {
			background-color: #ffa4a6;
		}

		.set {
			background-color: #ffca7e;
		}

	}

	.showMore {
		width: 100%;
		text-align: center;
		margin: 20rpx 0;

		text {
			color: $themeColor;
		}
	}

	.questJUmp {
		font-size: 28rpx;
		text-align: center;
		color: #55aaff;
	}

	.submitRecode {
		// padding: 20rpx;

		.newBox {
			.classmateImg {
				width: 40rpx !important;
				height: 40rpx !important;

				image {
					width: 40rpx !important;
					height: 40rpx;
				}
			}

			.item {
				background-color: #fff;
				border-radius: 20rpx;
				box-shadow: none !important;
				// border-bottom: 1px solid #eee;
				// border-radius: 0 !important;

				.leve1 {
					align-items: center;
					border-bottom: 1px dashed #eee;
					padding-bottom: 20rpx;
					margin-bottom: 20rpx;
					// .userName{}
					.btn1 {
						color: $themeColor;
						font-size: 30rpx;
					}
				}

				.leve2 {
					color: #666;
					line-height: 56rpx;
					@include bov(3);
					padding-bottom: 6rpx;
					border-bottom: 1px dotted #eee !important;
				}

				.leve3 {

					color: $themeColor;
					text-align: center;
					padding-top: 10rpx;

					.tips {
						width: 100%;
						justify-content: space-between;
						font-size: 26rpx;
						color: #999;
					}

					.date {}

					

					.btn {
						border: 1px solid $themeColor;
						margin-top: 20rpx;
						display: inline-block;
						width: 50%;
						padding: 6rpx 0;
						border-radius: 10rpx;
					}
				}

				.leve3{
					.no{
					color: #ff9277;
					text-align: center;}
					.pIng{
						color: #55aa00;
					}
					.cantAnswer{
					color: #999;
					text-align: center;}
				}
				
			}
		}
	}

	.questionbox {
		.leve1 {
			border: none !important
		}
	}

	.zhedie {
		@include bov(2);
	}

	.nobg {
		background-color: transparent !important;
	}

	.nopad {
		padding-left: 0 !important;
	}

	.bottomBox {
		border-top: 1px solid #eee;
		position: fixed;
		padding: 20rpx 0;
		text-align: center;
		bottom: 0;
		left: 0;
		z-index: 2;
		width: 100%;
		background-color: #fff;

		button {
			width: 80%;
			margin: 0 auto;
			border-radius: 40rpx;
		}
	}

	.userScore {
		text-align: center;

		.ite.flex_box {
			align-items: end;

			.ciyao {
				margin-right: 10rpx;
			}
		}

		.mainTxt {
			font-size: 50rpx;
			color: $themeColor;
			font-style: normal;
			padding-right: 4rpx;
		}
	}

	.qrcode {
		width: 100%;

		image {
			width: 200rpx;
			height: 200rpx;

		}
	}

	.courseTab {
		margin-bottom: 20rpx;
		padding: 8rpx;
		background: #c6d1d5;
		line-height: 50rpx;
		overflow: hidden;

		.item {
			display: block;
			text-align: center;
			height: 50rpx;
			font-size: 26rpx;
			width: 100%;
			padding: 0 6rpx;
			@include toe();
			box-sizing: border-box;
			// text{  }	
		}

		.item.cur {
			@include mshadow(6px, 1);
			background-color: #fff;
		}
	}

	.mainContent {
		color: #333;
		padding: 0 20rpx;
		padding-bottom: 120rpx;
		background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
		min-height: 100vh;
	}

	.gotoExams {
		margin: 60rpx 0;

		text {
			display: block;
			text-align: center;
			width: 100%;
			border-radius: 10rpx;
			box-sizing: border-box;
			padding: 20rpx;
			color: #fff;
			background-image: linear-gradient(-90deg, #576afc 0%, #97a1ff 100%);
		}
	}

	.scoreBox {
		border-top: 1px solid #eee;
		padding-top: 10rpx;
		justify-content: space-around;
		align-items: center;
		margin-top: 20rpx;
		text-align: center;
		background-color: #fff;

		font-size: 26rpx;

		.ciyao {
			color: #999;
		}

		.score {
			color: #258feb;
			font-weight: bold;
			font-size: 36rpx;
		}

	}

	.classMateBox {
		.newBox {
			justify-content: space-between;
			flex-wrap: wrap;
		}

		.zmVip {
			background-image: linear-gradient(-60deg, #53966a 0%, #e1feef 50%, #e1feef 100%);
		}

		.wumenVip {
			background-image: linear-gradient(-60deg, #578df0 0%, #f1f4fd 50%, #f1f4fd 100%);
		}

		.superVip {
			background-image: linear-gradient(-60deg, #965af0 0%, #fdf0ed 50%, #fdf0ed 100%);
		}

		.item {
			width: 48%;
			position: relative;

			.textItems {
				width: 100%;
				align-items: center;

				.outBtn {
					padding: 6rpx 10rpx;
					display: inline-block;
					border-radius: 10rpx;
					color: $themeColor;
					border: 1px solid $themeColor;
					font-size: 26rpx;
				}

				.txt555 {
					font-size: 28rpx;
					color: #333;
				}

				.userType {
					position: absolute;
					font-size: 26rpx;
					right: 30rpx;
					top: 8rpx;
					color: #fff;
				}
			}
		}
	}

	.classmateImg {
		width: 40rpx;
		margin-right: 20rpx;
		height: 40rpx;
		border-radius: 100rpx;

		image {
			width: 40rpx;
			height: 40rpx;
		}
	}

	.mainBox {
		margin-top: 40rpx;

		.tabList {
			border-radius: 20rpx;
			overflow: hidden;
			margin-bottom: 20rpx;
		}

		// background-color: #f4f7ff;
	}

	.newBox {

		.item {
			margin-bottom: 20rpx;
			background-color: #fff;
			border-radius: 20rpx;
			@include ptop_bottm(10px);
			@include pleft_right(10px);

			@include mshadow(10px, 1) .imgcontainer {
				display: block;
				width: 80rpx;
				margin-right: 20rpx;
				// background-size: cover;
				// background-position: center;
				height: 120rpx;
				flex-grow: 1;
				// @include ptop_bottm(10px);
				overflow: hidden;

				// @include pleft_right(10px);
				image {
					width: 100%;
					height: 120rpx;
				}
			}

			.btn_box {
				text-align: right;

				text {
					border-radius: 20rpx;
					padding: 3px 5px;
					@include theme("btn_bg");
					font-size: 28rpx;
					color: #fff;
				}
			}

			.buyItems {
				width: 60%;
			}

			.jianjie {
				line-height: 30rpx;
				height: 60rpx;
				overflow: hidden;
				overflow: hidden !important;
				margin-top: 10rpx;
				font-size: 24rpx;
				@include bov();
				color: #9c9c9c;
			}

			.txt555 {
				font-size: 30rpx;
				color: #000;
				@include bov()
			}
		}
	}

	.alcentertt {
		justify-content: space-around !important;
	}

	.alcenterss {
		justify-content: center !important;
	}

	.otherItems {
		// border: 1px solid #dadada;
		padding: 20rpx;
		// background-color: rgba(255, 255, 255, .5);
		border-radius: 20rpx;
		justify-content: space-between;
		margin: 20rpx 0;

		text {
			display: block;
			font-size: 28rpx;
		}

		.ciyao {
			color: #999;
			margin-bottom: 10rpx;
		}
	}

	.tijiaoTitle {
		justify-content: space-around;
		margin-bottom: 20rpx;

		text {
			display: block;
			// width: 30%; 
			margin: 0 10rpx;
			padding: 8rpx;
			border-radius: 10rpx;
			text-align: center;
			border: 1px solid $themeColor;
			color: $themeColor;
		}

		text.active {
			background-color: $themeColor;
			color: #fff;
		}
	}

	.guanli {
		padding: 40rpx;

		h3 {
			text-align: center;
			margin-bottom: 20rpx;
			color: #333;
		}

		.item {
			color: #333;
			margin-bottom: 20rpx;

			.personbox {
				display: inline-block;
				color: #666;
			}

		}

		.arryItem {
			.arryItemSub {
				display: inline-block;
				color: #666;
				// padding-left: 80rpx;
			}
		}

		text {
			font-size: 30rpx;
		}
	}

	.adminName {
		color: #333;
		font-size: 30rpx;
		font-weight: bold;
	}

	.banjiJianjie {
		color: #666;
		font-size: 30rpx;
		margin-top: 20rpx;
	}

	.className {
		padding: 30rpx 0;
		position: relative;

		h3 {
			font-size: 36rpx;
		}

		text {
			color: #fff;
			display: inline-block;
			padding: 10rpx 20rpx;
			border-radius: 10rpx;
			position: absolute;
			right: 0;
			top: 20rpx;
			z-index: 1;
		}

		text.kaiban {
			background-color: #67c23a;
		}

		text.jieban {
			background-color: $themeColor
		}

		text.tuichu {
			background-color: #f4a2a6;
		}
	}

	.optionsBox {}

	.btn_box_certificate {
		margin-top: 70rpx;
		padding-bottom: 20rpx;

		button {
			font-size: 32rpx;
			@include theme('btn_bg') color: #fff;
			height: 80rpx;
			line-height: 80rpx;
			border-radius: 50rpx;
		}
	}

	.retake {
		border: 1px solid #55aa00;
		color: #55aa7f;
	}

	.mr20rpx {
		margin-right: 20rpx;
	}

	.userinfoPup {
		.tips {
			// .item{justify-content: space-around;}
		}

		.small_btn {
			color: #55aaff;
			border: #55aaff 1px solid;
		}
	}
</style>