<template>
	<view>
		<public-module></public-module>
		<z-nav-bar title="班级详情"></z-nav-bar>
		<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);">		 -->
		<view class="mainContent" v-if="thisClass.id">
			<view class="className">
				<h3>{{thisClass.title}}</h3>
				<text class="kaiban" v-if="thisClass.state == '0' && isMonitor || thisClass.state == '0' && isDirector"
					@click="changeClassStatu('1')">开班</text>
				<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector"
					@click="changeClassStatu('2')">结班</text>				
			</view>
			
			<view class="otherItems flex_box">
				<view><text class="ciyao">创建日期</text><text
						class="mainTxt">{{thisClass.createTime.substring(0,10)}}</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">{{thisClass.number}}人</text></view>
				<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
			</view>
			<!-- 作业批改 -->
			<view class="pingfenBox" v-if="isDirector || isMonitor">
				<view class="flex_box">
					<view class="item" @click="goPingfen('/pages/miniClass/giveScore',thisClass.id, '0')">
						<view class="img">
							<image src="../../static/icon/pigai2.png" mode="widthFix"></image>
						</view>
						<text>作业评分</text>
					</view>
					<view class="item">
						<view class="img">
							<image src="../../static/icon/pigai1.png" mode="widthFix"></image>
						</view>
						<text>医案评分</text>
					</view>
					<view class="item">
						<view class="img">
							<image src="../../static/icon/pigai3.png" mode="widthFix"></image>
						</view>
						<text>心得评分</text>
					</view>
					<view class="item">
						<view class="img">
							<image src="../../static/icon/biaoxianfen.png" mode="widthFix"></image>
						</view>
						<text>表现评分</text>
					</view>
				</view>
			</view>
			<view class="" v-if="thisClass.content != ''">
				<text class="adminName">教学目标/班级简介</text>
			</view>
			<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
			<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
			<view class="mainBox">				
				<!-- 课程列表 -->
				<uni-section class="mb-10 nobg" 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>
				<view class="" v-show="courses.length == 0">
					<u-divider text="暂无课程"></u-divider>
				</view>
				<!-- 班内问答 -->
				<!-- <view class="" v-if=" tabId == '1'">
					班内问答
				</view> -->
				<!-- 班内同学 -->
				<uni-section class="mb-10 nobg" title="班内学员" type="line"></uni-section>
				<view class="classMateBox" v-show="students.length> 0">
					<view class="newBox">
						<view :class="['item','flexbox',
						item.vip == '1' ? 'superVip' : '',
						item.vip == '2' ? 'wumenVip' : '', 
						item.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
							<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
							<view class="classmateImg">
								<image v-if="item.avatar != null && item.avatar != ''" :src="item.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.nickname != null && item.nickname != ''">
									{{item.nickname}}
									<template v-if="isDirector || isMonitor">
										<text>（{{item.tel}}）</text> <text @click="outClass(item.id)"
											class="outBtn">踢出班级</text>
									</template>

								</text>
								<text class="txt555" v-else>
									匿名用户
								</text>
								<text class="userType" v-if="item.vip == '1'">超级VIP用户</text>
								<text class="userType" v-if="item.vip == '2' ">医学VIP用户</text>
								<text class="userType" v-if="item.vip == '3' ">国学VIP用户</text>
							</view>

						</view>
					</view>
				</view>
				<view class="" v-show="students.length == 0">
					<u-divider text="暂无学员加入"></u-divider>
				</view>
				<!-- 班内提交 -->
				<view class="" v-if=" tabId == '3' && false">
					<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="">
						
						<view v-if="taskList.length > 0">
							<view class="submitRecode">
								<view class="newBox">
									<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
										<view class="leve1 flex_box">
												<text>{{item.title}}</text><text v-if="isDirector || isMonitor" class="taskEdit" @click="taskEdit(item)">修改</text>
											<!-- <view class="classmateImg">
												 <image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar" mode="aspectFit"></image> 
												<image src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
											</view> -->
											<!-- <view class="userName flex_box">
												<text>匿名用户</text>
											</view> -->
										</view>
										<view class="leve2">
											{{item.content}}
										</view>
									</view>
								</view>
							</view>
							<view class="showMore"  v-show="true">
							<!-- <view class="showMore"  v-show="taskHaveMore"> -->
								<text @click="showmoreTask">查看全部 >></text>
							</view>
						</view>
						<view class="" v-else>
							<u-divider text="暂无数据"></u-divider>
						</view>
						<!-- <uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section> -->
						
					</view>
					
					
				</view>
			</view>
		</view>
		<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor && students.length < thisClass.number">
			<button type="primary" @click="addClass">一键加入班级</button>
		</view>
		<view class="bottomBox manBtnBox flex_box" v-if="isDirector || isMonitor">
			<text class="set" @click="onPageJump('/pages/miniClass/memberSet',thisClass.id)">管理人员设置</text>
			<template v-show="isDirector && thisClass.state == '0'">
				<text class="edit"
					@click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">修改班级</text>
				<text class="del" @click="delClass()">删除班级</text>
			</template>
		</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.id">
						<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.id">
						<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.id">
						<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">
							<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
							<text>({{item.user.tel}}) </text>
						</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">
							<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
							<text>({{item.user.tel}}) </text>
						</view>
					</template>
					<text v-else>暂未设置</text>
				</view>
			</view>
		</u-popup>
		<view class="fabBox" v-if="isDirector || isMonitor">
			<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
				:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
		</view>

		<z-navigation v-if="!isDirector && !isMonitor"></z-navigation>
	</view>
</template>

<script>
	import $http from '@/config/requestConfig.js';
	import {
		mapState
	} from "vuex";
	export default {
		data() {
			return {
				horizontal: 'right',
				vertical: 'bottom',
				direction: 'vertical',
				pattern: {
					color: '#7A7E83',
					backgroundColor: '#fff',
					selectedColor: '#7A7E83',
					buttonColor: '#007AFF',
					iconColor: '#fff'
				},
				fabContent: [{
						iconPath: '/static/icon/pigai2.png',
						selectedIconPath: '/static/icon/pigai2.png',
						text: '发布作业',
						active: false
					},
					{
						iconPath: '/static/icon/pigai1.png',
						selectedIconPath: '/static/icon/pigai1.png',
						text: '发布医案',
						active: false
					},
				],

				thisClass: {},
				students: [],
				tabId: '0',
				curTagIndex: 0,
				scrollable: false,
				tabList: [{
						name: '班内课程',
						id: '0'
					},
					// {
					// 	name: '班内讨论',
					// 	id: '1'
					// }, 
					{
						name: '班内学员',
						id: '2'
					}, 
					// {
					// 	name: '班内提交',
					// 	id: '3'
					// }
				],
				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: [{
						name: '班内任务',
						id: '0'
					},
					{
						name: '医案',
						id: '1'
					},
					{
						name: '心得',
						id: '2'
					},
				],
				tijiaoTitleId: '0',
				taskList:[], // 任务列表
				taskHaveMore:false, // 是否还有更多
			}
		},
		onLoad(e) {
			uni.hideTabBar();
			this.classId = e.id
			this.getUserInfo()
		},
		onPullDownRefresh() {
			this.getClassInfo()
			uni.stopPullDownRefresh()
		},
		onBackPress() {
			if (this.$refs.fab.isShow) {
				this.$refs.fab.close()
				return true
			}
			return false
		},
		onShow() {
			this.getClassInfo()
		},
		computed: {
			...mapState(["userInfo"]),
		},
		methods: {
			goPingfen(url,classId,type){
				uni.navigateTo({
					url:`${url}?classId=${classId}&type=${type}`
				})
			},
			// 点击作业或者医案，进入详细介绍
			clickTask(){
				
			},
			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'
									})
								});
						}
					}
				})
			},
			titleClick(item, textIndex) {
				this.tijiaoTitleId = textIndex
				console.log('e班内提交子按钮');
				$http.request({
						url: "common/class/getClassTaskList",
						method: "POST",
						data: {
							"limit": 20,
							"page": 1,
							"classId": this.thisClass.id,
							"type": textIndex+'', //类型 0班内任务1医案2心得
							 "title": ""							 
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(res => {
						if (res.code == 0) {
								console.log('数据获取成功',res.page.records);	
								this.taskList = res.page.records
								if(res.page.pages > 1){
									this.taskHaveMore = true
								}
						}
					}).catch(e => {
						console.log(e, '数据报错')
						// this.status = 3
						uni.showToast({
							title: e.msg,
							icon: 'error'
						})
					});
			},
			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'
						})
					});
				}
			},
			// 跳转
			onPageJump(url, id, modeType) {
				uni.navigateTo({
					url: `${url}?id=${id}&type=${modeType}`
				});
			},
			tabClick(e) {
				console.log('e', e);
				this.tabId = e.id
				if(e.id == 3){
					this.titleClick(undefined,0)
				}
				
			},
			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;
			},
			// 加入班级
			addClass() {
				$http.request({
						url: "common/class/joinClass",
						method: "POST",
						data: {
							"classId": this.classId,
						},
						header: { //默认 无 说明：请求头
							'Content-Type': 'application/json'
						},
					})
					.then(res => {
						if (res.code == 0) {
							this.isHave = true
							uni.showToast({
								title: `加入成功！`,
								icon: 'success'
							})
							setTimeout(() => {
								this.getClassInfo()
							}, 200)
						}
					}).catch(e => {
						console.log(e, '数据报错')
						// this.status = 3
						uni.showToast({
							title: `加入失败`,
							icon: 'error'
						})
					});
			},
			// 显示班级成员
			seeManager() {
				this.showMan = true
			},
			closeManager() {
				this.showMan = false
			},
			fabClick() {
				// uni.showToast({
				// 	title: '点击了悬浮按钮',
				// 	icon: 'none'
				// })
			},
			fabTrigger(e) {
				console.log(e)
				this.fabContent[e.index].active = !e.item.active
				var _url = '/pages/miniClass/addHomeWork'
				var _type = '0'
				if (e.index == 0) {
					// 发布作业/医案										
					_type = '0'
				} else {
					_type = '1'
				}
				this.$refs.fab.close()
				setTimeout(() => {
					uni.navigateTo({
						url: `${_url}?id=${this.thisClass.id}&type=${_type}`
					})
				}, 200)				
			},
			// 改变班级状态
			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);
			},
			// 退出班级 // 踢出班级
			outClass(userId) {
				let that = this
				var _useId = undefined
				var _txt = ''
				if (userId) {
					_useId = userId
					_txt = '即将踢出该学员，是否继续？'
				} else {
					_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
						}
					}
				});
			},
			showmoreTask(){
				uni.navigateTo({
					url:`/pages/miniClass/classCaskList?id=${this.thisClass.id}&type=${this.tijiaoTitleId}`
				})
			},
			getClassInfo() {
				uni.showLoading({
					title: '正在加载'
				})
				$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(res => {
						this.refresh = false
						if (res.code == 0) {
							this.isHave = res.result.isJoin
							this.thisClass = res.result.class
							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
							this.students = res.result.students
							this.refresh = true

						}
						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";

	.flexbox {
		display: flex;
	}

	.fabBox {}

	::v-deep .uni-fab__content--other-platform,
	::v-deep .uni-fab--rightBottom {
		bottom: 100px !important;
	}

	::v-deep .uni-fab__content--other-platform {
		box-shadow: none !important;
	}

	::v-deep .fab-circle-icon {
		display: none !important;
	}

	::v-deep .uni-fab__circle::after {
		content: '发布';
		color: #fff;
		font-weight: normal;
	}
	.taskEdit{color: $themeColor; display: inline-block; padding-left: 20rpx;}
	.pingfenBox {
		border: 2px dotted #bed4ee;
		padding: 20rpx;
		background-color: rgba(255, 255, 255, .6);
		border-radius: 20rpx;

		.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%;
			}
		}
	}

	.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;}
		}
	.submitRecode {		
		// padding: 20rpx;
		
		.newBox {
			.classmateImg {
				width: 60rpx !important;
				height: 60rpx !important;

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

			.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{}
				}
				.leve2{
					color: #999;
					@include bov()
				}
			}
		}
	}

	.nobg {
		background-color: transparent !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;
		}
	}

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

	.classMateBox {
		.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: 100%;
			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: 80rpx;
		margin-right: 40rpx;
		height: 80rpx;
		border-radius: 100rpx;

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

	.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()
			}
		}
	}

	.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-between;
		margin-bottom: 20rpx;
		text {
			display: block;
			width: 30%;
			padding: 8rpx 0;
			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;
		}
	}
</style>