ZhaoJing 2 jaren geleden
bovenliggende
commit
65fbfd9fa1
8 gewijzigde bestanden met toevoegingen van 1276 en 1043 verwijderingen
  1. 13 1
      index.html
  2. 26 0
      package-lock.json
  3. 1 0
      package.json
  4. 27 1
      src/pages/zbkt/wlzb/api.js
  5. 1 1
      src/pages/zbkt/wlzb/content.vue
  6. 231 38
      src/pages/zbkt/wlzb/detail.vue
  7. 92 17
      src/pages/zbkt/wlzb/index.vue
  8. 885 985
      yarn.lock

+ 13 - 1
index.html

@@ -3,7 +3,19 @@
   <head>
     <meta charset="UTF-8" />
     <!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
+    <meta
+      name="viewport"
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
+    />
+    <link
+      rel="stylesheet"
+      href="https://g.alicdn.com/de/prismplayer/2.11.0/skins/default/aliplayer-min.css"
+    />
+    <script
+      type="text/javascript"
+      charset="utf-8"
+      src="https://g.alicdn.com/de/prismplayer/2.11.0/aliplayer-min.js"
+    ></script>
     <title>桐乡艺校</title>
   </head>
   <body>

+ 26 - 0
package-lock.json

@@ -10,9 +10,11 @@
       "dependencies": {
         "@element-plus/icons-vue": "^2.0.9",
         "@vueuse/core": "^9.1.0",
+        "@windicss/plugin-scrollbar": "^1.2.3",
         "axios": "^0.27.2",
         "dayjs": "^1.11.5",
         "element-plus": "^2.2.14",
+        "qrcode.vue": "^3.3.3",
         "scss": "^0.2.4",
         "vue": "^3.2.37",
         "vue-router": "^4.1.3"
@@ -446,6 +448,11 @@
         "url": "https://github.com/sponsors/antfu"
       }
     },
+    "node_modules/@windicss/plugin-scrollbar": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/@windicss/plugin-scrollbar/-/plugin-scrollbar-1.2.3.tgz",
+      "integrity": "sha512-+cqv1pEmaNPITeBJ/lO6tc8IjBzRhQ+V9G8r249MMXivYoxUO4DtModBrRGHVvBgsYZgPXDsIv2jqtxc4NqYEg=="
+    },
     "node_modules/@windicss/plugin-utils": {
       "version": "1.8.7",
       "resolved": "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-1.8.7.tgz",
@@ -1627,6 +1634,14 @@
         "node": "^10 || ^12 || >=14"
       }
     },
+    "node_modules/qrcode.vue": {
+      "version": "3.3.3",
+      "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.3.3.tgz",
+      "integrity": "sha512-OsD4tQjIbxg/K6D5ZkWjBdYI9eg9K2i8qeYILdEAX5mdAydSAxV7xKmmZSP/hA12olLqEMZ9ryqDQrwa9jEMgw==",
+      "peerDependencies": {
+        "vue": "^3.0.0"
+      }
+    },
     "node_modules/queue-microtask": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -2502,6 +2517,11 @@
         "windicss": "^3.5.6"
       }
     },
+    "@windicss/plugin-scrollbar": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/@windicss/plugin-scrollbar/-/plugin-scrollbar-1.2.3.tgz",
+      "integrity": "sha512-+cqv1pEmaNPITeBJ/lO6tc8IjBzRhQ+V9G8r249MMXivYoxUO4DtModBrRGHVvBgsYZgPXDsIv2jqtxc4NqYEg=="
+    },
     "@windicss/plugin-utils": {
       "version": "1.8.7",
       "resolved": "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-1.8.7.tgz",
@@ -3265,6 +3285,12 @@
         "source-map-js": "^1.0.2"
       }
     },
+    "qrcode.vue": {
+      "version": "3.3.3",
+      "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.3.3.tgz",
+      "integrity": "sha512-OsD4tQjIbxg/K6D5ZkWjBdYI9eg9K2i8qeYILdEAX5mdAydSAxV7xKmmZSP/hA12olLqEMZ9ryqDQrwa9jEMgw==",
+      "requires": {}
+    },
     "queue-microtask": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",

+ 1 - 0
package.json

@@ -15,6 +15,7 @@
     "axios": "^0.27.2",
     "dayjs": "^1.11.5",
     "element-plus": "^2.2.14",
+    "qrcode.vue": "^3.3.3",
     "scss": "^0.2.4",
     "vue": "^3.2.37",
     "vue-router": "^4.1.3"

+ 27 - 1
src/pages/zbkt/wlzb/api.js

@@ -28,4 +28,30 @@ export const zbkt_dg = (data={}) =>{
         url:'/kzkt/zbkc_kcdg/detail',
         data,
     })
-}
+}
+
+// 直播创建评价
+export const zbkt_pj = (data={}) =>{
+    return request({
+        url:'/comment/question/add',
+        data:{
+            comment_question:data.comment_question
+        }
+    })
+}
+// 直播评价列表
+export const zbkt_pjList = (data={}) =>{
+    return request({
+        url:'/comment/question/index',
+        data,
+    })
+}
+
+
+// 直播下达作业
+export const zbkt_job = (data={}) =>{
+    return request({
+        url:'/kczy/evaluate/add',
+        data,
+    })
+}

+ 1 - 1
src/pages/zbkt/wlzb/content.vue

@@ -100,7 +100,7 @@ const data_kcap = $ref([
           <ul>
             <li v-for="i in detailMsg.kcdg"
               class="border_top cursor-pointer flex w-full justify-between px-4 py-2 my-4 bg-opacity-5 bg-hex-00A3FF"
-              :class="i.zt && 'bg-opacity-50 text-white'">
+              :class="i.status==1 && 'bg-opacity-50 text-white'">
               <div>{{  i.title  }}</div>
               <div @click="linkDetail(i)"
                 class="h-26px rounded-14px px-2 flex items-center mr-4 border"

+ 231 - 38
src/pages/zbkt/wlzb/detail.vue

@@ -7,11 +7,16 @@ import img_lczs from "~/assets/zbktssys/bar.png";
 import img_tx from "~/assets/zbktssys/tx.png";
 import { ArrowRight, ArrowLeft } from "@element-plus/icons-vue";
 import { ElMessage } from "element-plus";
-import { zbkt_dg } from "./api";
+import QrcodeVue from "qrcode.vue";
+import { zbkt_dg, zbkt_pjList, zbkt_pj } from "./api";
 import { ref } from "vue";
 import { useRoute } from "vue-router";
+const size = ref("92");
+const activeName = ref("evaluate");
 const https = ref(window.GLOBAL_CONFIG.api);
 const route = useRoute();
+
+// 详情
 let dgData = {
   id: route.params.id,
 };
@@ -22,6 +27,49 @@ function getDgDetail() {
   });
 }
 getDgDetail();
+
+// 评价列表
+let plMsg = ref([]);
+let pjList = {
+  cq_key_id: route.params.id,
+  cq_key_type: "1",
+  site: "tyyx",
+};
+let dgCode = "";
+function getPjList() {
+  zbkt_pjList(pjList)
+    .then((res) => {
+      plMsg.value = res.data.page_data;
+      dgCode = res.code;
+    })
+    .catch((err) => {
+      console.log(err);
+    });
+}
+getPjList();
+
+let starNum = ref(null);
+let star;
+function starChange() {
+  star = starNum.value;
+}
+// 评价
+let pjData = {
+  site: "tyyx",
+  comment_question: {
+    cq_key_id: route.params.id,
+    cq_key_type: 1,
+    cq_content: "",
+  },
+};
+function pingjia() {
+  Object.assign(pjData.comment_question, {
+    cq_star: star,
+  });
+  zbkt_pj(pjData).then((res) => {
+    getPjList();
+  });
+}
 const data_zy = $ref([
   {
     img: img_lczs1,
@@ -69,11 +117,49 @@ async function copyLink() {
   await navigator.clipboard.writeText(shareLink);
   ElMessage.success("已复制");
 }
+function changeActiveName(val) {
+  activeName.value = val;
+}
+const loading = ref(true);
+const fullscreenLoading = ref(false);
+fullscreenLoading.value = true;
+setTimeout(() => {
+  fullscreenLoading.value = false;
+  if (!dgMsg) {
+    alert("请刷新");
+  }
+}, 3000);
+
+onMounted(() => {
+  console.log(dgMsg.value.status);
+  var player = new Aliplayer(
+    {
+      id: "player-con",
+      source: "//player.alicdn.com/video/aliyunmedia.mp4",
+      width: "100%",
+      height: "500px",
+      autoplay: true,
+      isLive: dgMsg.value.status==1 ? true : false,
+      rePlay: false,
+      playsinline: true,
+      preload: true,
+      controlBarVisibility: "hover",
+      useH5Prism: true,
+    },
+    function (player) {
+      console.log("The player is created");
+    }
+  );
+});
 </script>
   
 <template>
   <common-header />
-  <div class="w-full flex items-center justify-center shadow h-60px bg-hex-fff">
+  <div
+    v-loading.fullscreen.lock="fullscreenLoading"
+    type="primary"
+    class="w-full flex items-center justify-center shadow h-60px bg-hex-fff"
+  >
     <div class="w-1400px flex items-center">
       <div class="text-lg text-hex-050026">内容</div>
       <el-divider direction="vertical" />
@@ -108,7 +194,12 @@ async function copyLink() {
 
           <div class="w-full">
             <div class="w-full text-center">呼唤小伙伴们前来围观吧</div>
-            <div></div>
+            <div class="flex justify-around m-10">
+              <div class="weibo">微博</div>
+              <div class="qq">qq</div>
+              <div class="qqkj">QQ空间</div>
+              <qrcode-vue :value="shareLink" :size="size" level="H" />
+            </div>
             <el-divider></el-divider>
             <div class="text-hex-00a3ff mb-2">直播间地址</div>
             <div class="flex">
@@ -125,6 +216,7 @@ async function copyLink() {
                   flex_center
                   rounded
                   cursor-pointer
+                  copy
                 "
                 @click="copyLink"
               >
@@ -160,69 +252,96 @@ async function copyLink() {
         </div>
       </div>
 
-      <div class="w-full h-800px mb-4 bg-hex-CEE5FB video">
+      <div class="w-full h-800px mb-4 bg-hex-CEE5FB video" id="player-con">
         <video class="w-full h-full" src=""></video>
+        <!-- <div class="prism-player" ></div> -->
         <div class="slave">助教:{{ dgMsg.slave_teacher }}</div>
         <div class="watch">当前观看人数:{{ dgMsg.lll }}人</div>
       </div>
 
-      <div class="flex_center">
-        <div class="w-176px ">
-          <el-tabs v-model="activeTap">
-            <el-tab-pane label="" name="pj">
-              <template #label>
-                <span class="text-base font-bold">评价</span>
-              </template>
-            </el-tab-pane>
-            <el-tab-pane label="作业" name="zye">
-              <template #label>
-                <span class="text-base font-bold">作业</span>
-              </template>
-            </el-tab-pane>
-            <el-tab-pane label="资源" name="zyuan">
-              <template #label>
-                <span class="text-base font-bold">资源</span>
-              </template>
-            </el-tab-pane>
-          </el-tabs>
+      <div class="activityContent">
+        <div
+          class="activityItem"
+          @click="changeActiveName('evaluate')"
+          :class="activeName == 'evaluate' ? 'activityItem-active' : ''"
+        >
+          评价
+        </div>
+        <div
+          @click="changeActiveName('job')"
+          :class="activeName == 'job' ? 'activityItem-active' : ''"
+          class="activityItem"
+        >
+          作业
+        </div>
+        <div
+          @click="changeActiveName('resource')"
+          :class="activeName == 'resource' ? 'activityItem-active' : ''"
+          class="activityItem"
+        >
+          资源
         </div>
       </div>
 
       <div class="w-full p-8">
-        <div v-show="activeTap === 'pj'">
-          <el-rate></el-rate>
+        <div class="evaluate" v-show="activeName == 'evaluate'">
+          <el-rate @change="starChange" v-model="starNum"></el-rate>
           <div
+            @click="pingjia"
             class="
               text-sm
               bg-hex-0A8AFF
               text-white
-              w-100px
+              w-111px
               h-32px
               flex_center
               rounded-full
               cursor-pointer
+              pingjia
             "
           >
             评价
           </div>
 
-          <div class="my-1">
+          <div class="my-1" v-for="p in plMsg" :key="p">
             <div class="flex items-end">
-              <div class="text-sm font-bold text-hex-171721 mr-4">余枫</div>
-              <div class="text-xs text-hex-8083A3">2021-01-23 11:15</div>
+              <div class="text-sm font-bold text-hex-171721 mr-4">
+                {{ p.user_realname }}
+              </div>
+              <div class="text-xs text-hex-8083A3">
+                {{ p.create_dateline_format }}
+              </div>
             </div>
-            <el-rate :model-value="5" disabled class="my-2"></el-rate>
+            <el-rate :model-value="p.cq_star" disabled class="my-2"></el-rate>
+          </div>
+        </div>
+        <div class="job" v-show="activeName == 'job'">
+          <div v-for="j in dgMsg.kzkt_kczy" :key="j" class="homework">
+            <div class="job-nav">{{ j.kkz_name }}</div>
+            <!-- <div
+              class="
+                text-xs
+                border border-hex-00a3ff
+                text-hex-00a3ff
+                w-60px
+                h-24px
+                rounded-full
+                cursor-pointer
+                down-load
+              "
+            >
+              下达
+            </div> -->
           </div>
         </div>
-        <div v-show="activeTap === 'zye'"></div>
-        <div v-show="activeTap === 'zyuan'">
-          <div class="my-1">
+        <div class="resource" v-show="activeName == 'resource'">
+          <div v-for="z in dgMsg.kzkt_kcwj" :key="z" class="my-1 ziyuan">
             <div class="flex items-end">
-              <div class="text-sm font-bold text-hex-171721 mr-4">余枫</div>
-              <div class="text-xs text-hex-8083A3">2021-01-23 11:15 上传</div>
+              <div class="text-sm font-bold text-hex-171721 mr-4">{{z.kkw_author}}</div>
+              <div class="text-xs text-hex-8083A3">{{z.kkw_datetime}} 上传</div>
             </div>
             <div class="flex justify-between items-center my-2">
-              <div class="text-hex-171721 text-sm">数学体系</div>
+              <div class="text-hex-171721 text-sm">{{z.kkw_name}}</div>
               <div
                 class="
                   text-xs
@@ -233,6 +352,7 @@ async function copyLink() {
                   flex_center
                   rounded-full
                   cursor-pointer
+                  down-load
                 "
               >
                 下载
@@ -273,7 +393,11 @@ async function copyLink() {
 </template>
   
 <style lang="scss" scoped>
-.focus{
+.copy {
+  text-align: center;
+  line-height: 40px;
+}
+.focus {
   line-height: 40px;
   text-align: center;
 }
@@ -303,8 +427,77 @@ async function copyLink() {
     text-align: center;
     font-size: 14px;
     color: #fff;
-    background: rgba(106,115,144,.5);
+    background: rgba(106, 115, 144, 0.5);
     border-radius: 10px 0px 0px 10px;
   }
 }
+.activityContent {
+  background: #ffffff;
+  margin: auto;
+  padding: 10px 8px;
+  box-sizing: border-box;
+  display: flex;
+  .activityItem {
+    margin: 0 20px;
+    text-align: center;
+    background: #fff;
+    font-size: 16px;
+    font-weight: 500;
+    color: #a09dbb;
+    border-radius: 10px;
+    cursor: pointer;
+  }
+  .activityItem-active {
+    color: #222;
+    position: relative;
+  }
+  .activityItem-active::after {
+    position: absolute;
+    content: "";
+    height: 10px;
+    width: 125%;
+    border-radius: 10px;
+    background-color: #6c5dd3;
+    opacity: 0.4;
+    bottom: 0;
+    left: -5px;
+  }
+}
+.evaluate {
+  .pingjia {
+    text-align: center;
+    line-height: 32px;
+    background: linear-gradient(90deg, #00a3ff 1%, #57c38f);
+    margin: 15px 0;
+  }
+}
+.resource {
+  .ziyuan {
+    height: 70px;
+    border-bottom: 1px dashed #b8ade3;
+    padding: 0 20px;
+  }
+}
+.down-load {
+  text-align: center;
+  line-height: 24px;
+  vertical-align: middle;
+}
+.homework {
+  display: flex;
+  height: 55px;
+  line-height: 55px;
+  justify-content: space-between;
+  padding: 0 20px;
+  border-bottom: 1px dashed #e4e6e8;
+  .down-load {
+    margin-top: 15px;
+  }
+  .job-nav {
+    font-size: 14px;
+    font-family: PingFangSC, PingFangSC-Semibold;
+    font-weight: 600;
+    color: #000000;
+  }
+}
 </style>

+ 92 - 17
src/pages/zbkt/wlzb/index.vue

@@ -275,6 +275,7 @@ const queryForm = ref({
 let zbMsg = ref([]);
 let zbktData = {
   site: "tyyx",
+  kz_phb: "0",
 };
 // 直播列表
 function getList() {
@@ -284,20 +285,6 @@ function getList() {
 }
 getList();
 
-// 排行榜
-let bangMsg = ref([]);
-function getRec() {
-  Object.assign(zbktData, {
-    kz_phb: "1",
-    limit: "999",
-  });
-  zbkt_list(zbktData).then((res) => {
-    bangMsg.value=res.data.page_data;
-    console.log(bangMsg.value);
-  });
-}
-getRec();
-
 let keywords = ref("");
 // 搜索
 function searchKey() {
@@ -306,12 +293,18 @@ function searchKey() {
 }
 // 点击年级
 function njClick() {
-  Object.assign(zbktData, { grade_id: queryForm.value.grade_id });
+  Object.assign(zbktData, {
+    grade_id: queryForm.value.grade_id,
+    subject_id: queryForm.value.subject_id,
+  });
   getList();
 }
 // 点击分册
 function fcClick() {
-  Object.assign(zbktData, { subject_id: queryForm.value.subject_id });
+  Object.assign(zbktData, {
+    grade_id: queryForm.value.grade_id,
+    subject_id: queryForm.value.subject_id,
+  });
   getList();
 }
 
@@ -327,6 +320,19 @@ function getTuijian() {
 }
 getTuijian();
 
+// 排行榜
+let bangMsg = ref([]);
+function getRec() {
+  Object.assign(zbktData, {
+    kz_phb: "1",
+    limit: "999",
+  });
+  zbkt_list(zbktData).then((res) => {
+    bangMsg.value = res.data.page_data;
+    console.log(bangMsg.value);
+  });
+}
+getRec();
 
 const router = useRouter();
 function handleTjzbClick(i) {
@@ -556,7 +562,7 @@ function hrefTo(href) {
           </div>
         </div>
 
-        <div class="w-320px shadow flex-none p-6">
+        <div class="w-320px shadow flex-none p-6 bang">
           <div class="text-lg font-bold mt-1 mb-3">直播课程排行榜</div>
           <template v-for="(i, index) in bangMsg" :key="i">
             <div
@@ -623,6 +629,71 @@ function hrefTo(href) {
               </div>
             </div>
           </template>
+          <template v-for="(i, index) in bangMsg" :key="i">
+            <div
+              v-if="index < 2"
+              class="w-full h-167px mb-4 relative cursor-pointer"
+              @click="handlePhbClick(i)"
+            >
+              <img
+                :src="i.img"
+                alt=""
+                class="w-full h-full overflow-hidden rounded-md"
+              />
+              <div class="p-2 absolute z-2 bottom-0 w-full text-white">
+                {{ i.kcjj }}
+              </div>
+              <div
+                class="
+                  absolute
+                  -top-11px
+                  right-20px
+                  w-50px
+                  h-22px
+                  text-white
+                  flex_center
+                  rounded-sm
+                  text-sm
+                "
+                :class="['bg-red-600', 'bg-yellow-400'][index]"
+              >
+                Top{{ index + 1 }}
+              </div>
+            </div>
+
+            <div
+              v-else
+              class="flex mb-4 cursor-pointer"
+              @click="handlePhbClick(i)"
+            >
+              <div class="w-110px flex-none relative">
+                <img
+                  :src="i.img"
+                  alt=""
+                  class="w-full h-full rounded-sm overflow-hidden"
+                />
+                <div
+                  class="
+                    absolute
+                    rounded-sm
+                    right-0
+                    top-0
+                    w-20px
+                    h-20px
+                    bg-hex-6C5DD3
+                    text-white
+                    flex_center
+                    text-xs
+                  "
+                >
+                  {{ index + 1 }}
+                </div>
+              </div>
+              <div class="px-1 leading-tight">
+                {{ i.title }}
+              </div>
+            </div>
+          </template>
         </div>
       </div>
     </div>
@@ -650,4 +721,8 @@ function hrefTo(href) {
   border-radius: 10px;
   background-color: #00a3ff;
 }
+.bang {
+  min-height: 320px;
+  max-height: 790px;
+}
 </style>

File diff suppressed because it is too large
+ 885 - 985
yarn.lock