<script>
	import StaticConstant from "@/common/StaticConstant";
	import ApiConstant from "@/common/ApiConstant";
	import Request from '@/common/request'
	import {
		stringIsNotEmpty
	} from "@/common/util";
	import CommonTool from "@/common/js/commonTool";

	let request = new Request()
	const app = getApp()
	export default {
		name: "我的志愿明细",
		data() {
			return {
				list: [],
				vipInfo: {},
				scoreStatus: true,
				moveVolunteer: {
					batch: '', //移动的批次
					indexs: '',
					volunteerId: ''
				},
				volunteerId: '', //志愿id
				scoreInfo: {}, //成绩信息
				volunteerInfo: {}, //志愿单信息
				filledVolunteer: {
					volunteerRecordEarlyAdmissionNum: 0,
					volunteerUndergraduateNum: 0,
					volunteerJuniorCollegeNum: 0,
					volunteerEarlyAdmissionList: [], //本科提前批
					volunteerUndergraduateList: [], //体育本科
					volunteerJuniorCollegeList: [], //高职高专
					volunteerMap: new Map()
				}, //已填志愿信息
				allCollapseItemList: [{
						batchLabel: '提前批',
						batch: '提前批',
						type: '顺序志愿',
						max: app.globalData.StaticConstant.tiQianPiZhiYuanNum,
						status: false,
						saveStatus: false
					},
					{
						batchLabel: '本科批',
						batch: '本科批',
						type: '平行志愿',
						max: app.globalData.StaticConstant.benZhiYuanNum,
						status: false,
						saveStatus: false
					},
					{
						batchLabel: '高职高专',
						batch: '高职高专',
						type: '平行志愿',
						max: app.globalData.StaticConstant.zhuanZhiYuanNum,
						status: false,
						saveStatus: false
					},
				],
				collapseItemList: [],
				volunteerPreview: {},
				dragOptions: {
					isDragging: false,
					draggedItem: null,
					draggedIndex: -1,
					draggedBatch: '',
					targetIndex: -1
				},
				dragTimer: null
			}
		},
		onShow() {
			//
			let userInfo = uni.getStorageSync('userInfo')
			let scoreInfo = uni.getStorageSync('scoreInfo')
			let volunteer = uni.getStorageSync('volunteer')
			
			if (userInfo) {
				//有登录状态
				//判断是否有成绩信息
				if (!scoreInfo) {
					//缓存中没有成绩，后端接口获取成绩
					request.getUserScore()
					scoreInfo = uni.getStorageSync('scoreInfo')
					volunteer = uni.getStorageSync('volunteer')
					this.scoreStatus = !!scoreInfo
				}
				
				this.scoreInfo = scoreInfo
				this.vipInfo = uni.getStorageSync('vipInfo')
			} else {
				//没有登录，跳转到登录页
				this.goto('/pages/zyb/login')
				return
			}

			//有成绩信息，且成绩中返回了志愿单信息
			if (this.scoreInfo && volunteer) {
				this.volunteerId = volunteer.id
			}

			if (stringIsNotEmpty(this.volunteerId)) {
				this.getFilledVolunteerList()
			}
		},
		async onLoad(e) {

			if (e.volunteerId) {
				//从志愿列表进来
				this.volunteerId = e.volunteerId;
			}
			// 志愿单打印配置
			this.volunteerPreview = await CommonTool.loadStaticConfig('volunteer_preview')
		},
		methods: {
			onclick(e) {
				console.log('=== onclick start ===');
				console.log('被点击行: ', JSON.stringify(e));
				console.log('=== onclick end ===');
			},
			change(e) {
				console.log('=== change start ===');
				console.log('被拖拽行: ', JSON.stringify(e.moveRow));
				console.log('原始下标: ', e.index);
				console.log('被拖拽到: ', e.moveTo);
				console.log('=== change end ===');
			},
			confirm(e) {
				console.log('=== confirm start ===');
				console.log('被拖拽行: ', JSON.stringify(e.moveRow));
				console.log('原始下标: ', e.index);
				console.log('被拖拽到: ', e.moveTo);
				console.log('排序后的list: ', e.list);
				// 如果需要删除列表行，必须要排序后，同步一下排序后的list到页面list
				// 因为排序后页面的list和组件内的list已经不一样，不同步list，直接删除页面的list中项目，达不到实际效果。
				console.log('=== confirm end ===');
			},
			goto(url) {
				uni.navigateTo({
					url: url
				})
			},
			gotoSchool(e) {
				this.goto('/pages/zyb/school/detail?schoolCode=' + e)
			},
			topBack() {
				uni.pageScrollTo({
					scrollTop: 0, // 滚动到页面的目标位置  这个是滚动到顶部, 0
					duration: 300 // 滚动动画的时长
				})
			},

			/*获取已填报志愿数据*/
			getFilledVolunteerList() {
				request.get(ApiConstant.Volunteer.artVolunteerDetail, {
					id: this.volunteerId
				}, {
					showLoad: false
				}).then(res => {
					if (res.success) {
						let dataResult = res.result
						//有数据情况下
						const volunteerMap = new Map();
						if (dataResult != null) {
							this.volunteerId = dataResult.id
							this.volunteerInfo = dataResult
							this.scoreInfo = dataResult.userScoreInfo
							//如果当前专业是体育，更改展开栏
							if (this.scoreInfo.professionalCategory === '体育类') {
								this.allCollapseItemList = [{
										batchLabel: '本科批',
										batch: '本科批',
										type: '平行志愿',
										max: 64,
										status: false,
										saveStatus: false
									},
									{
										batchLabel: '高职高专',
										batch: '高职高专',
										type: '平行志愿',
										max: 64,
										status: false,
										saveStatus: false
									},
								]
							}
							if (this.scoreInfo.batch) {
								let allCollapseItemList = this.allCollapseItemList
								let collapseItemList = []
								//调整 当前成绩批次可以看到的导航栏
								for (let i = 0; i < allCollapseItemList.length; i++) {
									if (this.scoreInfo.batch === '高职高专' && allCollapseItemList[i].batch === '本科批') {
										continue
									}
									collapseItemList.push(allCollapseItemList[i])
								}
								this.collapseItemList = collapseItemList
							}
							
							// 处理提前批数据
							let volunteerRecordEarlyAdmissionList = dataResult.volunteerRecordEarlyAdmissionList || [];
							this.filledVolunteer.volunteerRecordEarlyAdmissionNum = volunteerRecordEarlyAdmissionList.length;
							
							// 按索引排序提前批志愿数据
							volunteerRecordEarlyAdmissionList.sort((a, b) => a.indexs - b.indexs);
							this.filledVolunteer.volunteerEarlyAdmissionList = volunteerRecordEarlyAdmissionList;
							
							// 处理本科批数据
							let volunteerUndergraduateList = dataResult.volunteerRecordUndergraduateList || [];
							this.filledVolunteer.volunteerUndergraduateNum = volunteerUndergraduateList.length;
							
							// 按索引排序本科批志愿数据
							volunteerUndergraduateList.sort((a, b) => a.indexs - b.indexs);
							this.filledVolunteer.volunteerUndergraduateList = volunteerUndergraduateList;
							
							// 处理高职高专批数据
							let volunteerJuniorCollegeList = dataResult.volunteerRecordJuniorCollegeList || [];
							this.filledVolunteer.volunteerJuniorCollegeNum = volunteerJuniorCollegeList.length;
							
							// 按索引排序高职高专批志愿数据
							volunteerJuniorCollegeList.sort((a, b) => a.indexs - b.indexs);
							this.filledVolunteer.volunteerJuniorCollegeList = volunteerJuniorCollegeList;
						} else {
							this.filledVolunteer.volunteerEarlyAdmissionList = []
							this.filledVolunteer.volunteerJuniorCollegeList = []
							this.filledVolunteer.volunteerUndergraduateList = []
						}
						this.filledVolunteer.volunteerMap = volunteerMap
					}
				}).catch(err => {}).finally(() => {});
			},
			/*计算百分比*/
			toPercent(num, total) {
				return (Math.round(num / total * 10000) / 100.00); // 小数点后两位百分比
			},
			/*选择是否删除明细*/
			confirmDelVolunteerItem(e) {
				uni.showModal({
					title: '提示',
					content: '确认要删除志愿' + e.indexs + '吗?',
					confirmText: '确定',
					cancelText: '取消',
					success: (res) => {
						if (res.confirm) {
							this.deleteVolunteerItem(e)
						}
					}
				});
			},
			/*确认删除志愿明细*/
			deleteVolunteerItem(e) {
				request.delete(ApiConstant.Volunteer.volunteerRecordDelete, {
					id: e.id
				}).then(res => {
					if (res.success) {
						uni.showToast({
							title: '删除成功',
							icon: "none"
						});
						setTimeout(() => {
							this.getFilledVolunteerList()
						}, 500)
					} else {
						uni.showToast({
							title: res.message,
							icon: "none"
						});
					}
				}).catch(err => {}).finally(() => {});
			},
			fctjCheckboxChange(e) {
				request.post(ApiConstant.Volunteer.updateFctj, {
					id: e
				}).then(res => {}).catch(err => {}).finally(() => {});
			},
			toAdd() {
				uni.navigateTo({
					url: 'mockList?batch=' + this.scoreInfo.batch + '&volunteerId=' + this.volunteerId
				})
			},
			onClickEditUserScore() {
				this.goto('/pages/zyb/score/edit')
			},
			/*点击创建志愿单*/
			onClickCreateVolunteer() {
				request.post(ApiConstant.Volunteer.addNew, {
					volunteerName: '模拟志愿草表'
				}, {}).then(res => {
					uni.setStorageSync('volunteerInfo', res.result)
					request.getUserScore()
				}).catch(err => {}).finally(() => {});
			},
			/*返回已填志愿数量*/
			getVolunteerNum(cItem) {
				if (cItem.batch === '提前批') {
					return this.filledVolunteer.volunteerRecordEarlyAdmissionNum
				} else if (cItem.batch === '本科批') {
					return this.filledVolunteer.volunteerUndergraduateNum
				} else {
					return this.filledVolunteer.volunteerJuniorCollegeNum
				}
			},
			onPreview() {
				if (this.volunteerPreview && this.volunteerPreview.type === '1') {
					let href = this.volunteerPreview.filePrefixUrl + '?id=' + this.volunteerId + "&type=1"
					let message = this.volunteerPreview.message
					// 跳转浏览器下载
					uni.setClipboardData({
						data: href
					});
					uni.showModal({
						content: message,
						showCancel: false
					});
				} else {
					// web-view预览
					let href = this.volunteerPreview.webViewUrl + '?id=' + this.volunteerId + "&type=2"
					uni.setStorageSync('volunteer_preview', href)
					uni.navigateTo({
						url: '/pages/zyb/other/web-view?url=volunteer_preview'
					})
				}
			},
			
			// 拖拽完成
			dragComplete(newList, dragItem, cIndex) {
				if(!dragItem) return;
				// 将 newList中的indexs 从1开始重新赋值
				newList.forEach((item, index) => {
					item.indexs = index + 1;
				});
				if(dragItem.batch.includes('专')){
					// 专科
					this.filledVolunteer.volunteerJuniorCollegeList = newList;
				}else if(dragItem.batch.includes('本')){
					// 本科
					this.filledVolunteer.volunteerUndergraduateList = newList;
				}else{
					// 提前批
					this.filledVolunteer.volunteerEarlyAdmissionList = newList;
				}
				console.log(newList, dragItem)
				if(this.collapseItemList[cIndex]){
					this.collapseItemList[cIndex].saveStatus = true
				}
			},
			// 更新志愿顺序
			saveVolunteerItem(cItem) {
				// 【必填提醒】getCurrentBatchList必须返回**已调整最新排序**的当前批次志愿列表！
				let array = [];
				this.getCurrentBatchList(cItem.batch).forEach((item, index) => { // 修复：forEach回调补了参数括号！
					array.push({ id: item.id, indexs: item.indexs });
				});
				const params = {
					volunteerId: this.volunteerId,
					batch: cItem.batch,
					volunteerRecordList: array
				};
				uni.showLoading({ title: '更新中...' });
				request.post(ApiConstant.Volunteer.resortVolunteer, params).then(res => {
					if (res.success) {
						uni.showToast({ title: '排序更新成功', icon: "success" });
						this.getFilledVolunteerList(); // 修复：删了傻逼500ms延迟，接口成了直接取数！
						this.collapseItemList.forEach(collItem=>{
							collItem.saveStatus = false;
						})
					} else {
						uni.showToast({ title: res.message || '排序更新失败', icon: "none" });
					}
				}).catch(err => {
					uni.showToast({ title: '排序更新失败', icon: "none" });
				}).finally(() => {
					uni.hideLoading();
				});
			},
			// 获取当前批次的志愿列表
			confirmSaveVolunteer(cItem) {
				if(cItem && cItem.batch){
					uni.showModal({
						title: '提示',
						content: `确认要修改${cItem.batch}志愿单吗?`,
						confirmText: '确定',
						cancelText: '取消',
						success: (res) => {
							if (res.confirm) {
								this.saveVolunteerItem(cItem)
							}
						}
					});
				}
			},

			getCurrentBatchList(batch) {
				switch(batch) {
					case '提前批':
						return this.filledVolunteer.volunteerEarlyAdmissionList;
					case '本科批':
						return this.filledVolunteer.volunteerUndergraduateList;
					case '高职高专':
						return this.filledVolunteer.volunteerJuniorCollegeList;
					default:
						return [];
				}
			}
		},
	}
</script>

<template>
	<view>
		<view class="divider" />
		<!-- 没有成绩界面 -->
		<view class="container" v-if="!this.scoreInfo">
			<text>当前没有成绩信息，请先修改成绩~</text>
			<text class="margin-left-30 font-weight-none mediumSlateBlue" @click="onClickEditUserScore">修改成绩</text>
		</view>
		<view class="container">
			<!--成绩卡片-->
			<view class="score-info-card white" v-if="this.scoreInfo">
				<view class="flexWrap">
					<view class="flex-item-8">
						<text class="font-size-mini4 font-weight-550">{{ volunteerInfo.volunteerName }}</text>
					</view>
					<view class="flex-item-2">
						<button v-show="volunteerId" type="primary" style="height: 42rpx;line-height: 42rpx"
							@click="onPreview">打印</button>
					</view>
				</view>
				<view class="flexWrap tags font-size-mini2" v-if="scoreInfo">
					<view class="tag">{{ scoreInfo.province }}</view>
					<view class="tag">{{ scoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组' }}</view>
					<view class="tag">{{ scoreInfo.professionalCategory }}</view>
				</view>
				<view class="flexWrap">
					<view class="score flex-item-10">
						<view class="flexWrap" style="height: 30rpx;">
							<view class="scoreLeft margin-right-30">
								<text class="margin-right-10">文化分</text>
								<text class="font-weight-b">{{ scoreInfo.culturalScore }}</text>
							</view>
							<view style="border-right:1rpx solid white"></view>
							<view class="scoreRight margin-left-30">
								<text class="margin-right-10">统考分</text>
								<text class="margin-right-10 font-weight-b">{{ scoreInfo.professionalScore }}</text>
							</view>
						</view>
						<view class="flexWrap" style="margin-top: 30rpx;height: 30rpx;"
							v-if="scoreInfo && scoreInfo.professionalCategoryChildren">
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.yybysy && scoreInfo.yybysy!==0">
								<text class="margin-right-10">音乐表演声乐</text>
								<text class="font-weight-b">{{ scoreInfo.yybysy }}</text>
							</view>
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.yybyqy && scoreInfo.yybyqy!==0">
								<text class="margin-right-10">音乐表演器乐</text>
								<text class="font-weight-b">{{ scoreInfo.yybyqy }}</text>
							</view>
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.yyjy && scoreInfo.yyjy!==0">
								<text class="margin-right-10">音乐教育</text>
								<text class="font-weight-b">{{ scoreInfo.yyjy }}</text>
							</view>
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.fzby && scoreInfo.fzby!==0">
								<text class="margin-right-10">服装表演</text>
								<text class="font-weight-b">{{ scoreInfo.fzby }}</text>
							</view>
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.xjysdy && scoreInfo.xjysdy!==0">
								<text class="margin-right-10">戏剧影视导演</text>
								<text class="font-weight-b">{{ scoreInfo.xjysdy }}</text>
							</view>
							<view class="scoreLeft margin-right-20" v-if="scoreInfo.xjysby && scoreInfo.xjysby!==0">
								<text class="margin-right-10">戏剧影视表演</text>
								<text class="font-weight-b">{{ scoreInfo.xjysby }}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="divider" />
			<!--志愿信息-->
			<view class="fillVolunteerList" v-if="collapseItemList.length>0">
				<view class="collapse">
					<view class="collapse-item" v-for="(cItem,cIndex) in collapseItemList" :key="cIndex">
						<view class="collapse-head">
							<view class="flexWrap" style="background-color: #f5f5f5;line-height: 80rpx;">
								<view class="flex-item-6">
									<view style="padding-left: 30rpx;">
										<text
											class="font-size-mini3 font-weight-b">{{ cItem.batchLabel }}({{getVolunteerNum(cItem)}}/{{ cItem.max }})</text>
										<text class="font-size-mini margin-left-10 slateGray">{{ cItem.type }}</text>
									</view>
								</view>
								<view class="flex-item-4">
									<text class="float-right" @click="collapseItemList[cIndex].status=!collapseItemList[cIndex].status"
										style="margin-right: 30rpx">{{ cItem.status ? '收起' : '展开' }}</text>
									<button v-show="cItem.saveStatus" @click="confirmSaveVolunteer(cItem)" class="float-right" style="height: 60rpx;width: 120rpx;font-size: 30rpx;line-height: 60rpx;margin: 10rpx;">保存</button>
								</view>
							</view>
						</view>
						<view class="collapse-body" v-show="cItem.status" style="">
							<m-drag v-if="(cItem.batch == '提前批' ? filledVolunteer.volunteerEarlyAdmissionList :
								cItem.batch == '本科批' ? filledVolunteer.volunteerUndergraduateList :
								filledVolunteer.volunteerJuniorCollegeList).length>0" :itemHeight="69" :list="
								cItem.batch == '提前批' ? filledVolunteer.volunteerEarlyAdmissionList :
								cItem.batch == '本科批' ? filledVolunteer.volunteerUndergraduateList :
								filledVolunteer.volunteerJuniorCollegeList" :cIndex="cIndex" @change="dragComplete">
							    <template #item-handle="{ item }">
                                    <div class="content-wrapper volunteerItem">
                                        <view class="flexWrap">
                                            <view class="flex-item-15 select">
                                                <view class="selectIndex">
                                                    <text style="line-height: 50rpx">{{ item.indexs }}</text>
                                                </view>
                                            </view>
                                            <view class="flex-item-65" style="height: 60rpx;" @click="gotoSchool(item.schoolCode)">
                                                <text>[{{ item.schoolCode }}]{{ item.schoolName }}</text>
                                            </view>
                                        </view>
                                        <view class="flexWrap marginTopBot20">
                                            <view class="flex-item-15 select"></view>
                                            <view class="flex-item-7">
                                                <text class="darkGray">[{{ item.enrollmentCode }}]</text>
                                                <text class="margin-left-10">{{ item.majorName }}</text>
                                            </view>
                                            <view class="flex-item-15">
                                                <text class="darkGray float-right"
                                                    v-if="item.enrollProbability && this.vipInfo && this.vipInfo.vipLevel >= 2">
                                                    {{ item.enrollProbability.toString().substring(0,4) }}%
                                                </text>
                                                <text class="darkGray float-right" v-else>
                                                    ??%
                                                </text>
                                            </view>
                                        </view>
									    <view class="flexWrap border-top" v-show="false" style="line-height: 60rpx">
                                            <view class="flex-item-4">
                                                <checkbox-group @change="fctjCheckboxChange(item.id)"
                                                    v-if="cItem.batch==='提前批'">
                                                    <label>
                                                        <checkbox value="cb" :checked="item.fctj===1" color="#FFCC33"
                                                            style="transform:scale(0.7)" />
                                                        服从调剂
                                                    </label>
                                                </checkbox-group>
                                            </view>
                                            <view class="flex-item-6">
                                                <view class="float-right">
                                                    <image @click="confirmDelVolunteerItem(item)" src="/static/icons/delete.png"
                                                        class="icon50 margin-left-50" />
                                                </view>
                                            </view>
                                        </view>
                                    </div>
							    </template>
								<!-- 自定义删除按钮 -->
								<template #delete-handle="{ item, index }">
									<div class="icon delete-icon" @click="confirmDelVolunteerItem(item)">
										<image src="/static/icons/delete.png" class="icon50 margin-left-30" />
									</div>
								</template>
							</m-drag>

                            <!--空白专业-->
                            <view v-else @click="toAdd()" class="volunteerItem">
                                <view class="notSelect flexWrap">
                                    <view class="notSelectIndex">
                                        <text style="line-height: 50rpx"></text>
                                    </view>
                                    <view class="margin-left-30">
                                        点击添加专业志愿
                                    </view>
                                </view>
                            </view>
						</view>
					</view>
				</view>
			</view>

			<!--有成绩，没有志愿信息-->
			<view class="" v-if="this.scoreInfo && !this.volunteerId">
				<view>
					<text class="mediumSlateBlue" @click="onClickCreateVolunteer">创建志愿单</text>
				</view>
			</view>
		</view>
	</view>
</template>
<style>
	page {
		background-color: white;
	}
</style>

<style scoped lang="scss">
	.divider {
		background: #f5f5f5;
		width: 100%;
		height: 3rpx;
	}

	.container {
		padding: 30rpx;
		max-height: 100%;
	}

	/*成绩卡片 start*/
	.score-info-card {
		padding: 20rpx;
		background: #f99352;
		border-radius: 15rpx;

		.tags {
			margin: 10rpx 0;

			.tag {
				background-color: #faa069;
				padding: 0 15rpx;
				line-height: 40rpx;
				margin-right: 20rpx;
			}
		}

		.score {
			margin-top: 30rpx;
			margin-bottom: 10rpx;
		}
	}

	/*成绩卡片 end*/

	/*志愿列表 start*/

	.collapse-item {
		margin-top: 30rpx;

		.collapse-body {
			border-left: 1rpx solid #f5f5f5;
			border-right: 1rpx solid #f5f5f5;
			border-bottom: 1rpx solid #f5f5f5;
			background-color: #f5f5f5;
		}
	}

	.collapse-body .volunteerItem {
        // width: 130%;
		background-color: white;
		margin-bottom: 10rpx;
		padding: 10rpx 10rpx 0rpx 0rpx;

		.notSelect {
			line-height: 80rpx;
			height: 80rpx;
			color: #999999;
		}

		.select {
			.selectIndex {
				background-color: #feeee2;
				color: #f96712;
				width: 20rpx;
				height: 50rpx;
				margin: auto 0;
				line-height: 50rpx;
				padding: 0 20rpx;
				text-align: center;
			}
		}

		//未填报时索引
		.notSelectIndex {
			background-color: #f2f2f2;
			width: 20rpx;
			height: 50rpx;
			margin: auto 0;
			line-height: 50rpx;
			padding: 0 20rpx;
			text-align: center;
		}
	}

	.fillVolunteerList {
		margin: 10rpx 0;
		border-top: 1rpx solid #f5f5f5;
	}

	.volunteerItem.drag-over {
		background-color: #e6f7ff;
		border: 1rpx dashed #1890ff;
	}

	.volunteerItem.dragging {
		opacity: 0.5;
		background-color: #f0f0f0;
	}

	/*志源列表 end*/


	.uni-row {
		margin-bottom: 30rpx;
	}

	/*导航栏部分 start*/
	.tabs {
		flex: 1;
		flex-direction: column;
		overflow: hidden;
		background-color: #ffffff;
		/* #ifndef APP-PLUS */
		/*height: 100vh;*/
		/* #endif */

		.scroll-h {
			/*width: 750rpx;*/
			/* #ifdef H5 */
			width: 100%;
			/* #endif */
			height: 80rpx;
			flex-direction: row;
			/* #ifndef APP-PLUS */
			white-space: nowrap;
			/* #endif */
			/* flex-wrap: nowrap; */
			/* border-color: #cccccc;
  border-bottom-style: solid;
  border-bottom-width: 1px; */
		}

		.line-h {
			height: 1rpx;
			background-color: #cccccc;
		}

		.uni-tab-item {
			/* #ifndef APP-PLUS */
			display: inline-block;
			/* #endif */
			flex-wrap: nowrap;
			padding-left: 34rpx;
			padding-right: 34rpx;
		}

		.uni-tab-item-title {
			color: #555;
			font-size: 30rpx;
			height: 80rpx;
			line-height: 80rpx;
			flex-wrap: nowrap;
			/* #ifndef APP-PLUS */
			white-space: nowrap;
			/* #endif */
		}

		.uni-tab-item-title-active {
			color: #007AFF;
		}

		.swiper-box {
			flex: 1;
		}

		.swiper-item {
			flex: 1;
			flex-direction: row;
		}

		.scroll-v {
			flex: 1;
			/* #ifndef MP-ALIPAY */
			flex-direction: column;
			/* #endif */
			/*width: 750rpx;*/
			width: 100%;
		}

		.update-tips {
			position: absolute;
			left: 0;
			top: 41px;
			right: 0;
			padding-top: 5px;
			padding-bottom: 5px;
			background-color: #FDDD9B;
			align-items: center;
			justify-content: center;
			text-align: center;
		}

		.update-tips-text {
			font-size: 14px;
			color: #ffffff;
		}

		.refresh {
			/*width: 750rpx;*/
			width: 100%;
			height: 64px;
			justify-content: center;
		}

		.refresh-view {
			flex-direction: row;
			flex-wrap: nowrap;
			align-items: center;
			justify-content: center;
		}

		.refresh-icon {
			width: 30px;
			height: 30px;
			transition-duration: .5s;
			transition-property: transform;
			transform: rotate(0deg);
			transform-origin: 15px 15px;
		}

		.refresh-icon-active {
			transform: rotate(180deg);
		}

		.loading-icon {
			width: 20px;
			height: 20px;
			margin-right: 5px;
			color: #999999;
		}

		.loading-text {
			margin-left: 2px;
			font-size: 16px;
			color: #999999;
		}

		.loading-more {
			align-items: center;
			justify-content: center;
			padding-top: 10px;
			padding-bottom: 10px;
			text-align: center;
		}

		.loading-more-text {
			font-size: 28rpx;
			color: #999;
		}
	}

	/*导航栏部分 end*/


	/*志愿信息头部信息 start*/
	.header-info {
		padding: 30rpx 30rpx 0 30rpx;
		background-color: white;
		margin-bottom: 30rpx;

		.h1 {
			padding: 10rpx 0;
		}

		.tt1 {
			margin-right: 30rpx;
		}
	}

	/*志愿信息头部信息 end*/

	/*志愿明细列表 start*/
	.volunteerList {
		padding: 30rpx 30rpx 0 30rpx;
		background-color: white;

		.v-title {
			color: #666666;
			margin-bottom: 30rpx;
		}

		.volunteerItem {
			margin-bottom: 50rpx;

			.item_left {
				.schoolInfo {
					border-bottom: 1px solid #e5e5e5;
					padding: 15rpx 0 30rpx 0;
				}

				.majorInfo {
					padding: 30rpx 0;
					border-bottom: 1px solid #f5f5f5;

					.enrollProbability {
						color: #9b9b9b;
						font-size: 25rpx;
					}
				}
			}

			.item_right {
				padding: 150rpx 0 0 20rpx;
			}

			/*序号*/
			.indexs {
				color: white;
				width: 30rpx;
				height: 40rpx;
				background-color: #1275ec;
				border-radius: 50%;
				padding-left: 10rpx;
				margin-right: 30rpx;

			}

			/*tags*/
			.tags {
				margin-top: 15rpx;

				.tag {
					margin-right: 20rpx;
					color: #9b9b9b;
					font-size: 25rpx;
				}
			}

			.low-text {
				color: #9b9b9b;
				font-size: 22rpx;
				margin-bottom: 15rpx;
			}
		}
	}

	/*志愿明细列表 end*/
</style>