inspectorList.vue 5.92 KB
<template>
  <div>
    <div class="paddingBox">
      <div class="title">请选择全勤打卡活动开始日期</div>
      <div class="tip">全勤打卡活动:全勤打卡返66元奖学金</div>
      <div class="list_box">
        <div  v-for="(item,index) in can_select"  :class="istrue==index?'item sec':'item'"  @click="secItem(item,index)" >
          <div class="text">
            <div class="title1">
              {{item.active_start_at_name}} 开始全勤打卡活动
            </div>
            <div class="title2">
              课程观看时间:{{item.course_start_at_name}}-永久
            </div>
          </div>
          <div class="imgbox">
            <img :src="item.icon" alt="">
          </div>
        </div>
        <div class="item full" v-for="(item,index) in can_not_select">
          <div class="text">
            <div class="title1">
              {{item.active_start_at_name}} 开始全勤打卡活动
            </div>
            <div class="title2">
              课程观看时间:{{item.course_start_at_name}}-永久
            </div>
          </div>
          <div class="imgbox">
            <img :src="item.icon" alt="">
          </div>
        </div>
      </div>
    </div>
     <div class="fix">
        <div class="btn" @click="postYujiList()" >确定</div>
        <div class="tip" @click="showTip=true">
          <i class="iconfont icon-dagou"></i>
          全勤打卡活动须知
        </div>
     </div>
     <mt-popup
      v-model="showShare"
      :closeOnClickModal="closeOnClickModal"
      class="refer-share"
      position="top">
      <div class="box">
        <h3>提示</h3>
          {{msg}}
        <div class="goIndex" @click="goIndex">
          查看课程
        </div>  
      </div>
    </mt-popup>
    <mt-popup
      v-model="showTip"
      class="refer-share"
      position="top">
      <div class="tipWord">
        <h2>全勤打卡活动须知</h2>
        <p>1、自【全勤打卡活动】开始日期起,挑战连续20天不间断打卡,挑战成功即可领66元奖学金;尚未至活动开始日期,自行打卡无效;</p>
        <p>2、使用学习微信号,完成三个模块的课程学习后,点击【完成今日学习】,分享打卡链接到朋友圈;未完成学习就分享出的链接视为无效打卡链接;</p>
        <p>3、当日打卡需在24:00前,逾时视为当日打卡未打卡,不能补卡;</p>
        <p>4、分享到朋友圈的打卡链接需对所有人可见,不可屏蔽朋友圈或分组不可见;</p>
        <p>5、班主任老师会进行打卡核查,请将朋友圈打卡保留至收到奖学金为止;</p>
        <p>6、奖学金将在结束后3-5个工作日内发放至您的微信账户。</p>
      </div>
    </mt-popup>
  </div>
</template>

<script>
  import {getYujiListUrlApi,postYujiListApi,getCourseStatusApi} from "../../service/api";
  import { Toast } from 'vant';
  import common from '../../util/common'
  export default {
    name: "inspectorList",
    mounted(){
      getCourseStatusApi().then(res => {
        if(res.status==1||res.status==2){
          // this.$router.push({ name: "index" });
        }else if(res.status==3){
          this.msg = res.msg
        }
        console.log(res)
      })
      this.getYuji()
    },
    data(){
      return {
        istrue:0,
        can_select:[],
        can_not_select:[],
        secItems:{},
        showShare:false,
        showTip:false,
        closeOnClickModal:false,
        msg:""
      }
    },
    methods:{
      goIndex(){
        this.$router.push({ name: "index" });
      },
      getYuji(){
        getYujiListUrlApi().then(res=>{
          this.can_select = res.can_select
          if(res.can_select){
           this.secItems = this.can_select[0]
          }
          this.can_not_select = res.can_not_select
          console.log(res)
        })
      },
      secItem(item,index){
        this.istrue = index
        this.secItems = item
      },
      postYujiList(){
        postYujiListApi(this.secItems.periods_id).then(res=>{
          this.$masseges
          Toast("提交成功")
          this.$router.push({ name: "index" });
          console.log(res)
        })
      }
    }
  }
</script>

<style scoped lang="less">
  @import "../../util/public";
  .paddingBox{
     padding: 24*@toVw 20*@toVw 110*@toVw;
    .title{font-size: 24*@toVw;font-weight: 600;line-height: 33*@toVw;}
    .tip{font-size: 12*@toVw;line-height: 17*@toVw;color:rgba(153,153,153,1);margin: 8px 10px 14px 0;}
    .item{display: flex;border:1px dashed black;padding: 20*@toVw 18*@toVw;margin-bottom:5px;
    .text{
      margin-left: 0;
      .title2{color: #666666;line-height: 25*@toVw;}
      }
    .imgbox{
      margin-right: 10*@toVw;
      img{width:44*@toVw ; height: 55*@toVw;}
    } 
   }
   .sec{border:2px solid #6637ED;}
   .full{
     .text{
      .title1{color: #999999;line-height: 25*@toVw;}
      .title2{color: #999999;line-height: 25*@toVw;}
      }
   }
  }
  .fix{
    position: fixed;text-align: center;width: 100%;bottom: 0;padding:10px 0;background: white;
    .btn{width: 273*@toVw;height: 47*@toVw;background:#6637ED;color: white;line-height:47*@toVw; border-radius: 4px; }
    .tip{
      color:rgba(153,153,153,1);font-size: 12px;line-height: 30px;
      .iconfont{font-size: 12px;}
      }
  }
  .refer-share{
    .box{
    position: fixed;top: 50%;height: 200px;width: 200px;background: white;left: 50%;padding: 20px;transform: translate(-120px,120px);border-radius: 20px;
    h3{text-align: center;margin-bottom: 30px;}
    .goIndex{width: 180px;height: 30px;border-radius: 15px;border:1px solid #999999;line-height: 30px;text-align: center;margin-top: 30px; } 
     }
     .tipWord{
       background: white;top: 10vh;position: absolute;width: 80vw;left: -40vw;padding: 20px;box-sizing: border-box;line-height: 26px;
       p{margin-bottom: 6px;color: #666666;font-size: 12px;}
       h2{font-size: 18px;margin-bottom: 6px;text-align: center;}
       }
  } 
  
</style>