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

let request = new Request()
// 缓存每页最多
const MAX_CACHE_DATA = 100;
// 缓存页签数量
const MAX_CACHE_PAGE = 3;
export default {
  name: "我的志愿明细",
  computed: {
    ImagesConstant() {
      return ImagesConstant
    },
    app(){
      return getApp()
    }
  },
  data() {
    return {
      paneFlag: false,
      scoreStatus: true,
      moveVolunteer: {
        batch: '',//移动的批次
        indexs: '',
        volunteerId: ''
      },
      volunteerId: '',//志愿id
      volunteerName: '',//志愿单名称
      topBackShow: true,//显示回到顶部
      selectForm: {
        address: '',
        schoolName: '',
        paneName: '全部',
        batch: '',
      },
      scoreInfo: {},//成绩信息
      volunteerInfo: {},//志愿单信息
      tabIndex: 0,//导航栏选中的下标
      scrollInto: "",
      newsList: [],
      cacheTab: [],
      filledVolunteer: {
        volunteerRecordEarlyAdmissionNum:0,
        volunteerUndergraduateANum:0,
        volunteerUndergraduateBNum:0,
        volunteerUndergraduateNum:0,
        volunteerJuniorCollegeNum:0,
        volunteerEarlyAdmissionList: [],//本科提前批
        volunteerUndergraduateAList: [],//本科A段
        volunteerUndergraduateBList: [],//本科B段
        volunteerUndergraduateList: [],//体育本科
        volunteerJuniorCollegeList: [],//高职高专
        volunteerMap: new Map()
      },//已填志愿信息
      years: StaticConstant.years,
      nowYear: StaticConstant.year,
      allCollapseItemList: [
        {batchLabel: '提前批', batch: '提前批', type: '顺序志愿', max: 1, status: false},
        {batchLabel: '本科批', batch: '本科批', type: '平行志愿', max: 64, status: false},
        {batchLabel: '高职高专', batch: '高职高专', type: '平行志愿', max: 64, status: false},
      ],
      collapseItemList: []
    }
  },
  onShow() {
    console.log(app.globalData)
    //
    let userInfo = uni.getStorageSync('userInfo')
    if (userInfo) {
      //有登录状态
      this.userStatus = true
      //判断是否有成绩信息
      /*this.scoreInfo = uni.getStorageSync('scoreInfo')
      if (this.scoreInfo === undefined || this.scoreInfo === null || this.scoreInfo === '') {
        //缓存中没有成绩，后端接口获取成绩
        request.getUserScore()
        this.scoreInfo = uni.getStorageSync('scoreInfo')
        if (!this.scoreInfo) {
          this.scoreStatus = false
          //后端接口没有返回成绩，则跳转到修改成绩界面
        }
      }*/
    } else {
      //没有登录，跳转到登录页
      this.goto('/pages/zyb/login')
      return
    }
    if (stringIsNotEmpty(this.volunteerId)) {
      this.getFilledVolunteerList()
    }
    /*//有成绩信息，且成绩中返回了志愿单信息
    if (this.scoreInfo && this.scoreInfo.volunteer) {
      this.volunteerId = this.scoreInfo.volunteer.id
    }*/
  },
  onLoad(e) {
    if (e.volunteerId) {
      //从志愿列表进来
      this.volunteerId = e.volunteerId;
    }
    if (stringIsNotEmpty(this.volunteerId)) {
      this.getFilledVolunteerList()
    }

  },
  methods: {
    goto(url) {
      uni.navigateTo({url: url})
    },
    gotoSchool(e) {
      this.goto('/pages/zyb/school/detail?schoolCode=' + e)
    },
    topBack() {
      uni.pageScrollTo({
        scrollTop: 0,   // 滚动到页面的目标位置  这个是滚动到顶部, 0
        duration: 300  // 滚动动画的时长
      })
    },
    clearTabData(e) {
      this.newsList[e].data.length = 0;
      this.newsList[e].loadingText = "加载更多...";
    },

    /*获取已填报志愿数据*/
    getFilledVolunteerList() {
      request.get(ApiConstant.Volunteer.artVolunteerDetail, {id: this.volunteerId}).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},
                {batchLabel: '高职高专', batch: '高职高专', type: '平行志愿', max: 64, status: false},
              ]
            }
            if (this.scoreInfo.batch) {
              this.paneFlag = true
              this.selectForm.batch = this.scoreInfo.batch
              let allCollapseItemList = this.allCollapseItemList
              let collapseItemList = []
              //调整 当前成绩批次可以看到的导航栏
              for (let i = 0; i < allCollapseItemList.length; i++) {
                if (this.scoreInfo.batch === '高职高专') {
                  if (allCollapseItemList[i].batch === '本科批') {
                    continue
                  }
                }
                collapseItemList.push(allCollapseItemList[i])
                this.collapseItemList = collapseItemList
              }
            }
            let key = ''
            let volunteer = {indexStr: 0}
            let indexs = 1;
            if (true) {
              //==================================提前批 start
              let volunteerRecordEarlyAdmissionList = dataResult.volunteerRecordEarlyAdmissionList;
              this.filledVolunteer.volunteerRecordEarlyAdmissionNum = volunteerRecordEarlyAdmissionList.length;
              for (let i = 0; i < volunteerRecordEarlyAdmissionList.length; i++) {
                key = volunteerRecordEarlyAdmissionList[i].majorCode + volunteerRecordEarlyAdmissionList[i].schoolCode
                volunteer = volunteerRecordEarlyAdmissionList[i]
                volunteerMap.set(key, volunteerRecordEarlyAdmissionList[i])
              }
              let volunteerRecordEarlyAdmissionList2 = [];
              while (indexs <= 1) {
                let record = {
                  actives: false,
                  indexs: indexs
                }
                for (let i = 0; i < volunteerRecordEarlyAdmissionList.length; i++) {
                  if (volunteerRecordEarlyAdmissionList[i].indexs === indexs) {
                    record = volunteerRecordEarlyAdmissionList[i]
                    record.actives = true
                  }
                }
                volunteerRecordEarlyAdmissionList2.push(record)
                indexs++;
              }
              this.filledVolunteer.volunteerEarlyAdmissionList = volunteerRecordEarlyAdmissionList2
              //==================================提前批 end
              //==================================本科 start
              let volunteerUndergraduateList = dataResult.volunteerRecordUndergraduateList;
              this.filledVolunteer.volunteerUndergraduateNum = volunteerUndergraduateList.length;
              console.log('//==================================本科 start')
              console.log(volunteerUndergraduateList)
              for (let i = 0; i < volunteerUndergraduateList.length; i++) {
                key = volunteerUndergraduateList[i].majorCode + volunteerUndergraduateList[i].schoolCode
                volunteerMap.set(key, volunteerUndergraduateList[i])
              }
              indexs = 1;
              let volunteerUndergraduateList2 = [];
              while (indexs <= 64) {
                let record = {actives: false, indexs: indexs}
                for (let i = 0; i < volunteerUndergraduateList.length; i++) {
                  if (volunteerUndergraduateList[i].indexs === indexs) {
                    record = volunteerUndergraduateList[i]
                    record.actives = true
                  }
                }
                volunteerUndergraduateList2.push(record)
                indexs++;
              }
              this.filledVolunteer.volunteerUndergraduateList = volunteerUndergraduateList2
              //==================================本科 end
              //==================================高职高专 start
              let volunteerJuniorCollegeList = dataResult.volunteerRecordJuniorCollegeList;
              this.filledVolunteer.volunteerJuniorCollegeNum = volunteerJuniorCollegeList.length;
              for (let i = 0; i < volunteerJuniorCollegeList.length; i++) {
                key = volunteerJuniorCollegeList[i].majorCode + volunteerJuniorCollegeList[i].schoolCode
                volunteerMap.set(key, volunteerJuniorCollegeList[i])
              }
              indexs = 1;
              let volunteerJuniorCollegeList2 = [];
              while (indexs <= 64) {
                let record = {
                  actives: false,
                  indexs: indexs
                }
                for (let i = 0; i < volunteerJuniorCollegeList.length; i++) {
                  if (volunteerJuniorCollegeList[i].indexs === indexs) {
                    record = volunteerJuniorCollegeList[i]
                    record.actives = true
                  }
                }
                volunteerJuniorCollegeList2.push(record)
                indexs++;
              }
              this.filledVolunteer.volunteerJuniorCollegeList = volunteerJuniorCollegeList2
              //==================================高职高专 end
            }
          } else {
            this.filledVolunteer.volunteerEarlyAdmissionList = []
            this.filledVolunteer.volunteerJuniorCollegeList = []
            this.filledVolunteer.volunteerUndergraduateList = []
            this.filledVolunteer.volunteerList = []
          }
          this.filledVolunteer.volunteerMap = volunteerMap
        }
      }).catch(err => {
      }).finally(() => {
      });
    },
    /*计算百分比*/
    toPercent(num, total) {
      return (Math.round(num / total * 10000) / 100.00);// 小数点后两位百分比
    },
    /*悬浮按钮*/
    trigger(e) {
      console.log(e)
      /*this.fab.content[e.index].active = !e.item.active*/
      if (e.item.text === '回到顶部') {
        this.topBack()
      }
    },
    fabClick() {
    },
    /*点击移动*/
    onClickMove(e) {
      this.moveVolunteer.volunteerId = this.volunteerId;
      this.moveVolunteer.id = e.id;
      this.moveVolunteer.batch = e.batch
      this.$refs.inputDialog.open()
    },
    /*点击交换*/
    onClickExChange(e) {
      this.moveVolunteer.volunteerId = this.volunteerId;
      this.moveVolunteer.id = e.id;
      this.moveVolunteer.batch = e.batch
      this.$refs.inputDialog.open()
    },
    /*选择是否删除明细*/
    confirmDelVolunteerItem(e) {
      let that = this
      console.log('删除提示')
      console.log(e)
      uni.showModal({
        title: '提示',
        content: '确认要删除志愿' + e.indexs + '吗?',
        confirmText: '确定',
        cancelText: '取消',
        success: function (res) {
          if (res.confirm) {
            that.deleteVolunteerItem(e)
          }
        }
      });
    },
    /*确认删除志愿明细*/
    deleteVolunteerItem(e) {
      let that = this
      request.delete(ApiConstant.Volunteer.volunteerRecordDelete, {id: e.id}).then(res => {
        if (res.success) {
          setTimeout(function () {
            uni.showToast({title: '删除成功', icon: "none"});
          }, 1000)
          setTimeout(function () {
            that.getFilledVolunteerList()
          }, 1500)
        } else {
          setTimeout(function () {
            uni.showToast({title: res.message, icon: "none"});
          }, 500)
        }
      }).catch(err => {
      }).finally(() => {
      });
    },
    fctjCheckboxChange(e) {
      console.log('服从调剂')
      console.log(e)
      request.post(ApiConstant.Volunteer.updateFctj, {id: e}).then(res => {
      }).catch(err => {
      }).finally(() => {
      });
    },
    toAdd() {
      let scoreInfo = uni.getStorageSync('scoreInfo')
      let volunteer = uni.getStorageSync('volunteer')
      let that = this
      if (volunteer && this.volunteerId !== volunteer.id) {
        uni.showModal({
          title: '提示',
          content: '该成绩与当前成绩不一致，确认切换?',
          confirmText: '确定',
          cancelText: '取消',
          success: function (res) {
            if (res.confirm) {
              that.switchVolunteer()
            }
          }
        });
      } else {
        uni.navigateTo({
          url: 'mockList?batch=' + this.selectForm.batch + '&volunteerId=' + this.volunteerId
        })
      }
    },
    change(e) {
      console.log(e);
    },
    /*确认移动志愿*/
    moveIndexsConfirm() {
      if (!this.moveVolunteer.indexs) {
        uni.showToast({title: '请输入志愿序号', icon: "none"});
        return;
      }
      let indexs = parseFloat(this.moveVolunteer.indexs)
      if (this.moveVolunteer.batch === '提前批') {
        if (indexs > 4 || indexs < 0) {
          uni.showToast({title: '您输入的序号超出', icon: "none"});
          this.moveVolunteer.indexs = ''
          return;
        }
      } else {
        if (indexs > (this.scoreInfo.professionalCategory==='体育类'?64:64) || indexs < 0) {
          uni.showToast({title: '您输入的序号超出', icon: "none"});
          this.moveVolunteer.indexs = ''
          return;
        }
      }
      let that = this
      request.post(ApiConstant.Volunteer.exChangeIndexs, this.moveVolunteer).then(res => {
        if (res.success) {
          this.moveVolunteer.indexs = ''
          this.moveVolunteer.batch = ''
          this.moveVolunteer.volunteerId = ''
          setTimeout(function () {
            that.getFilledVolunteerList();
          }, 1000)
        } else {
          setTimeout(function () {
            uni.showToast({title: res.message, icon: "none"});
          }, 500)
        }
      }).catch(err => {
      }).finally(() => {
      });
    },
    onClickEditUserScore() {
      this.goto('/pages/zyb/score/edit')
    },
    /*点击创建志愿单*/
    onClickCreateVolunteer() {
      let that = this
      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
      }
    },

    switchVolunteer() {
      request.post(ApiConstant.Volunteer.switchVolunteer, {id: this.volunteerId}).then(res => {
        if (res.success) {
          request.getUserScore()
          setTimeout(() => {
            wx.reLaunch({
              url: '/pages/zyb/home',
            })
          }, 1000)
        } else {
          setTimeout(function () {
            uni.showToast({title: res.message, icon: "none"});
          }, 500)
        }
      }).catch(err => {
      }).finally(() => {
      });
    }
  }
}
</script>

<template>
  <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>
      <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" @click="collapseItemList[cindex].status=!collapseItemList[cindex].status">
            <view class="flexWrap" style="background-color: #f5f5f5;line-height: 80rpx;">
              <view class="flex-item-8">
                <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-2">
                <text class="float-right" style="margin-right: 30rpx">{{ citem.status ? '收起' : '展开' }}</text>
              </view>
            </view>
          </view>
          <view class="collapse-body" v-show="citem.status" style="">
            <view class="volunteerItem" v-for="(item,index) in (citem.batch==='高职高专')?filledVolunteer.volunteerJuniorCollegeList:
            citem.batch==='提前批'?filledVolunteer.volunteerEarlyAdmissionList:filledVolunteer.volunteerUndergraduateList"
                  :key="item.indexs">
              <view v-if="item.majorCode">
                <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-85" @click="gotoSchool(item.schoolCode)">
                    <text style="line-height: 50rpx">[{{ item.schoolCode }}]{{ item.schoolName }}</text>
                  </view>
                </view>
                <view class="flexWrap marginTopBot20">
                  <view class="flex-item-15 select"></view>
                  <view class="flex-item-75 ">
                    <text class="darkGray">[{{ item.enrollmentCode }}]</text>
                    <text class="margin-left-10">{{ item.majorName }}</text>
                  </view>
                  <view class="flex-item-1">
                    <text class="darkGray float-right">{{ item.enrollProbability }}%</text>
                  </view>
                </view>
                <!--操作栏-->
                <view class="flexWrap border-top" 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="onClickExChange(item)" src="/static/icons/move.png" class="icon50 margin-left-50"/>
                      <!--                      <image src="/static/icons/edit.png" class="icon50 margin-left-50"/>-->
                      <image @click="confirmDelVolunteerItem(item)" src="/static/icons/delete.png"
                             class="icon50 margin-left-50"/>
                    </view>
                  </view>
                </view>
              </view>
              <!--空白专业-->
              <view v-else @click="toAdd()">
                <view class="notSelect flexWrap">
                  <view class="notSelectIndex">
                    <text style="line-height: 50rpx">{{ item.indexs }}</text>
                  </view>
                  <view class="margin-left-30">
                    点击添加专业志愿
                  </view>
                </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>

  <uni-popup ref="inputDialog" type="dialog">
    <uni-popup-dialog ref="inputClose" mode="input"
                      placeholder="N" @confirm="moveIndexsConfirm">
      <view>
        <view class="flexWrap" style="height: 50rpx;line-height: 50rpx">
          <view class="flex-item-3">
            移动志愿
          </view>
          <view class="flex-item-3">
            <view style="border: 1rpx solid #979797">
              <input type="number" v-model="moveVolunteer.indexs" placeholder="N"/>
            </view>
          </view>
        </view>
      </view>
    </uni-popup-dialog>
  </uni-popup>
</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: 70rpx;
    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 {
  background-color: white;
  margin-bottom: 10rpx;
  padding: 10rpx 30rpx;

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

/*志源列表 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>
