Sfoglia il codice sorgente

Merge branch 'master' into houxq

WINDOWS-7IFQK7E\EDY 2 anni fa
parent
commit
8b77759f5b

+ 8 - 3
src/pages/_home/index.vue

@@ -61,7 +61,12 @@ request({
 
 
 function handleClickCard(row) {
-  router.push(`/qzzx/qzzxxq/${row.id}`)
+  // router.push(`/qzzx/qzzxxq/${row.id}`)
+  if (row.ni_type == '1') {
+    window.open(row.brief)
+  } else {
+    router.push(`/qzzx/qzzxxq/${row.id}`)
+  }
 }
 </script>
 
@@ -92,10 +97,10 @@ function handleClickCard(row) {
         <template #default="{ row: item }">
           <van-card :title="item.name" :thumb="item.img" @click="handleClickCard(item)">
             <template #price>
-              <van-tag plain type="primary">{{  item.nic_name  }}</van-tag>
+              <van-tag plain type="primary">{{ item.nic_name }}</van-tag>
             </template>
             <template #num>
-              {{  item.datetime  }}
+              {{ item.datetime }}
             </template>
           </van-card>
         </template>

+ 39 - 17
src/pages/jscz/jsyx/index.vue

@@ -6,7 +6,12 @@
       @click-left="onClickLeft"
     />
     <div class="nav">
-      <img class="coverImg" :src="https + yxMsg.yjkc_img" alt="" />
+      <img
+        v-if="yxMsg.yjkc_img"
+        class="coverImg"
+        :src="https + yxMsg.yjkc_img.split(',')[1]"
+        alt=""
+      />
       <h3 class="title">
         {{ yxMsg.yjkc_title }}
         <span class="hour" v-if="yxMsg.yjkc_kss"
@@ -52,11 +57,15 @@
             finish-icon="stop"
             inactive-color="#999"
           >
-            <van-step v-for="(c,i) in yxMsg.yjkc_kss" :key="c">
+            <van-step v-for="(c, i) in yxMsg.yjkc_kss" :key="c">
               <div class="className">
                 <p>第{{ c.yjkcdg_no }}讲</p>
-                <span v-if="c.is_finish === '1'">已学完</span>
-                <span @click="study(c,i)" v-if="c.is_finish === '0'">未学习</span>
+                <span v-if="c.is_finish === '1'" @click="studyAgain(c)"
+                  >已学完</span
+                >
+                <span @click="study(c, i)" v-if="c.is_finish === '0'"
+                  >未学习</span
+                >
               </div>
               <div class="classTitle">
                 <p>{{ c.yjkcdg_title }}</p>
@@ -69,10 +78,12 @@
           <ul v-if="yxMsg.rank.length" class="rank">
             <li v-for="(v, i) in yxMsg.rank" :key="v">
               <div class="order">
-                <span>{{ i + 1 }}</span>
+                <span>
+                  <span v-show="i > 2">{{ i + 1 }}</span></span
+                >
               </div>
               <div class="img">
-                <img :src="https + yjkx_avatar" alt="" />
+                <img :src="v.yjkx_avatar" alt="" />
               </div>
               <div class="jindu">
                 <p class="teacher">
@@ -82,7 +93,7 @@
                 <div class="bar">
                   <div
                     :style="{
-                      width: 4.78 * 13.3 * (yxMsg.jindu * 0.01 ) + 'vw',
+                      width: 4.78 * 13.3 * (yxMsg.jindu * 0.01) + 'vw',
                     }"
                     class="bar-blue"
                   ></div>
@@ -122,7 +133,7 @@
     <div v-show="show" class="cover"></div>
     <van-dialog v-model:show="videoShow" title="学习视频">
       <div>
-        <video :src="https+videoSrc"></video>
+        <video :src="https + videoSrc" autoplay controls></video>
       </div>
     </van-dialog>
   </div>
@@ -140,8 +151,7 @@ const active = ref(0);
 const classactive = ref(1);
 const show = ref(false); //覆盖层
 const blueWidth = ref(0);
-const videoShow=ref(false);
-const videoIndex = ref('0');
+const videoShow = ref(false);
 
 const cerShow = ref(false); //证书弹窗
 function getZs(jindu) {
@@ -167,8 +177,8 @@ function getDetail() {
 }
 getDetail();
 let addDate;
-let videoSrc = ref("")
-function study(c,i) {
+let videoSrc = ref("");
+function study(c, i) {
   addDate = {
     ybk_jsyx_kcxx: {
       yjkc_id: yxMsg.value.yjkc_id,
@@ -178,14 +188,16 @@ function study(c,i) {
       yjkx_avatar: user.user_avatar.middle,
     },
   };
-  videoSrc.value = c.yjkcdg_zy.split(",")[1]
+  videoSrc.value = c.yjkcdg_zy.split(",")[1];
   jsyx_add(addDate).then((res) => {
     console.log(res, "222");
     getDetail();
-    videoShow.value=true;
-    videoIndex.value=i;
+    videoShow.value = true;
   });
-
+}
+function studyAgain(c) {
+  videoSrc.value = c.yjkcdg_zy.split(",")[1];
+  videoShow.value = true;
 }
 </script>
 <style lang="scss" scoped>
@@ -357,9 +369,13 @@ function study(c,i) {
             width: 0.65 * 13.3vw;
             line-height: 0.4 * 13.3vw;
             position: relative;
+            text-align: center;
             span {
               font-size: 0.3 * 13.3vw;
               line-height: 0.6 * 13.3vw;
+              span {
+                color: #333333;
+              }
             }
           }
           .img {
@@ -434,8 +450,11 @@ function study(c,i) {
           .order {
             span {
               color: #fff;
+              display: inline-block;
+              width: 0.45 * 13.3vw;
+              height: 0.45 * 13.3vw;
               font-size: 0.2 * 13.3vw;
-              z-index: 5;
+              // z-index: 5;
               background-image: url("../../../assets/jscz/组\ 543.png");
               background-size: 100%;
               background-position: center;
@@ -448,6 +467,9 @@ function study(c,i) {
             span {
               color: #fff;
               font-size: 0.2 * 13.3vw;
+              display: inline-block;
+              width: 0.45 * 13.3vw;
+              height: 0.45 * 13.3vw;
               z-index: 5;
               background-image: url("../../../assets/jscz/组\ 544.png");
               background-size: 100%;

+ 24 - 7
src/pages/qzzx/index.vue

@@ -12,7 +12,11 @@ function handleNavLeftClick() {
 
 const router = useRouter()
 function handleClickCard(row) {
-  router.push(`/qzzx/qzzxxq/${row.id}`)
+  if (row.ni_type == '1') {
+    window.open(row.brief)
+  } else {
+    router.push(`/qzzx/qzzxxq/${row.id}`)
+  }
 }
 
 
@@ -35,6 +39,7 @@ const overlayForm = reactive({
   ni_title: '',
   ni_content: '',
   ni_img: '',
+  ni_type: '1',
 })
 
 function handleNavRightClick() {
@@ -44,6 +49,7 @@ function handleNavRightClick() {
   overlayForm.ni_title = ''
   overlayForm.ni_content = ''
   overlayForm.ni_img = ''
+  overlayForm.ni_type = '1'
 
   overlayShow = true
 }
@@ -88,10 +94,10 @@ function onFinish(val) {
         <template #default="{ row: item }">
           <van-card :title="item.name" :thumb="(item.img)" @click="handleClickCard(item)">
             <template #price>
-              <van-tag plain type="primary">{{  item.nic_name  }}</van-tag>
+              <van-tag plain type="primary">{{ item.nic_name }}</van-tag>
             </template>
             <template #num>
-              {{  item.datetime  }}
+              {{ item.datetime }}
             </template>
           </van-card>
         </template>
@@ -104,7 +110,7 @@ function onFinish(val) {
     <div class="bg-white w-9/10 p-4 rounded-md dark:bg-black" @click.stop>
       <div class="font-bold text-lg mb-4 pre">新建求真在线</div>
 
-      <van-form @submit="handleOverlaySubmit">
+      <van-form @submit="handleOverlaySubmit" label-width="5em">
         <van-field name="nic_id" label="新闻类型" is-link readonly @click="showPicker = true" v-model="pickerVal"
           :rules="[{ required: true, message: '新闻类型不能为空' }]"> </van-field>
 
@@ -120,9 +126,20 @@ function onFinish(val) {
         <van-field name="ni_title" v-model="overlayForm.ni_title" placeholder="请输入新闻标题..." label="新闻标题"
           :rules="[{ required: true, message: '新闻标题不能为空' }]"></van-field>
 
-        <van-field v-model="overlayForm.ni_content" name="ni_content" placeholder="请输入美篇链接或新闻内容..." maxlength="500"
-          show-word-limit rows="6" type="textarea" autosize :rules="[{ required: true, message: '新闻内容不能为空' }]"
-          label="新闻内容" />
+        <van-field name="radio" label="内容类型">
+          <template #input>
+            <van-radio-group v-model="overlayForm.ni_type" direction="horizontal">
+              <van-radio name="1">美篇链接</van-radio>
+              <van-radio name="0">普通新闻</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+
+        <van-field v-model="overlayForm.ni_content" name="ni_content"
+          :placeholder="`请输入${overlayForm.ni_type === '1' ? '美篇链接' : '新闻内容'}...`" maxlength="500" show-word-limit rows="6"
+          type="textarea" autosize
+          :rules="[{ required: true, message: overlayForm.ni_type === '1' ? '美篇链接不能为空' : '新闻内容不能为空' }]"
+          :label="overlayForm.ni_type === '1' ? '美篇链接' : '新闻内容'" />
 
         <van-field name="ni_img" label="封面图片" :rules="[{ required: true, message: '封面图片不能为空' }]">
           <template #input>

+ 2 - 2
src/pages/stxk/jz/wd/kcapxq.vue

@@ -129,7 +129,7 @@ function handleOverlaySubmit() {
       </div>
 
       <!--  v-if="getCountDownTime(data.kkks_end_datetime) === 0" -->
-      <template v-if="getCountDownTime(data.kkks_end_datetime) === 0">
+      <div class="w-full" v-if="getCountDownTime(data.kkks_end_datetime) === 0">
         <van-divider />
 
         <div class="text-xs mb-2">课时已结束,您可以对此进行评价</div>
@@ -161,7 +161,7 @@ function handleOverlaySubmit() {
             </van-button>
           </div>
         </van-form>
-      </template>
+      </div>
 
     </van-skeleton>
   </div>

+ 3 - 3
src/pages/stxkjs/stxk_js_classdetail/index.vue

@@ -12,9 +12,8 @@
         {{ classdetail.kkbk_starttime }} - {{ classdetail.kkbk_endtime }}
       </p>
       <div v-for="ja in classdetail.ja" :key="ja" class="plan-file">
-        <p v-for="j in ja.kkj_fj.split(';')" :key="j">
-          课程教案:{{ j.split(",")[0] }}
-        </p>
+          <a :href="resolveSingleFileString(ja.kkj_fj).url">课程教案:{{ resolveSingleFileString(ja.kkj_fj).name }}         
+          </a>
       </div>
       <p class="des" v-html="classdetail.khfw_kcgl.kk_kcjj"></p>
       <van-tabs v-model:active="activeName" shrink>
@@ -83,6 +82,7 @@ import { stxk_up } from "../api";
 import { ref, reactive, nextTick } from "vue";
 import { useRoute } from "vue-router";
 import { showToast } from "vant";
+import { resolveSingleFileString, resolveFileString } from '~/utils/helper';
 let https = ref(window.GLOBAL_CONFIG.api);
 const $route = useRoute();
 const onClickLeft = () => history.back();

+ 4 - 2
src/router/index.js

@@ -69,12 +69,14 @@ export default createRouter({
     },
     {
       path: "/qzzx",
-      name: 'qzzx',
+
       children: [
         {
           path: '',
+          name: 'qzzx',
           component: () => import("~/pages/qzzx/index.vue"),
-        }, {
+        },
+        {
           // name: 'chat_detail',
           path: 'qzzxxq/:id',
           component: () => import("~/pages/qzzx/xwxq.vue"),