xbx #49
@ -11,7 +11,7 @@ export interface Get {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
axios.interceptors.response.use((response)=>{
 | 
			
		||||
    console.log(response)
 | 
			
		||||
    // console.log(response)
 | 
			
		||||
    if(response.data.code == 1001){
 | 
			
		||||
        router.push("/")
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import router from '@/router';
 | 
			
		||||
import store from '@/store';
 | 
			
		||||
import { LiveList, LoginData, UserInfo, VideoInfo } from '@/types';
 | 
			
		||||
import { LiveList, LivelistInfo, LoginData, UserInfo, VideoInfo } from '@/types';
 | 
			
		||||
import { saveValue } from '@/utils/common';
 | 
			
		||||
import { message } from 'ant-design-vue';
 | 
			
		||||
import { del, get, post, put, setToken } from './base'
 | 
			
		||||
@ -136,10 +136,10 @@ export async function getvideolist(): Promise<VideoList[]> {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export async function getlivelist(data?:any):Promise<LiveList[]> {
 | 
			
		||||
export async function getlivelist(data?:any):Promise<LivelistInfo> {
 | 
			
		||||
    const res = await get<Array<LiveList>>('live',data);
 | 
			
		||||
    // console.log(res);
 | 
			
		||||
    return res.data
 | 
			
		||||
    console.log(res);
 | 
			
		||||
    return res;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -177,10 +177,19 @@ export async function liveadd(data:any) {
 | 
			
		||||
/**
 | 
			
		||||
 * 发布视频
 | 
			
		||||
 */
 | 
			
		||||
export async function videoadd(data:any) {
 | 
			
		||||
export async function videoadd( form: any,data: any) {
 | 
			
		||||
    const res=await post<Liveaddrule>('video',data)
 | 
			
		||||
    if(res.code==0){
 | 
			
		||||
        message.success("发布成功")
 | 
			
		||||
        form.value = {
 | 
			
		||||
            title: "",
 | 
			
		||||
            img: "",
 | 
			
		||||
            fileid: "",
 | 
			
		||||
            fileurl: "",
 | 
			
		||||
            fileduration: "",
 | 
			
		||||
            desc: "",
 | 
			
		||||
            video:[""],
 | 
			
		||||
          }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -416,4 +425,70 @@ export async function getlanguages(): Promise<Language[]>{
 | 
			
		||||
 | 
			
		||||
export async function putmember(data: unknown): Promise<Liveaddrule>{
 | 
			
		||||
    return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, data) )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 直播详情
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
interface LiveInfo {
 | 
			
		||||
    liveid: number;
 | 
			
		||||
    title: string;
 | 
			
		||||
    img: string;
 | 
			
		||||
    fileid: string;
 | 
			
		||||
    fileurl: string;
 | 
			
		||||
    fileduration: string;
 | 
			
		||||
    vodid: string;
 | 
			
		||||
    vodurl: string;
 | 
			
		||||
    vodduration: string;
 | 
			
		||||
    dateline: string;
 | 
			
		||||
    livetime: number;
 | 
			
		||||
    livenumber: number;
 | 
			
		||||
    status: number;
 | 
			
		||||
    desc: string;
 | 
			
		||||
    deleted_at: null;
 | 
			
		||||
    created_at: string;
 | 
			
		||||
    updated_at: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface StudentList {
 | 
			
		||||
    memberid: number;
 | 
			
		||||
    name: string;
 | 
			
		||||
    img: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function getliveinfo(id: number){
 | 
			
		||||
    const liveinfo = (await get<LiveInfo>(`live/${id}`)).data;
 | 
			
		||||
    const studentlist = (await get<StudentList[]>("studentLive",{id})).data;
 | 
			
		||||
    return {...liveinfo,studentlist}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 直播日历
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export async function getdatelist(start: string, end: string) {
 | 
			
		||||
    return (await get("teacherCalendar")).data
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 取消直播
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
export async function cancellive(id: number, status: number){
 | 
			
		||||
    const res = await post("cancelLive",{id, status})
 | 
			
		||||
    if(res.code == 0){
 | 
			
		||||
        message.success(res.msg);
 | 
			
		||||
        return true;
 | 
			
		||||
    }else{
 | 
			
		||||
        message.error(res.msg);
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,163 +1,191 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="cont">
 | 
			
		||||
    <div class="title">
 | 
			
		||||
      <div>上课学生</div>
 | 
			
		||||
      <div class="more">查看详情</div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="info">
 | 
			
		||||
      <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <img src="" alt="" />
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
            <div class="lessonname">英语 A1</div>
 | 
			
		||||
          </div>
 | 
			
		||||
    <div class="cont">
 | 
			
		||||
        <div class="title">
 | 
			
		||||
        <div>上课学生</div>
 | 
			
		||||
        <div class="more">查看详情</div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="cancel">取消直播</div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <img src="" alt="" />
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
            <div class="lessonname">英语 A1</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="refuse">已拒绝</div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <img src="" alt="" />
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
            <div class="lessonname">英语 A1</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="takehour">
 | 
			
		||||
            参加时长 
 | 
			
		||||
        <div class="info">
 | 
			
		||||
        <div class="item" v-for="(i, j) in list" :key="j">
 | 
			
		||||
            <div style="display: flex">
 | 
			
		||||
            <img :src="i.img" alt="" />
 | 
			
		||||
            <div class="stuinfo">
 | 
			
		||||
                <div>{{ i.name }}</div>
 | 
			
		||||
                <div class="lessonname">{{ i.interest }}</div>
 | 
			
		||||
            </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="takehour" v-if="i.status == 1 && livestatus == 2">
 | 
			
		||||
            参加时长
 | 
			
		||||
            <div>30min</div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <img src="" alt="" />
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
            <div class="lessonname">英语 A1</div>
 | 
			
		||||
          </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div
 | 
			
		||||
            class="cancel"
 | 
			
		||||
            v-if="i.status == 2 || (livestatus == 0 && i.status == 1)"
 | 
			
		||||
            @click="quxiao(j)"
 | 
			
		||||
            >
 | 
			
		||||
            取消直播
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="refuse" v-if="i.status == 3">已拒绝</div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="takehour">
 | 
			
		||||
            参加时长 
 | 
			
		||||
            <div>30min</div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      
 | 
			
		||||
        <!-- <div class="item">
 | 
			
		||||
            <div style="display:flex">
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
            <div class="stuinfo">
 | 
			
		||||
                <div>andy</div>
 | 
			
		||||
                <div class="lessonname">英语 A1</div>
 | 
			
		||||
            </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="item">
 | 
			
		||||
            <div style="display:flex">
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
            <div class="stuinfo">
 | 
			
		||||
                <div>andy</div>
 | 
			
		||||
                <div class="lessonname">英语 A1</div>
 | 
			
		||||
            </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="item">
 | 
			
		||||
            <div style="display:flex">
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
            <div class="stuinfo">
 | 
			
		||||
                <div>andy</div>
 | 
			
		||||
                <div class="lessonname">英语 A1</div>
 | 
			
		||||
            </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="takehour">
 | 
			
		||||
                参加时长 
 | 
			
		||||
                <div>30min</div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div> -->
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.cont {
 | 
			
		||||
  width: 316px;
 | 
			
		||||
  height: 563px;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-radius: 17px;
 | 
			
		||||
  padding: 0 28px;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  overflow: auto;
 | 
			
		||||
  .title {
 | 
			
		||||
    padding: 23px 0 11px 0;
 | 
			
		||||
    font-size: 13px;
 | 
			
		||||
    color: #111;
 | 
			
		||||
    line-height: 1;
 | 
			
		||||
    border-bottom: 1px solid #eee;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    .more {
 | 
			
		||||
      color: #999999;
 | 
			
		||||
      font-size: 11px;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .info {
 | 
			
		||||
    .item {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      align-content: center;
 | 
			
		||||
      justify-content: space-between;
 | 
			
		||||
      margin-top: 23px;
 | 
			
		||||
      font-size: 10px;
 | 
			
		||||
      .stuinfo {
 | 
			
		||||
        margin: auto 0;
 | 
			
		||||
        margin-left: 11px;
 | 
			
		||||
        color: #111111;
 | 
			
		||||
        .lessonname {
 | 
			
		||||
          color: #666666;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      .takehour {
 | 
			
		||||
        color: #08ae98;
 | 
			
		||||
    width: 316px;
 | 
			
		||||
    height: 563px;
 | 
			
		||||
    background-color: #fff;
 | 
			
		||||
    border-radius: 17px;
 | 
			
		||||
    padding: 0 28px;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    overflow: auto;
 | 
			
		||||
    .title {
 | 
			
		||||
        padding: 23px 0 11px 0;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        color: #111;
 | 
			
		||||
        line-height: 1;
 | 
			
		||||
        border-bottom: 1px solid #eee;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        .more {
 | 
			
		||||
        color: #999999;
 | 
			
		||||
        font-size: 11px;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .info {
 | 
			
		||||
        .item {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-content: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        margin-top: 23px;
 | 
			
		||||
        font-size: 10px;
 | 
			
		||||
        .stuinfo {
 | 
			
		||||
            margin: auto 0;
 | 
			
		||||
            margin-left: 11px;
 | 
			
		||||
            color: #111111;
 | 
			
		||||
            .lessonname {
 | 
			
		||||
            color: #666666;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .takehour {
 | 
			
		||||
            color: #08ae98;
 | 
			
		||||
            font-size: 11px;
 | 
			
		||||
            margin: auto 0;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
        }
 | 
			
		||||
        > div > img {
 | 
			
		||||
            width: 57px;
 | 
			
		||||
            height: 57px;
 | 
			
		||||
            border-radius: 50%;
 | 
			
		||||
            background-color: #0f0;
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .refuse {
 | 
			
		||||
        color: #d22c2e;
 | 
			
		||||
        margin: auto 0;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
      }
 | 
			
		||||
      > div>img {
 | 
			
		||||
        width: 57px;
 | 
			
		||||
        height: 57px;
 | 
			
		||||
        border-radius: 50%;
 | 
			
		||||
        background-color: #0f0;
 | 
			
		||||
      }
 | 
			
		||||
        text-align: center;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .refuse{
 | 
			
		||||
    color: #D22C2E;
 | 
			
		||||
    margin:auto 0;
 | 
			
		||||
  }
 | 
			
		||||
  .cancel{
 | 
			
		||||
    margin:auto 0;
 | 
			
		||||
    width: 57px;
 | 
			
		||||
    height: 23px;
 | 
			
		||||
    border: 1px solid #09AE99;
 | 
			
		||||
    line-height: 23px;
 | 
			
		||||
    text-align: center;
 | 
			
		||||
    color: #09AE99;
 | 
			
		||||
    border-radius: 3px;
 | 
			
		||||
  }
 | 
			
		||||
  .button {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    width: 260px;
 | 
			
		||||
    bottom: 28px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    > div {
 | 
			
		||||
      width: 114px;
 | 
			
		||||
      height: 23px;
 | 
			
		||||
      border-radius: 3px;
 | 
			
		||||
      font-size: 10px;
 | 
			
		||||
      color: #fff;
 | 
			
		||||
      line-height: 23px;
 | 
			
		||||
      text-align: center;
 | 
			
		||||
    .cancel {
 | 
			
		||||
        margin: auto 0;
 | 
			
		||||
        width: 57px;
 | 
			
		||||
        height: 23px;
 | 
			
		||||
        border: 1px solid #09ae99;
 | 
			
		||||
        line-height: 23px;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
        color: #09ae99;
 | 
			
		||||
        border-radius: 3px;
 | 
			
		||||
    }
 | 
			
		||||
    .modify {
 | 
			
		||||
      background-color: #08ae98;
 | 
			
		||||
    .button {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
        width: 260px;
 | 
			
		||||
        bottom: 28px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        > div {
 | 
			
		||||
        width: 114px;
 | 
			
		||||
        height: 23px;
 | 
			
		||||
        border-radius: 3px;
 | 
			
		||||
        font-size: 10px;
 | 
			
		||||
        color: #fff;
 | 
			
		||||
        line-height: 23px;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
        }
 | 
			
		||||
        .modify {
 | 
			
		||||
        background-color: #08ae98;
 | 
			
		||||
        }
 | 
			
		||||
        .del {
 | 
			
		||||
        background-color: #d12c2e;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .del {
 | 
			
		||||
      background-color: #d12c2e;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent } from "vue";
 | 
			
		||||
import { cancellive } from '@/api';
 | 
			
		||||
import { defineComponent, ref, watch } from "vue";
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  setup(){  
 | 
			
		||||
    
 | 
			
		||||
    return{}
 | 
			
		||||
  }
 | 
			
		||||
    props: {
 | 
			
		||||
        info: Array,
 | 
			
		||||
        livestatus: Number,
 | 
			
		||||
    },
 | 
			
		||||
    setup(props) {
 | 
			
		||||
        
 | 
			
		||||
        let list = ref<any>(props.info);
 | 
			
		||||
        watch(()=> props.info,()=>{
 | 
			
		||||
            // console.log(props.info)
 | 
			
		||||
            list.value = props.info
 | 
			
		||||
        })
 | 
			
		||||
        async function quxiao(index: number){
 | 
			
		||||
            console.log(index, list.value[index])
 | 
			
		||||
            const res = await cancellive(list.value[index].memberid, 3);
 | 
			
		||||
            if(res){
 | 
			
		||||
                list.value[index].status = 3
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        return {
 | 
			
		||||
            list,
 | 
			
		||||
            quxiao
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
@ -28,7 +28,7 @@
 | 
			
		||||
         <div class="state live" v-if="status==1">
 | 
			
		||||
            进入直播
 | 
			
		||||
        </div>
 | 
			
		||||
         <div class="state over" v-if="status==2">
 | 
			
		||||
        <div class="state over" v-if="status==2">
 | 
			
		||||
             查看回放
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@ -47,7 +47,6 @@
 | 
			
		||||
    .cover{
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 127px;
 | 
			
		||||
        background-color: #0f0;
 | 
			
		||||
    }
 | 
			
		||||
    .play{
 | 
			
		||||
        position: absolute;
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="video">
 | 
			
		||||
    <video src=""></video>
 | 
			
		||||
    <video :controls="true" :src="info.livestatus == 0 ? info.fileurl :  info.vodurl"></video>
 | 
			
		||||
    <div class="liveinfo">
 | 
			
		||||
          <div class="left">
 | 
			
		||||
              <div>
 | 
			
		||||
@ -9,11 +9,11 @@
 | 
			
		||||
              </div>
 | 
			
		||||
              <div>
 | 
			
		||||
                  <img src="@/static/images/livewatch.png" alt="" class="icon">
 | 
			
		||||
                  <span>2020-09-11  18:30</span>
 | 
			
		||||
                  <span>{{info.dateline}}</span>
 | 
			
		||||
              </div>
 | 
			
		||||
              <div>
 | 
			
		||||
                  <img src="@/static/images/livetimetake.png" alt="" class="icon">
 | 
			
		||||
                  <span>30min</span>
 | 
			
		||||
                  <span>{{info.livetime}}min</span>
 | 
			
		||||
              </div>
 | 
			
		||||
                    <div>
 | 
			
		||||
                  <img src="@/static/images/shoucang.png" alt="" class="icon">
 | 
			
		||||
@ -31,7 +31,6 @@
 | 
			
		||||
  width: 976px;
 | 
			
		||||
  height: 563px;
 | 
			
		||||
  border-radius: 18px;
 | 
			
		||||
  background-color: #0f0;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  > video {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
@ -78,11 +77,18 @@
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent } from "vue";
 | 
			
		||||
import { defineComponent, ref } from "vue";
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  setup() {
 | 
			
		||||
  props:{
 | 
			
		||||
    info: Object
 | 
			
		||||
  },
 | 
			
		||||
  setup(props) {
 | 
			
		||||
    console.log(1);
 | 
			
		||||
    // const liveinfo = ref(props.liveinfo)
 | 
			
		||||
    return {
 | 
			
		||||
      // liveinfo
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
@ -91,7 +91,7 @@
 | 
			
		||||
                    </a-menu>
 | 
			
		||||
                </template>
 | 
			
		||||
            </a-dropdown>
 | 
			
		||||
            <div class="item" style="border-right: none;">
 | 
			
		||||
            <div class="item" style="border-right: none;" @click="navto('/regime/date')">
 | 
			
		||||
                <img src="@/static/images/rili.png" alt="" class="icon">
 | 
			
		||||
                <div class="name">日历</div>
 | 
			
		||||
            </div>
 | 
			
		||||
@ -219,10 +219,15 @@ export default defineComponent({
 | 
			
		||||
            return store.state.userinfo;
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        function navto(index: number){
 | 
			
		||||
            router.push({
 | 
			
		||||
                path: nav[index].route
 | 
			
		||||
            })
 | 
			
		||||
        function navto(index: number | string){
 | 
			
		||||
            if(typeof index == "number"){
 | 
			
		||||
                router.push({
 | 
			
		||||
                    path: nav[index].route
 | 
			
		||||
                })
 | 
			
		||||
            }else{
 | 
			
		||||
                router.push(index)
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
        return {
 | 
			
		||||
            nav,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								src/types/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								src/types/index.d.ts
									
									
									
									
										vendored
									
									
								
							@ -10,6 +10,7 @@ declare module 'axios' {
 | 
			
		||||
        code: number;
 | 
			
		||||
        msg: string;
 | 
			
		||||
        data: T;
 | 
			
		||||
        total: number;
 | 
			
		||||
        [keys: string]: any;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -87,4 +88,11 @@ export interface LiveList {
 | 
			
		||||
    statusname: string;
 | 
			
		||||
    starttime: string;
 | 
			
		||||
    begin: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface LivelistInfo {
 | 
			
		||||
    data: LiveList[];
 | 
			
		||||
    code: number;
 | 
			
		||||
    msg: string;
 | 
			
		||||
    total: number;
 | 
			
		||||
}
 | 
			
		||||
@ -11,6 +11,8 @@ interface GetDate{
 | 
			
		||||
    yue: number;
 | 
			
		||||
    day: number;
 | 
			
		||||
    zhou: number;
 | 
			
		||||
    start: string;
 | 
			
		||||
    end: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getdate(yue?: number): GetDate{
 | 
			
		||||
@ -27,7 +29,8 @@ export function getdate(yue?: number): GetDate{
 | 
			
		||||
    now = now.date(0);
 | 
			
		||||
    const month = now.date(); // 当前月有几天
 | 
			
		||||
    const year = now.year()
 | 
			
		||||
    
 | 
			
		||||
    const start = year + "-" + yue + '-01';
 | 
			
		||||
    const end = year + "-" + yue + '-' + month;
 | 
			
		||||
    console.log(day,week,month)
 | 
			
		||||
    let i = 0;
 | 
			
		||||
    let w = 0;
 | 
			
		||||
@ -55,7 +58,7 @@ export function getdate(yue?: number): GetDate{
 | 
			
		||||
    }
 | 
			
		||||
    console.log(date)
 | 
			
		||||
 | 
			
		||||
    return {date, year, yue, day, zhou};
 | 
			
		||||
    return {date, year, yue, day, zhou, start, end};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -84,8 +84,8 @@
 | 
			
		||||
              <a-form-item label="母语" class="form-item">
 | 
			
		||||
                <a-input class="shuru" placeholder="请输入您的母语" />
 | 
			
		||||
              </a-form-item>
 | 
			
		||||
              <a-form-item label="授课语言" class="form-item">
 | 
			
		||||
                <a-select class="getcode" placeholder="请选择您的授课语言">
 | 
			
		||||
              <a-form-item label="教授" class="form-item">
 | 
			
		||||
                <a-select class="getcode" placeholder="请选择您的教授">
 | 
			
		||||
                  <a-select-option value="Zhejiang">
 | 
			
		||||
                    中国+0086
 | 
			
		||||
                  </a-select-option>
 | 
			
		||||
 | 
			
		||||
@ -32,7 +32,7 @@
 | 
			
		||||
                        <a-input size="small" v-model:value="userinfo.live" placeholder="请输入居住地" />
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="input-box teach-lang">
 | 
			
		||||
                        <div class="label">授课语言</div>
 | 
			
		||||
                        <div class="label">教授</div>
 | 
			
		||||
                        <a-select
 | 
			
		||||
                            v-model:value="userinfo.tlanguage"
 | 
			
		||||
                            style="width: 171px"
 | 
			
		||||
 | 
			
		||||
@ -233,7 +233,7 @@ export default defineComponent({
 | 
			
		||||
    const onSubmit = async (e: FromSend) => {
 | 
			
		||||
      e.preventDefault();
 | 
			
		||||
      console.log(toRaw(form.value), 111);
 | 
			
		||||
      // videoadd(toRaw(form));
 | 
			
		||||
      videoadd(form, toRaw(form.value));
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@
 | 
			
		||||
              :width="80"
 | 
			
		||||
              v-else
 | 
			
		||||
            />
 | 
			
		||||
            <video style="display: none" :src="videofile"></video>
 | 
			
		||||
            <!-- <video style="display: none" :src="videofile"></video> -->
 | 
			
		||||
          </div>
 | 
			
		||||
          <div
 | 
			
		||||
            class="upload-image upload"
 | 
			
		||||
 | 
			
		||||
@ -1,36 +1,70 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="video">
 | 
			
		||||
    <div class="nav">
 | 
			
		||||
      <div class="tabs">
 | 
			
		||||
        <div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">全部直播</div>
 | 
			
		||||
        <div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">未开始</div>
 | 
			
		||||
        <div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">已结束</div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="sel">
 | 
			
		||||
        <img src="@/static/images/sousuo.png" alt="" class="icon" />
 | 
			
		||||
        <input type="text" />
 | 
			
		||||
      </div>
 | 
			
		||||
        <div class="tabs">
 | 
			
		||||
            <div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
 | 
			
		||||
            全部直播
 | 
			
		||||
            </div>
 | 
			
		||||
            <div :class="tabindex == 0 ? 'on' : ''" @click="tabchange(0)">
 | 
			
		||||
            未开始
 | 
			
		||||
            </div>
 | 
			
		||||
            <div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
 | 
			
		||||
            已结束
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="sel">
 | 
			
		||||
            <img src="@/static/images/sousuo.png" alt="" class="icon" />
 | 
			
		||||
            <input placeholder="请输入想要搜索的直播标题" type="text" @keyup.enter="sel()" v-model="input" />
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="list" v-if="tabindex==1">
 | 
			
		||||
      <LiveItem :type="2" v-for="(i,j) in livelist" :key="j" :img="i.img" :title="i.title" :score="i.score" :date="i.starttime" :takehour="i.vodduration" :livenum="i.livenumber" :status="i.livestatus" :zid="i.liveid"></LiveItem>
 | 
			
		||||
    <div class="list" v-if="tabindex == 1">
 | 
			
		||||
        <LiveItem
 | 
			
		||||
            :type="2"
 | 
			
		||||
            v-for="(i, j) in livelist.data"
 | 
			
		||||
            :key="j"
 | 
			
		||||
            :img="i.img"
 | 
			
		||||
            :title="i.title"
 | 
			
		||||
            :score="i.score"
 | 
			
		||||
            :date="i.starttime"
 | 
			
		||||
            :takehour="i.vodduration"
 | 
			
		||||
            :livenum="i.livenumber"
 | 
			
		||||
            :status="i.livestatus"
 | 
			
		||||
            :zid="i.liveid"
 | 
			
		||||
        ></LiveItem>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
       <div class="list" v-if="tabindex==2">
 | 
			
		||||
      <LiveItem :type="3"></LiveItem>
 | 
			
		||||
      <LiveItem></LiveItem>
 | 
			
		||||
      <LiveItem></LiveItem>
 | 
			
		||||
      <LiveItem></LiveItem>
 | 
			
		||||
      <LiveItem></LiveItem>
 | 
			
		||||
      <LiveItem></LiveItem>
 | 
			
		||||
    <div class="list" v-if="tabindex == 0">
 | 
			
		||||
        <LiveItem
 | 
			
		||||
            :type="2"
 | 
			
		||||
            v-for="(i, j) in livelist.data"
 | 
			
		||||
            :key="j"
 | 
			
		||||
            :img="i.img"
 | 
			
		||||
            :title="i.title"
 | 
			
		||||
            :score="i.score"
 | 
			
		||||
            :date="i.starttime"
 | 
			
		||||
            :takehour="i.vodduration"
 | 
			
		||||
            :livenum="i.livenumber"
 | 
			
		||||
            :status="i.livestatus"
 | 
			
		||||
            :zid="i.liveid"
 | 
			
		||||
        ></LiveItem>
 | 
			
		||||
    </div>
 | 
			
		||||
          <div class="list" v-if="tabindex==3">
 | 
			
		||||
      <LiveItem :type="2"></LiveItem>
 | 
			
		||||
      <LiveItem :type="2"></LiveItem>
 | 
			
		||||
      <LiveItem :type="2"></LiveItem>
 | 
			
		||||
      <LiveItem :type="2"></LiveItem>
 | 
			
		||||
    <div class="list" v-if="tabindex == 2">
 | 
			
		||||
        <LiveItem
 | 
			
		||||
            :type="2"
 | 
			
		||||
            v-for="(i, j) in livelist.data"
 | 
			
		||||
            :key="j"
 | 
			
		||||
            :img="i.img"
 | 
			
		||||
            :title="i.title"
 | 
			
		||||
            :score="i.score"
 | 
			
		||||
            :date="i.starttime"
 | 
			
		||||
            :takehour="i.vodduration"
 | 
			
		||||
            :livenum="i.livenumber"
 | 
			
		||||
            :status="i.livestatus"
 | 
			
		||||
            :zid="i.liveid"
 | 
			
		||||
        ></LiveItem>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="pages">
 | 
			
		||||
      <a-pagination v-model:current="page" :total="500" :showLessItems="true" />
 | 
			
		||||
        <a-pagination v-model:current="page" :total="livelist.total" :showLessItems="true" />
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@ -45,100 +79,100 @@
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  .nav {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    border-bottom: 1px solid #eee;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    .tabs {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
      font-size: 13px;
 | 
			
		||||
      font-weight: bold;
 | 
			
		||||
      color: #111;
 | 
			
		||||
      padding: 11px 0;
 | 
			
		||||
      > div {
 | 
			
		||||
        margin-right: 58px;
 | 
			
		||||
        cursor: pointer;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
        width: 54px;
 | 
			
		||||
      }
 | 
			
		||||
      .on {
 | 
			
		||||
        color: #08ae98;
 | 
			
		||||
        position: relative;
 | 
			
		||||
        &::before {
 | 
			
		||||
          content: "";
 | 
			
		||||
          display: block;
 | 
			
		||||
          position: absolute;
 | 
			
		||||
          bottom: -12px;
 | 
			
		||||
          width: 57px;
 | 
			
		||||
          height: 1px;
 | 
			
		||||
          background-color: #08ae98;
 | 
			
		||||
    .nav {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        border-bottom: 1px solid #eee;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        .tabs {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        font-weight: bold;
 | 
			
		||||
        color: #111;
 | 
			
		||||
        padding: 11px 0;
 | 
			
		||||
        > div {
 | 
			
		||||
            margin-right: 58px;
 | 
			
		||||
            cursor: pointer;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
            width: 54px;
 | 
			
		||||
        }
 | 
			
		||||
        .on {
 | 
			
		||||
            color: #08ae98;
 | 
			
		||||
            position: relative;
 | 
			
		||||
            &::before {
 | 
			
		||||
            content: "";
 | 
			
		||||
            display: block;
 | 
			
		||||
            position: absolute;
 | 
			
		||||
            bottom: -12px;
 | 
			
		||||
            width: 57px;
 | 
			
		||||
            height: 1px;
 | 
			
		||||
            background-color: #08ae98;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
        .sel {
 | 
			
		||||
        width: 171px;
 | 
			
		||||
        height: 26px;
 | 
			
		||||
        border: 1px solid #999;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        padding: 8px;
 | 
			
		||||
        border-radius: 4px;
 | 
			
		||||
        > img {
 | 
			
		||||
            width: 11px;
 | 
			
		||||
            height: 11px;
 | 
			
		||||
        }
 | 
			
		||||
        > input {
 | 
			
		||||
            width: 119px;
 | 
			
		||||
            font-size: 9px;
 | 
			
		||||
            line-height: 1;
 | 
			
		||||
            margin-left: 6px;
 | 
			
		||||
            border: none;
 | 
			
		||||
            outline: none;
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    .sel {
 | 
			
		||||
      width: 171px;
 | 
			
		||||
      height: 26px;
 | 
			
		||||
      border: 1px solid #999;
 | 
			
		||||
      display: flex;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
      padding: 8px;
 | 
			
		||||
      border-radius: 4px;
 | 
			
		||||
      > img {
 | 
			
		||||
        width: 11px;
 | 
			
		||||
        height: 11px;
 | 
			
		||||
      }
 | 
			
		||||
      > input {
 | 
			
		||||
        width: 119px;
 | 
			
		||||
        font-size: 9px;
 | 
			
		||||
        line-height: 1;
 | 
			
		||||
        margin-left: 6px;
 | 
			
		||||
        border: none;
 | 
			
		||||
        outline: none;
 | 
			
		||||
      }
 | 
			
		||||
    .list {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        flex-wrap: wrap;
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        > div {
 | 
			
		||||
            margin-top: 28px;
 | 
			
		||||
            margin-left: 23px;
 | 
			
		||||
            &:nth-child(1),
 | 
			
		||||
            &:nth-child(6) {
 | 
			
		||||
                margin-left: 0;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .list {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-wrap: wrap;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    > div {
 | 
			
		||||
      margin-top: 28px;
 | 
			
		||||
      margin-left: 23px;
 | 
			
		||||
      &:nth-child(1),
 | 
			
		||||
      &:nth-child(6) {
 | 
			
		||||
        margin-left: 0;
 | 
			
		||||
      }
 | 
			
		||||
    .pages {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
        bottom: 114px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: center;
 | 
			
		||||
        ::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
 | 
			
		||||
        ::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
 | 
			
		||||
        ::v-deep(.ant-pagination-item),
 | 
			
		||||
        ::v-deep(.ant-pagination-jump-next-custom-icon),
 | 
			
		||||
        ::v-deep(.ant-pagination-jump-prev-custom-icon) {
 | 
			
		||||
        border: 1px solid #08ae98;
 | 
			
		||||
        }
 | 
			
		||||
        ::v-deep(.ant-pagination-item-active) a {
 | 
			
		||||
        color: #fff;
 | 
			
		||||
        }
 | 
			
		||||
        ::v-deep(.ant-pagination-item-active) {
 | 
			
		||||
        background-color: #08ae98;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .pages {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    bottom: 114px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
    ::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
 | 
			
		||||
    ::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
 | 
			
		||||
    ::v-deep(.ant-pagination-item),
 | 
			
		||||
    ::v-deep(.ant-pagination-jump-next-custom-icon),
 | 
			
		||||
    ::v-deep(.ant-pagination-jump-prev-custom-icon) {
 | 
			
		||||
      border: 1px solid #08ae98;
 | 
			
		||||
    }
 | 
			
		||||
    ::v-deep(.ant-pagination-item-active) a {
 | 
			
		||||
      color: #fff;
 | 
			
		||||
    }
 | 
			
		||||
    ::v-deep(.ant-pagination-item-active) {
 | 
			
		||||
      background-color: #08ae98;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, onMounted, ref } from "vue";
 | 
			
		||||
import LiveItem from "@/components/LiveItem.vue";
 | 
			
		||||
import { getlivelist } from '@/api';
 | 
			
		||||
import { LiveList } from '@/types';
 | 
			
		||||
import { getlivelist } from "@/api";
 | 
			
		||||
import { LivelistInfo } from "@/types";
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  components: {
 | 
			
		||||
    LiveItem,
 | 
			
		||||
@ -146,18 +180,37 @@ export default defineComponent({
 | 
			
		||||
  setup() {
 | 
			
		||||
    const page = ref(1);
 | 
			
		||||
    const tabindex = ref(1);
 | 
			
		||||
    const livelist=ref<LiveList[]>()
 | 
			
		||||
    onMounted(async ()=>{
 | 
			
		||||
      livelist.value = await getlivelist();
 | 
			
		||||
    })
 | 
			
		||||
     function tabchange(e: number): void {
 | 
			
		||||
         tabindex.value=e
 | 
			
		||||
    const livelist = ref<LivelistInfo>({
 | 
			
		||||
        code: 0,
 | 
			
		||||
        total: 0,
 | 
			
		||||
        msg: "",
 | 
			
		||||
        data: []
 | 
			
		||||
    });
 | 
			
		||||
    const input = ref("")
 | 
			
		||||
    onMounted(async () => {
 | 
			
		||||
        livelist.value = await getlivelist();
 | 
			
		||||
    });
 | 
			
		||||
    function tabchange(e: number): void {
 | 
			
		||||
        tabindex.value = e;
 | 
			
		||||
        livelist.value = {data:[], code: 0, msg: "",total: 0};
 | 
			
		||||
        tab();
 | 
			
		||||
    }
 | 
			
		||||
    async function sel(){
 | 
			
		||||
        console.log(input.value);
 | 
			
		||||
        livelist.value = await getlivelist({title: input.value});
 | 
			
		||||
    }
 | 
			
		||||
    async function tab(){
 | 
			
		||||
        input.value = '';
 | 
			
		||||
        livelist.value = await getlivelist({ status: tabindex.value});
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    return {
 | 
			
		||||
      page,
 | 
			
		||||
      tabindex,
 | 
			
		||||
      tabchange,
 | 
			
		||||
      livelist
 | 
			
		||||
        page,
 | 
			
		||||
        tabindex,
 | 
			
		||||
        tabchange,
 | 
			
		||||
        livelist,
 | 
			
		||||
        input,
 | 
			
		||||
        sel
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@ -1,42 +1,41 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="livedetail">
 | 
			
		||||
    <div class="info">
 | 
			
		||||
      <div class="liveplay">
 | 
			
		||||
        <liveplay></liveplay>
 | 
			
		||||
        
 | 
			
		||||
      </div>
 | 
			
		||||
        <div class="liveplay">
 | 
			
		||||
            <liveplay :info="liveinfo"></liveplay>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
      <LiveCount></LiveCount>
 | 
			
		||||
        <LiveCount :info="liveinfo.studentlist" :livestatus="liveinfo.livestatus" :zid="liveinfo.liveid"></LiveCount>
 | 
			
		||||
    </div>
 | 
			
		||||
    <VideoReview class="review"></VideoReview>
 | 
			
		||||
    <VideoReview class="review" v-if="liveinfo.livestatus == 2"></VideoReview>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.livedetail {
 | 
			
		||||
  width: 1320px;
 | 
			
		||||
  height: 563px;
 | 
			
		||||
  .info {
 | 
			
		||||
    width: 1321px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content:center;
 | 
			
		||||
    .liveplay {
 | 
			
		||||
      background: white;
 | 
			
		||||
      border-radius: 18px;
 | 
			
		||||
      margin-right: 29px;
 | 
			
		||||
      
 | 
			
		||||
    .info {
 | 
			
		||||
        width: 1321px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: center;
 | 
			
		||||
        .liveplay {
 | 
			
		||||
            background: white;
 | 
			
		||||
            border-radius: 18px;
 | 
			
		||||
            margin-right: 29px;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .review {
 | 
			
		||||
        margin-top: 28px;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .review {
 | 
			
		||||
    margin-top: 28px;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent } from "vue";
 | 
			
		||||
import liveplay from "@/components/LivePlay.vue"
 | 
			
		||||
import { defineComponent, ref } from "vue";
 | 
			
		||||
import liveplay from "@/components/LivePlay.vue";
 | 
			
		||||
import LiveCount from "@/components/LiveCount.vue";
 | 
			
		||||
import VideoReview from "@/components/VideoReview.vue";
 | 
			
		||||
import { useRoute } from 'vue-router';
 | 
			
		||||
import { useRoute } from "vue-router";
 | 
			
		||||
import { getliveinfo } from "@/api";
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  components: {
 | 
			
		||||
    LiveCount,
 | 
			
		||||
@ -45,6 +44,17 @@ export default defineComponent({
 | 
			
		||||
  },
 | 
			
		||||
  setup() {
 | 
			
		||||
    console.log(useRoute().query.id);
 | 
			
		||||
    const id = useRoute().query.id;
 | 
			
		||||
    let liveinfo = ref<any>({})
 | 
			
		||||
    if (typeof id == "string") {
 | 
			
		||||
        getliveinfo(parseInt(id)).then((res) => {
 | 
			
		||||
            liveinfo.value = res;
 | 
			
		||||
            console.log(res)
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    return {
 | 
			
		||||
        liveinfo
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
@ -1,162 +1,161 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="liveing">
 | 
			
		||||
    <a-breadcrumb separator=">">
 | 
			
		||||
      <a-breadcrumb-item>Home</a-breadcrumb-item>
 | 
			
		||||
      <a-breadcrumb-item href=""> Application Center </a-breadcrumb-item>
 | 
			
		||||
      <a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
 | 
			
		||||
      <a-breadcrumb-item>An Application</a-breadcrumb-item>
 | 
			
		||||
    </a-breadcrumb>
 | 
			
		||||
    <div class="top">
 | 
			
		||||
      <div class="left">直播页面</div>
 | 
			
		||||
      <div class="right">
 | 
			
		||||
        <img src="@/static/images/liveshare.png" alt="" />
 | 
			
		||||
        <img src="@/static/images/liveend.png" alt="" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="info">
 | 
			
		||||
      <LiveingWatcher></LiveingWatcher>
 | 
			
		||||
      <div class="LivePlaying">
 | 
			
		||||
        <LivePlaying></LivePlaying>
 | 
			
		||||
        <div class="comment">
 | 
			
		||||
          <div class="commentitem">
 | 
			
		||||
            <span>13:32:30</span>
 | 
			
		||||
            <span class="name"> Andy : </span>
 | 
			
		||||
            <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="commentitem">
 | 
			
		||||
            <span>13:32:30</span>
 | 
			
		||||
            <span class="name"> Andy : </span>
 | 
			
		||||
            <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="commentitem">
 | 
			
		||||
            <span>13:32:30</span>
 | 
			
		||||
            <span class="name"> Andy : </span>
 | 
			
		||||
            <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
          </div>
 | 
			
		||||
    <div class="liveing">
 | 
			
		||||
        <a-breadcrumb separator=">">
 | 
			
		||||
        <a-breadcrumb-item>Home</a-breadcrumb-item>
 | 
			
		||||
        <a-breadcrumb-item href=""> Application Center </a-breadcrumb-item>
 | 
			
		||||
        <a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
 | 
			
		||||
        <a-breadcrumb-item>An Application</a-breadcrumb-item>
 | 
			
		||||
        </a-breadcrumb>
 | 
			
		||||
        <div class="top">
 | 
			
		||||
        <div class="left">直播页面</div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
            <img src="@/static/images/liveshare.png" alt="" />
 | 
			
		||||
            <img src="@/static/images/liveend.png" alt="" />
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    <div class="others">
 | 
			
		||||
        <div class="othersitem">
 | 
			
		||||
            <div class="watcher"></div>
 | 
			
		||||
            <div class="name">asdsada</div>
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
        </div>
 | 
			
		||||
       <div class="othersitem">
 | 
			
		||||
            <div class="watcher"></div>
 | 
			
		||||
            <div class="name">asdsada</div>
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="othersitem">
 | 
			
		||||
            <div class="watcher"></div>
 | 
			
		||||
            <div class="name">asdsada</div>
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="othersitem">
 | 
			
		||||
            <div class="watcher"></div>
 | 
			
		||||
            <div class="name">asdsada</div>
 | 
			
		||||
            <img src="" alt="" />
 | 
			
		||||
        <div class="info">
 | 
			
		||||
            <LiveingWatcher></LiveingWatcher>
 | 
			
		||||
            <div class="LivePlaying">
 | 
			
		||||
                <LivePlaying></LivePlaying>
 | 
			
		||||
                <div class="comment">
 | 
			
		||||
                <div class="commentitem">
 | 
			
		||||
                    <span>13:32:30</span>
 | 
			
		||||
                    <span class="name"> Andy : </span>
 | 
			
		||||
                    <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="commentitem">
 | 
			
		||||
                    <span>13:32:30</span>
 | 
			
		||||
                    <span class="name"> Andy : </span>
 | 
			
		||||
                    <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="commentitem">
 | 
			
		||||
                    <span>13:32:30</span>
 | 
			
		||||
                    <span class="name"> Andy : </span>
 | 
			
		||||
                    <span> 老师,这个部分可以讲的慢一些吗? </span>
 | 
			
		||||
                </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="others">
 | 
			
		||||
                <div class="othersitem">
 | 
			
		||||
                <div class="watcher"></div>
 | 
			
		||||
                <div class="name">asdsada</div>
 | 
			
		||||
                <img src="" alt="" />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="othersitem">
 | 
			
		||||
                <div class="watcher"></div>
 | 
			
		||||
                <div class="name">asdsada</div>
 | 
			
		||||
                <img src="" alt="" />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="othersitem">
 | 
			
		||||
                <div class="watcher"></div>
 | 
			
		||||
                <div class="name">asdsada</div>
 | 
			
		||||
                <img src="" alt="" />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="othersitem">
 | 
			
		||||
                <div class="watcher"></div>
 | 
			
		||||
                <div class="name">asdsada</div>
 | 
			
		||||
                <img src="" alt="" />
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
      
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.liveing ::v-deep(.ant-breadcrumb) > span:last-child {
 | 
			
		||||
  color: #08ae98;
 | 
			
		||||
}
 | 
			
		||||
.liveing {
 | 
			
		||||
  width: 1320px;
 | 
			
		||||
  height: 563px;
 | 
			
		||||
  .top {
 | 
			
		||||
    width: 1321px;
 | 
			
		||||
    height: 57px;
 | 
			
		||||
    background: white;
 | 
			
		||||
    border-radius: 18px;
 | 
			
		||||
    margin-top: 23px;
 | 
			
		||||
    margin-bottom: 29px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    color: #121212;
 | 
			
		||||
    font-size: 13px;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    .left {
 | 
			
		||||
      margin-left: 40px;
 | 
			
		||||
      font-weight: bold;
 | 
			
		||||
    }
 | 
			
		||||
    .right {
 | 
			
		||||
      margin-right: 27px;
 | 
			
		||||
      > img {
 | 
			
		||||
        margin-right: 10px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .info {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    .LivePlaying {
 | 
			
		||||
      border-radius: 18px;
 | 
			
		||||
      margin: 0 35px;
 | 
			
		||||
      .comment {
 | 
			
		||||
        width: 797px;
 | 
			
		||||
        height: 153px;
 | 
			
		||||
    width: 1320px;
 | 
			
		||||
    height: 563px;
 | 
			
		||||
    .top {
 | 
			
		||||
        width: 1321px;
 | 
			
		||||
        height: 57px;
 | 
			
		||||
        background: white;
 | 
			
		||||
        border-radius: 18px;
 | 
			
		||||
        margin-top: 29px;
 | 
			
		||||
        padding: 30px;
 | 
			
		||||
        font-size: 12px;
 | 
			
		||||
 | 
			
		||||
        color: #121212;
 | 
			
		||||
 | 
			
		||||
        .commentitem {
 | 
			
		||||
          margin-bottom: 17px;
 | 
			
		||||
          .name {
 | 
			
		||||
            margin-left: 28px;
 | 
			
		||||
            color: #08ae98;
 | 
			
		||||
            font-weight: bold;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      .liveinfo {
 | 
			
		||||
        margin-top: 23px;
 | 
			
		||||
        margin-bottom: 29px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        height: 58px;
 | 
			
		||||
        color: #121212;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        .left {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          color: #121212;
 | 
			
		||||
          font-size: 13px;
 | 
			
		||||
          margin-left: 29px;
 | 
			
		||||
          > div {
 | 
			
		||||
            margin-right: 57px;
 | 
			
		||||
          }
 | 
			
		||||
          .icon {
 | 
			
		||||
            width: 25px;
 | 
			
		||||
            height: 24px;
 | 
			
		||||
            margin-right: 6px;
 | 
			
		||||
          }
 | 
			
		||||
        margin-left: 40px;
 | 
			
		||||
        font-weight: bold;
 | 
			
		||||
        }
 | 
			
		||||
        .right {
 | 
			
		||||
          width: 74px;
 | 
			
		||||
          height: 29px;
 | 
			
		||||
          border: 1px solid #08ae98;
 | 
			
		||||
          border-radius: 3px;
 | 
			
		||||
          margin-right: 29px;
 | 
			
		||||
          color: #08ae98;
 | 
			
		||||
          font-size: 13px;
 | 
			
		||||
          line-height: 29px;
 | 
			
		||||
          font-weight: bold;
 | 
			
		||||
          text-align: center;
 | 
			
		||||
        margin-right: 27px;
 | 
			
		||||
        > img {
 | 
			
		||||
            margin-right: 10px;
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .others {
 | 
			
		||||
    width: 252px;
 | 
			
		||||
    height: 630px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
    .othersitem{
 | 
			
		||||
    .info {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        .LivePlaying {
 | 
			
		||||
        border-radius: 18px;
 | 
			
		||||
        margin: 0 35px;
 | 
			
		||||
        .comment {
 | 
			
		||||
            width: 797px;
 | 
			
		||||
            height: 153px;
 | 
			
		||||
            background: white;
 | 
			
		||||
            border-radius: 18px;
 | 
			
		||||
            margin-top: 29px;
 | 
			
		||||
            padding: 30px;
 | 
			
		||||
            font-size: 12px;
 | 
			
		||||
 | 
			
		||||
            color: #121212;
 | 
			
		||||
 | 
			
		||||
            .commentitem {
 | 
			
		||||
            margin-bottom: 17px;
 | 
			
		||||
            .name {
 | 
			
		||||
                margin-left: 28px;
 | 
			
		||||
                color: #08ae98;
 | 
			
		||||
                font-weight: bold;
 | 
			
		||||
            }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .liveinfo {
 | 
			
		||||
            display: flex;
 | 
			
		||||
            justify-content: space-between;
 | 
			
		||||
            height: 58px;
 | 
			
		||||
            align-items: center;
 | 
			
		||||
            .left {
 | 
			
		||||
            display: flex;
 | 
			
		||||
            color: #121212;
 | 
			
		||||
            font-size: 13px;
 | 
			
		||||
            margin-left: 29px;
 | 
			
		||||
            > div {
 | 
			
		||||
                margin-right: 57px;
 | 
			
		||||
            }
 | 
			
		||||
            .icon {
 | 
			
		||||
                width: 25px;
 | 
			
		||||
                height: 24px;
 | 
			
		||||
                margin-right: 6px;
 | 
			
		||||
            }
 | 
			
		||||
            }
 | 
			
		||||
            .right {
 | 
			
		||||
            width: 74px;
 | 
			
		||||
            height: 29px;
 | 
			
		||||
            border: 1px solid #08ae98;
 | 
			
		||||
            border-radius: 3px;
 | 
			
		||||
            margin-right: 29px;
 | 
			
		||||
            color: #08ae98;
 | 
			
		||||
            font-size: 13px;
 | 
			
		||||
            line-height: 29px;
 | 
			
		||||
            font-weight: bold;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .others {
 | 
			
		||||
        width: 252px;
 | 
			
		||||
        height: 630px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        flex-direction: column;
 | 
			
		||||
        .othersitem {
 | 
			
		||||
        position: relative;
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 132px;
 | 
			
		||||
@ -170,23 +169,22 @@
 | 
			
		||||
            opacity: 0.1;
 | 
			
		||||
            border-radius: 18px 18px 0px 0px;
 | 
			
		||||
            top: 0;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        > img {
 | 
			
		||||
            width: 228px;
 | 
			
		||||
            height: 132px;
 | 
			
		||||
            border-radius: 18px;
 | 
			
		||||
            background: #0f0;
 | 
			
		||||
        }
 | 
			
		||||
        .name{
 | 
			
		||||
        .name {
 | 
			
		||||
            position: absolute;
 | 
			
		||||
            top: 9px;
 | 
			
		||||
            left: 28px;
 | 
			
		||||
            font-size: 12px;
 | 
			
		||||
            color: #fff;
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
@ -196,11 +194,11 @@ import LiveingWatcher from "@/components/LiveingWatcher.vue";
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  components: {
 | 
			
		||||
    LivePlaying,
 | 
			
		||||
    LiveingWatcher,
 | 
			
		||||
        LivePlaying,
 | 
			
		||||
        LiveingWatcher,
 | 
			
		||||
  },
 | 
			
		||||
  setup() {
 | 
			
		||||
    console.log(1);
 | 
			
		||||
        console.log(1);
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
@ -188,6 +188,7 @@
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, ref } from 'vue';
 | 
			
		||||
import { getdate } from "@/utils/date"
 | 
			
		||||
import { getdatelist } from '@/api';
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
    props:{
 | 
			
		||||
@ -202,11 +203,19 @@ export default defineComponent({
 | 
			
		||||
        function xia(){
 | 
			
		||||
            yue.value  = yue.value + 1;
 | 
			
		||||
            month.value = getdate(yue.value)
 | 
			
		||||
            getdates()
 | 
			
		||||
        }
 | 
			
		||||
        function shang(){
 | 
			
		||||
            yue.value  = yue.value  - 1;
 | 
			
		||||
            month.value = getdate(yue.value)
 | 
			
		||||
            getdates()
 | 
			
		||||
        }
 | 
			
		||||
        async function getdates(){
 | 
			
		||||
            getdatelist(month.value.start, month.value.end).then((res)=>{
 | 
			
		||||
                console.log(res)
 | 
			
		||||
            })
 | 
			
		||||
        }
 | 
			
		||||
        getdates()
 | 
			
		||||
        return {
 | 
			
		||||
            month,
 | 
			
		||||
            xia,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user