Bläddra i källkod

2024/1/9 问题汇总修改

zhuf 1 år sedan
förälder
incheckning
b8b5aeb0f4
7 ändrade filer med 2064 tillägg och 1485 borttagningar
  1. 1034 583
      package-lock.json
  2. 1 0
      package.json
  3. 256 239
      src/pages/courseResources.vue
  4. 305 246
      src/pages/courseResourcesAll.vue
  5. 1 1
      src/pages/personal/components/Homework/ssys/xszy/list.vue
  6. 7 0
      vite.config.js
  7. 460 416
      yarn.lock

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1034 - 583
package-lock.json


+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "@iconify/json": "^2.2.160",
     "@vitejs/plugin-basic-ssl": "^0.1.2",
     "@vitejs/plugin-vue": "^3.2.0",
+    "@vue-macros/reactivity-transform": "^0.4.2",
     "sass": "^1.69.5",
     "unplugin-auto-import": "^0.11.5",
     "unplugin-icons": "^0.14.15",

+ 256 - 239
src/pages/courseResources.vue

@@ -1,18 +1,21 @@
 <template>
-  <common-header/>
+  <common-header />
   <div class="allPageWidthBg courseResources">
     <div class="courseResourcesCont ">
       <div class="baseTop">
         <p>课程资源,搜索一下</p>
         <div class="searchValue">
-          <input type="text" placeholder="搜索关键字" v-model="searchKey"  @change="stdValueChange">
+          <input type="text" placeholder="搜索关键字" v-model="searchKey" @change="stdValueChange">
           <div class="searchBtn" @click="searchBtn">
             <img src="/kczy/searchIcon.png" alt="">
           </div>
         </div>
         <div class="littleTab">
           <ul>
-            <li :class="{active:chooseNum==index }" v-for="(item,index) in quickInput" :key="index" @click="quickIn(item,index)">{{item}}  <span v-show="index!=4">|</span></li>
+            <template v-for="(item, index) in quickInput" :key="index">
+              <li :class="{ active: chooseNum == index }" @click="quickIn(item, index)">{{ item }} </li>
+              <li v-show="index != 4">|</li>
+            </template>
           </ul>
         </div>
       </div>
@@ -25,215 +28,217 @@
       <!-- <CourseType :transBaseData="resourceCenterBaseData" @toParentDetail="toDetail" @baseCourseAll="baseCourseAll"></CourseType> -->
     </div>
   </div>
-  <common-footer/>
+  <common-footer />
 </template>
 
 <script>
-  import CourseType from '../components/CourseType.vue'
+import CourseType from '../components/CourseType.vue'
 import CommonHeader from "@/components/CommonHeader/index.vue";
-  import CommonFooter from "@/components/CommonFooter/index.vue";
-import {courseIndex } from "./kczy/allApi.js";
+import CommonFooter from "@/components/CommonFooter/index.vue";
+import { courseIndex } from "./kczy/allApi.js";
 import { user } from "@/store/user.js";
-  export default {
-    name: 'courseResources',
-    components:{
-      CourseType,
-      CommonHeader,
-      CommonFooter
-    },
-    data() {
-      return {
-        searchKey: '',
-        num: 0,
-        quickInput: ['微课', '教案', '课件', '微视频', '网络资源'],
-        chooseNum:2,
-        baseData: {
-          id:"baseCourse",
-          mainTitle: '基础课程',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'baseCourse',
-              img: '/kczy/singlePic1.png',
-              title: '野天鹅',
-              starNum: 5,
-              collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'baseCourse',
-              img: '/kczy/singlePic2.png',
-              title: '安徒生世界插画',
-              starNum: 5,
-              collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'baseCourse',
-              img: '/kczy/singlePic3.png',
-              title: '传送门',
-              starNum: 5,
-              collectNum: '10w+',
-              zanNum:'14w+'
-            }
-          ]
-        },
-        famousBaseData: {
-          id:"famousCourse",
-          mainTitle: '名师在线',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'famousCourse',
-              img: '/kczy/mszx1.png',
-              title: '初中语文',
-              starNum: 5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'famousCourse',
-              img: '/kczy/mszx2.png',
-              title: '初中社会思品',
-              starNum: 4,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'famousCourse',
-              img: '/kczy/mszx3.png',
-              title: '小学语文',
-              starNum: 3,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            }
-          ]
-        },
-        homeworkAssBaseData: {
-          id:"homeworkAss",
-          mainTitle: '作业辅导',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'homeworkAss',
-              img: '/kczy/zyfd1.png',
-              title: '作业同步辅导',
-              starNum:5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            }
-          ]
-        },
-        familyBaseData: {
-          id:"familyCourse",
-          mainTitle: '家庭教育',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'familyCourse',
-              img: '/kczy/jtjy1.png',
-              title: '亲子沟通教育2.0',
-              starNum: 5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'familyCourse',
-              img: '/kczy/jtjy2.png',
-              title: '阅读时光',
-              starNum: 3,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-          ]
-        },
-        specialBaseData: {
-          id:"specialCourse",
-          mainTitle: '特色课程',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/tskc1.png',
-              title: '体育综合素质课程',
-              starNum: 3,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/tskc2.png',
-              title: '一起学寓言',
-              starNum:5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-          ]
-        },
-        resourceCenterBaseData: {
-          id:"resourceCenter",
-          mainTitle: '资源中心',
-          secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
-          label: ['微课', '教案', '课件', '微视频', '网络资源'],
-          courseDetail: [
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/singlePic1.png',
-              title: '野天鹅',
-              starNum: 5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/singlePic2.png',
-              title: '安徒生世界插画',
-              starNum:1,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/singlePic3.png',
-              title: '传送门',
-              starNum: 3,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/singlePic5.png',
-              title: '拇指姑娘',
-              starNum: 4,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            },
-            {
-              ni_pid:'specialCourse',
-              img: '/kczy/singlePic4.png',
-              title: '书中花园',
-              starNum:5,
-               collectNum: '10w+',
-              zanNum:'14w+'
-            }
-          ]
-        },
-      }
-    },
-    mounted() {
-      this.initData();
-    },
+export default {
+  name: 'courseResources',
+  components: {
+    CourseType,
+    CommonHeader,
+    CommonFooter
+  },
+  data() {
+    return {
+      searchKey: '',
+      num: 0,
+      quickInput: ['微课', '教案', '课件', '微视频', '网络资源'],
+      quickInputK: ['WK', 'JA', 'KJ', 'WSP', 'WLZY'],
+      chooseNum: 2,
+      baseData: {
+        id: "baseCourse",
+        mainTitle: '基础课程',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'baseCourse',
+            img: '/kczy/singlePic1.png',
+            title: '野天鹅',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'baseCourse',
+            img: '/kczy/singlePic2.png',
+            title: '安徒生世界插画',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'baseCourse',
+            img: '/kczy/singlePic3.png',
+            title: '传送门',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          }
+        ]
+      },
+      famousBaseData: {
+        id: "famousCourse",
+        mainTitle: '名师在线',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'famousCourse',
+            img: '/kczy/mszx1.png',
+            title: '初中语文',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'famousCourse',
+            img: '/kczy/mszx2.png',
+            title: '初中社会思品',
+            starNum: 4,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'famousCourse',
+            img: '/kczy/mszx3.png',
+            title: '小学语文',
+            starNum: 3,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          }
+        ]
+      },
+      homeworkAssBaseData: {
+        id: "homeworkAss",
+        mainTitle: '作业辅导',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'homeworkAss',
+            img: '/kczy/zyfd1.png',
+            title: '作业同步辅导',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          }
+        ]
+      },
+      familyBaseData: {
+        id: "familyCourse",
+        mainTitle: '家庭教育',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'familyCourse',
+            img: '/kczy/jtjy1.png',
+            title: '亲子沟通教育2.0',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'familyCourse',
+            img: '/kczy/jtjy2.png',
+            title: '阅读时光',
+            starNum: 3,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+        ]
+      },
+      specialBaseData: {
+        id: "specialCourse",
+        mainTitle: '特色课程',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/tskc1.png',
+            title: '体育综合素质课程',
+            starNum: 3,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/tskc2.png',
+            title: '一起学寓言',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+        ]
+      },
+      resourceCenterBaseData: {
+        id: "resourceCenter",
+        mainTitle: '资源中心',
+        secTitle: '实现直播教师上传资源,兼职美术老师下载资源',
+        label: ['微课', '教案', '课件', '微视频', '网络资源'],
+        courseDetail: [
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/singlePic1.png',
+            title: '野天鹅',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/singlePic2.png',
+            title: '安徒生世界插画',
+            starNum: 1,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/singlePic3.png',
+            title: '传送门',
+            starNum: 3,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/singlePic5.png',
+            title: '拇指姑娘',
+            starNum: 4,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          },
+          {
+            ni_pid: 'specialCourse',
+            img: '/kczy/singlePic4.png',
+            title: '书中花园',
+            starNum: 5,
+            collectNum: '10w+',
+            zanNum: '14w+'
+          }
+        ]
+      },
+    }
+  },
+  mounted() {
+    this.initData();
+  },
   methods: {
     //初始化数据
     initData() {
       let transObj = {
         token: user?.token,
-        keyword:this.searchKey,
+        keyword: this.searchKey,
+        kc_code: this.quickInputK[this.chooseNum]
       }
       courseIndex(transObj)
         .then(res => {
@@ -243,22 +248,22 @@ import { user } from "@/store/user.js";
             // this.famousBaseData =responseDataAll[1];
             // this.homeworkAssBaseData=responseDataAll[2];
             // this.familyBaseData=responseDataAll[3];
-            this.specialBaseData=responseDataAll[1];
+            this.specialBaseData = responseDataAll[1];
             // this.resourceCenterBaseData=responseDataAll[5];
-        }
-      })
-      .catch(error=>{
-        console.log(error)
-      })
+          }
+        })
+        .catch(error => {
+          console.log(error)
+        })
     },
     //
     stdValueChange() {
       this.initData();
     },
     //便捷输入
-    quickIn(item,index) {
+    quickIn(item, index) {
       this.chooseNum = index;
-      this.searchKey = item;
+      // this.searchKey = item;
       this.initData();
     },
     //搜索
@@ -276,92 +281,104 @@ import { user } from "@/store/user.js";
         query: {
           kkId: item.kk_id,
           kcName: item.kc_name,
-          kcId:item.kc_id//1:代表基础课程...
+          kcId: item.kc_id//1:代表基础课程...
         }
       });
     },
-      //详情页
+    //详情页
     toDetail(transParams) {
-      this.$router.push({ path: '/resourceChapter', query: { id: transParams.kk_id }})
+      this.$router.push({ path: '/resourceChapter', query: { id: transParams.kk_id } })
     },
 
   },
-  }
+}
 </script>
 <style scoped lang="scss">
-  @import "../styles/common_resource.scss";
-.courseResources{
-  width:100%;
-  .courseResourcesCont{
+@import "../styles/common_resource.scss";
+
+.courseResources {
+  width: 100%;
+
+  .courseResourcesCont {
     width: 1440px;
     margin: 0 auto;
-    .baseTop{
-      p{
+
+    .baseTop {
+      p {
         font-size: 48px;
         font-weight: 600;
         text-align: center;
         color: #000000;
-        padding-top:60px;
+        padding-top: 60px;
       }
-      .searchValue{
+
+      .searchValue {
         width: 497px;
         height: 50px;
-        margin:0 auto;
+        margin: 0 auto;
         background: #ffffff;
         border: 1px solid #00a3ff;
         border-radius: 8px;
         margin-top: 33px;
         overflow: hidden;
-        position:relative;
-        input{
-          width:100%;
+        position: relative;
+
+        input {
+          width: 100%;
           height: 100%;
           outline: 0;
           box-sizing: border-box;
           padding-left: 10px;
         }
-        .searchBtn{
+
+        .searchBtn {
           width: 26px;
           height: 26px;
           background: #00a3ff;
           border-radius: 6px;
           position: absolute;
-          right:5px;
-          top:50%;
-          transform: translate(-50%,-50%);
+          right: 5px;
+          top: 50%;
+          transform: translate(-50%, -50%);
           text-align: center;
           vertical-align: middle;
           cursor: pointer;
-          img{
+
+          img {
             display: block;
             text-align: center;
             margin: 6px auto 0;
           }
         }
       }
-      .littleTab{
+
+      .littleTab {
         width: 300px;
         margin: 0 auto;
-        ul{
-          margin-top:22px;
+
+        ul {
+          margin-top: 22px;
           display: flex;
-          li{
+
+          li {
             display: inline-block;
             font-size: 16px;
             font-weight: 400;
             text-align: left;
             color: #606565;
-            margin:0 5px;
+            margin: 0 5px;
             justify-content: space-between;
             cursor: pointer;
+            word-break: keep-all;
           }
         }
       }
     }
   }
 }
-.active{
-  color: #000000!important;
-  font-weight: bold!important;
+
+.active {
+  color: #000000 !important;
+  font-weight: bold !important;
 }
 </style>

+ 305 - 246
src/pages/courseResourcesAll.vue

@@ -1,19 +1,19 @@
 <template>
-  <common-header/>
+  <common-header />
   <div class="courseResources allPageWidthBg">
     <div class="likeBread">
-      <div class="likeBread_left">{{bigTitle}}</div>
+      <div class="likeBread_left">{{ bigTitle }}</div>
       <div class="likeBread_right">
-        <span>{{bigTitle}}</span>-
+        <span>{{ bigTitle }}</span>-
         <span>查看更多</span>-
         <span>全部</span>
       </div>
     </div>
     <div class="widthBg">
       <div class="baseTop">
-        <p>{{bigTitle}}</p>
+        <p>{{ bigTitle }}</p>
         <div class="searchValue">
-          <input type="text" placeholder="搜索关键字" v-model="searchKey" >
+          <input type="text" placeholder="搜索关键字" v-model="searchKey">
           <div class="searchBtn" @click="handleSearch">
             <img src="/kczy/searchIcon.png" alt="">
           </div>
@@ -25,7 +25,8 @@
       <div class="bigTitle">年级</div>
       <div class="selectionFilter">
         <ul>
-          <li v-for="(item,index) in filterData" :key="index" @click="gradeChoose(item,index)"><span :class="{ 'selectActive':num==index }">{{item.grade_name}}</span></li>
+          <li v-for="(item, index) in filterData" :key="index" @click="gradeChoose(item, index)"><span
+              :class="{ 'selectActive': num == index }">{{ item.grade_name }}</span></li>
         </ul>
       </div>
     </div>
@@ -34,39 +35,49 @@
       <div class="bigTitle">学科</div>
       <div class="selectionFilter">
         <ul>
-          <li v-for="(item,index) in subjectList" :key="index" @click="subjectChoose(item,index)"><span :class="{ 'selectActive':subNum==index }">{{item.subject_name}}</span></li>
+          <li v-for="(item, index) in subjectList" :key="index" @click="subjectChoose(item, index)"><span
+              :class="{ 'selectActive': subNum == index }">{{ item.subject_name }}</span></li>
         </ul>
       </div>
     </div>
 
-    <div class="common1280 keyFilter">
+    <!-- <div class="common1280 keyFilter">
       <div class="bigTitle">分册</div>
       <div class="selectionFilter">
         <ul>
           <li v-for="(item,index) in secFilterData" :key="index" @click="secChoose(item,index)"><span :class="{ 'selectActive':secNum==index }">{{item.name}}</span></li>
         </ul>
       </div>
+    </div> -->
+    <div class="common1280 keyFilter">
+      <div class="bigTitle">分类</div>
+      <div class="selectionFilter">
+        <ul>
+          <li v-for="(item, index) in secFilterData" :key="index" @click="secChoose(item, index)"><span
+              :class="{ 'selectActive': secNum == index }">{{ item.kc_name }}</span></li>
+        </ul>
+      </div>
     </div>
     <div class="common1280 contentMain">
-      <div class="allDetailCourse" v-if="courseDetail && courseDetail.length>0">
-          <div class="singlePart" v-for="(item,index) in courseDetail" :key="index" @click="toDetail(item,index)">
-            <div class="courseCover"> <img :src="item.kk_img" alt=""></div>
-            <p>{{item.kk_name}}</p>
-            <div class="evalStar">
-              <img src="/kczy/stars.png" v-for="(item,index) in item.kk_star_num" :key="index">
+      <div class="allDetailCourse" v-if="courseDetail && courseDetail.length > 0">
+        <div class="singlePart" v-for="(item, index) in courseDetail" :key="index" @click="toDetail(item, index)">
+          <div class="courseCover"> <img :src="item.kk_img" alt=""></div>
+          <p>{{ item.kk_name }}</p>
+          <div class="evalStar">
+            <img src="/kczy/stars.png" v-for="(item, index) in item.kk_star_num" :key="index">
+          </div>
+          <!-- positing -->
+          <div class="dataShow">
+            <div class="baseInfoPart">
+              <img src="/kczy/cellectIcon.png" alt="">
+              <span>{{ item.kk_fav_num }}</span>
             </div>
-            <!-- positing -->
-            <div class="dataShow">
-              <div class="baseInfoPart">
-                <img src="/kczy/cellectIcon.png" alt="">
-                <span>{{item.kk_fav_num}}</span>
-              </div>
-              <div class="baseInfoPart">
-                <img src="/kczy/fingerIcon.png" alt="">
-                <span>{{item.kk_like_num}}</span>
-              </div>
+            <div class="baseInfoPart">
+              <img src="/kczy/fingerIcon.png" alt="">
+              <span>{{ item.kk_like_num }}</span>
             </div>
           </div>
+        </div>
       </div>
       <div class="NOdata" v-else>
         <img src="../assets/kczy/noData4.png" alt="">
@@ -76,73 +87,92 @@
     </div>
     <div class="common1280" style="position:relative;">
       <div class="paganationPage">
-        <el-pagination background layout="prev, pager, next, ->" :total="totalRows"  @current-change="handleChangePage" />
+        <el-pagination background layout="prev, pager, next, ->" :total="totalRows" @current-change="handleChangePage" />
       </div>
     </div>
   </div>
-  <common-footer/>
+  <common-footer />
 </template>
 
 <script>
 import CommonHeader from "@/components/CommonHeader/index.vue";
 import CommonFooter from "@/components/CommonFooter/index.vue";
-import { baseCourseList,defaultGrade, defaultSubject} from "./kczy/allApi.js";
+import { baseCourseList, defaultGrade, defaultSubject } from "./kczy/allApi.js";
 import { user } from "@/store/user.js";
-  export default {
-    name: 'courseResources',
-    components:{
-      CommonHeader,
-      CommonFooter
-    },
-    data() {
-      return {
-        bigTitle:'基础课程',
-        searchKey: '',
-        num: 0,
-        secNum:0,
-        filterData: [],
-        secFilterData: [
-          {
-            keyV: '',
-            name:"全部"
-          },
-          {
-            keyV: 1,
-            name:"上册"
-          },
-          {
-            keyV: 2,
-            name:"下册"
-          }
-        ],
-        subjectList:[],
-        courseDetail: [],
-        page: 1,
-        totalRows:'',
-        prefixImg: 'https://tyyxopenapi.bozedu.top/',
-        chooseGradeId: '',//选中的年级id
-        chooseGradeName:'',
-        chooseVolume: '',//选中的分册
-        kcID: '',
-        subNum:0,
-        chooseSubjectId:'',
-        chooseSubjectName:'',
+import request from '@/utils/request';
+export default {
+  name: 'courseResources',
+  components: {
+    CommonHeader,
+    CommonFooter
+  },
+  data() {
+    return {
+      bigTitle: '基础课程',
+      searchKey: '',
+      num: 0,
+      secNum: 0,
+      filterData: [],
+      secFilterData: [
+        // {
+        //   keyV: '',
+        //   name:"全部"
+        // },
+        // {
+        //   keyV: 1,
+        //   name:"上册"
+        // },
+        // {
+        //   keyV: 2,
+        //   name:"下册"
+        // }
+      ],
+      subjectList: [],
+      courseDetail: [],
+      page: 1,
+      totalRows: '',
+      prefixImg: 'https://tyyxopenapi.bozedu.top/',
+      chooseGradeId: '',//选中的年级id
+      chooseGradeName: '',
+      chooseVolume: '',//选中的分册
+      kcID: '',
+      subNum: 0,
+      chooseSubjectId: '',
+      chooseSubjectName: '',
 
-      }
-    },
-  mounted() {
-      //获取上个页面的标识 判定是种课程(待串联)
-      this.initGrade();
-      this.initSubject();
-      this.initData(this.page);
-    },
+    }
+  },
+  async mounted() {
+    this.kcID = this.$route.query.kcId;
+
+    //获取上个页面的标识 判定是种课程(待串联)
+    this.initGrade();
+    this.initSubject();
+    await this.initType();
+    this.initData(this.page);
+  },
   methods: {
+    initType() {
+      return request({
+        url: '/kczy/cate/index',
+        data: {
+          kc_pid: this.kcID,
+        }
+      }).then(res => {
+        if (res.code == "1") {
+          this.secFilterData = res.data.page_data;
+          this.chooseVolume = res.data.page_data?.[0]?.kc_id;
+        }
+      }).catch(error => {
+        console.log(error);
+      })
+    },
     /**初始化年级*/
     initGrade() {
       let transObj = {
         token: user?.token,
       };
-      defaultGrade(transObj)
+      return defaultGrade(transObj)
         .then(res => {
           if (res.code == "1") {
             this.filterData = res.data.page_data;
@@ -173,7 +203,7 @@ import { user } from "@/store/user.js";
       let transObj = {
         token: user?.token,
       };
-      defaultSubject(transObj)
+      return defaultSubject(transObj)
         .then(res => {
           if (res.code == "1") {
             this.subjectList = res.data.page_data;
@@ -195,9 +225,9 @@ import { user } from "@/store/user.js";
               user_id: "0",
             };
             this.subjectList.unshift(allSection)
-        }
-      })
-      .catch(error=>{console.log(error)})
+          }
+        })
+        .catch(error => { console.log(error) })
     },
     /**初始化数据*/
     initData(changePage) {
@@ -205,57 +235,58 @@ import { user } from "@/store/user.js";
       let trans_kkId = this.$route.query.kkId;
       let trans_kcName = this.$route.query.kcName;
       this.kcID = this.$route.query.kcId;
-      this.bigTitle=trans_kcName;
+      this.bigTitle = trans_kcName;
       let transObj = {
         token: user?.token,
         page: changePage,
         limit: 10,
-        kc_cate_level_1:'',//一级目录的ID
+        kc_cate_level_1: '',//一级目录的ID
         grade_id: this.chooseGradeId,
-        subject_id:this.chooseSubjectId,//学科
-        team_id: this.chooseVolume,//分页 1:上册 2下册
+        subject_id: this.chooseSubjectId,//学科
+        // team_id: this.chooseVolume,//分页 1:上册 2下册
         keyword: this.searchKey,
         kc_cate_level_1: this.kcID,//
-        kk_shzt:'1',
+        kk_shzt: '1',
+        kc_cate_level_2: this.chooseVolume
       };
-      baseCourseList(transObj)
+      return baseCourseList(transObj)
         .then(res => {
           if (res.code == "1") {
             this.courseDetail = res.data.page_data;
-            this.totalRows =Number(res.data.total_rows);
+            this.totalRows = Number(res.data.total_rows);
           }
         })
         .catch(error => {
           console.log(error);
-      })
+        })
     },
     //关键字搜索
     handleSearch() {
       this.initData(this.page);
     },
     //年级选择
-    gradeChoose(item,index){
+    gradeChoose(item, index) {
       this.num = index;
       this.chooseGradeId = item.grade_id;
       this.chooseGradeName = item.grade_name;
       this.initData(this.page);
     },
     //学科选择
-    subjectChoose(item,index) {
+    subjectChoose(item, index) {
       this.subNum = index;
       this.chooseSubjectId = item.subject_id;
       this.chooseSubjectName = item.subject_name;
       this.initData(this.page);
     },
     //分册选择
-    secChoose(item,index) {
+    secChoose(item, index) {
       this.secNum = index;
-      this.chooseVolume = item.keyV;
+      this.chooseVolume = item.kc_id;
       this.initData(this.page);
     },
     //移步详情页
     toDetail(row, index) {
-      this.$router.push({ path: '/resourceChapter', query: { id: row.kk_id }})
+      this.$router.push({ path: '/resourceChapter', query: { id: row.kk_id } })
     },
     //翻页
     handleChangePage(val) {
@@ -263,194 +294,222 @@ import { user } from "@/store/user.js";
       this.initData(val);
     }
 
-    },
+  },
 
-  }
+}
 </script>
 
 <style scoped lang="scss">
 @import "../styles/common_resource.scss";
-.courseResources{
-  width:100%;
-    .widthBg{
-      width:100%;
-      height: 200px;
-      background: url("../../src/assets/kczy/sourcebg2.png") no-repeat left top;
-      background-size: 100% 100%;
+
+.courseResources {
+  width: 100%;
+
+  .widthBg {
+    width: 100%;
+    height: 200px;
+    background: url("../../src/assets/kczy/sourcebg2.png") no-repeat left top;
+    background-size: 100% 100%;
+  }
+
+  .baseTop {
+    width: 1280px;
+    margin: 0 auto;
+
+    p {
+      font-size: 48px;
+      font-weight: 600;
+      text-align: center;
+      color: #fff;
+      padding-top: 35px;
     }
-    .baseTop{
-      width: 1280px;
+
+    .searchValue {
+      width: 497px;
+      height: 50px;
       margin: 0 auto;
-      p{
-        font-size: 48px;
-        font-weight: 600;
-        text-align: center;
-        color: #fff;
-        padding-top:35px;
+      background: #ffffff;
+      border: 1px solid #00a3ff;
+      border-radius: 8px;
+      margin-top: 13px;
+      overflow: hidden;
+      position: relative;
+
+      input {
+        width: 100%;
+        height: 100%;
+        outline: 0;
+        box-sizing: border-box;
+        padding-left: 10px;
       }
-      .searchValue{
-        width: 497px;
-        height: 50px;
-        margin:0 auto;
-        background: #ffffff;
-        border: 1px solid #00a3ff;
-        border-radius: 8px;
-        margin-top: 13px;
-        overflow: hidden;
-        position:relative;
-        input{
-          width:100%;
-          height: 100%;
-          outline: 0;
-          box-sizing: border-box;
-          padding-left: 10px;
-        }
-        .searchBtn{
-          width: 26px;
-          height: 26px;
-          background: #00a3ff;
-          border-radius: 6px;
-          position: absolute;
-          right:5px;
-          top:50%;
-          transform: translate(-50%,-50%);
+
+      .searchBtn {
+        width: 26px;
+        height: 26px;
+        background: #00a3ff;
+        border-radius: 6px;
+        position: absolute;
+        right: 5px;
+        top: 50%;
+        transform: translate(-50%, -50%);
+        text-align: center;
+        vertical-align: middle;
+        cursor: pointer;
+
+        img {
+          display: inline-block;
           text-align: center;
-          vertical-align: middle;
-          cursor: pointer;
-          img{
-            display: inline-block;
-            text-align: center;
-          }
         }
       }
     }
-    .keyFilter{
-      display: flex;
-      height: 50px;
-      line-height: 50px;
-      margin: 5px auto;
-      .bigTitle{
-        font-size: 16px;
-        font-weight: 600;
-        text-align: center;
-        color: #000000;
-        margin-right:10px;
-      }
-      .selectionFilter{
-        flex:1;
-        ul{
-          display: flex;
-          border-bottom: 1px dashed #e4e6e8;
-          li{
-            display: inline-block;
-            font-size: 16px;
-            font-weight: 400;
-            text-align: center;
-            color: #949494;
-            margin-right: 4%;
-            cursor: pointer;
-          }
+  }
+
+  .keyFilter {
+    display: flex;
+    height: 50px;
+    line-height: 50px;
+    margin: 5px auto;
+
+    .bigTitle {
+      font-size: 16px;
+      font-weight: 600;
+      text-align: center;
+      color: #000000;
+      margin-right: 10px;
+    }
+
+    .selectionFilter {
+      flex: 1;
+
+      ul {
+        display: flex;
+        border-bottom: 1px dashed #e4e6e8;
+
+        li {
+          display: inline-block;
+          font-size: 16px;
+          font-weight: 400;
+          text-align: center;
+          color: #949494;
+          margin-right: 4%;
+          cursor: pointer;
         }
       }
-
     }
+
+  }
 }
 
-.allDetailCourse{
-    margin-top: 30px;
-    display: flex;
-    align-items: center;
-    justify-content: flex-start;
-    flex-wrap: wrap;
-    .singlePart{
-      width:19.2%;
-      height: 234px;
-      border-radius: 12px;
-      box-shadow: 0px 10px 24px 0px rgba(153,160,168,0.18);
-      margin-right: 1%;
-      margin-bottom: 30px;
-      position: relative;
-      cursor: pointer;
-      .courseCover{
-        height: 157px;
-        img{
-          width:100%;
-          height: 100%;
-        }
+.allDetailCourse {
+  margin-top: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+  flex-wrap: wrap;
+
+  .singlePart {
+    width: 19.2%;
+    height: 234px;
+    border-radius: 12px;
+    box-shadow: 0px 10px 24px 0px rgba(153, 160, 168, 0.18);
+    margin-right: 1%;
+    margin-bottom: 30px;
+    position: relative;
+    cursor: pointer;
+
+    .courseCover {
+      height: 157px;
+
+      img {
+        width: 100%;
+        height: 100%;
       }
-      p{
-        height: 22px;
-        font-size: 16px;
-        font-weight: 400;
-        text-align: left;
-        color: #000000;
-        box-sizing: border-box;
-        padding: 0 6px;
-        margin:10px 0;
-        overflow: hidden;
-        text-overflow:ellipsis;
-        white-space: nowrap;
+    }
+
+    p {
+      height: 22px;
+      font-size: 16px;
+      font-weight: 400;
+      text-align: left;
+      color: #000000;
+      box-sizing: border-box;
+      padding: 0 6px;
+      margin: 10px 0;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+
+    .evalStar {
+      box-sizing: border-box;
+      padding: 0 6px;
+      margin-top: 5px;
+
+      img {
+        width: 18px;
+        display: inline-block;
       }
-      .evalStar{
+    }
+
+    .dataShow {
+      position: absolute;
+      right: 0;
+      top: 0;
+      z-index: 13;
+      width: 160px;
+      height: 32px;
+      background: rgba(0, 0, 0, 0.5);
+      border-bottom-left-radius: 12px;
+      border-top-right-radius: 12px;
+      display: flex;
+
+      .baseInfoPart {
+        width: 50%;
         box-sizing: border-box;
-        padding: 0 6px;
-        margin-top:5px;
-        img{
-          width:18px;
+        padding-left: 4px;
+
+        img {
           display: inline-block;
+          vertical-align: middle;
         }
-      }
-      .dataShow{
-        position: absolute;
-        right:0;
-        top: 0;
-        z-index: 13;
-        width: 160px;
-        height: 32px;
-        background: rgba(0,0,0,0.5);
-        border-bottom-left-radius: 12px;
-        border-top-right-radius: 12px;
-        display: flex;
-        .baseInfoPart{
-          width:50%;
-          box-sizing: border-box;
-          padding-left: 4px;
-          img{
-            display: inline-block;
-            vertical-align: middle;
-          }
-          span{
-            font-size: 14px;
-            font-weight: 400;
-            text-align: left;
-            color: #ffffff;
-            margin-left:5px;
-          }
+
+        span {
+          font-size: 14px;
+          font-weight: 400;
+          text-align: left;
+          color: #ffffff;
+          margin-left: 5px;
         }
       }
     }
-    .singlePart:nth-child(5n){
-      margin-right: 0!important;
-    }
   }
-.active{
-  color: #000000!important;
+
+  .singlePart:nth-child(5n) {
+    margin-right: 0 !important;
+  }
+}
+
+.active {
+  color: #000000 !important;
   font-weight: bold;
 }
-.selectActive{
+
+.selectActive {
   background: #DCF1FF;
   border-radius: 6px;
-  color: #00a3ff!important;
+  color: #00a3ff !important;
   padding: 5px;
 }
-.paganationPage{
-  position:absolute;
-  right:0;
-  top:0;
-  z-index:11;
+
+.paganationPage {
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 11;
 
 }
-.contentMain{
+
+.contentMain {
   min-height: 500px;
 }
 </style>

+ 1 - 1
src/pages/personal/components/Homework/ssys/xszy/list.vue

@@ -7,7 +7,7 @@ const props = defineProps({
 
 const page = sessionStorage.getItem('personal/homework/ssys/xszy/list-page')
 const queryForm = reactive({
-  limit: 10,
+  limit: 60,
   page: page ? parseInt(page) : 1,
   ks_id: props.pid,
   yys_id: undefined,

+ 7 - 0
vite.config.js

@@ -8,6 +8,8 @@ import Icons from 'unplugin-icons/vite'
 import IconsResolver from 'unplugin-icons/resolver'
 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
 import basicSsl from '@vitejs/plugin-basic-ssl'
+import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
+// import legacyPlugin from '@vitejs/plugin-legacy'
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -31,6 +33,11 @@ export default defineConfig({
     }
   },
   plugins: [
+    // legacyPlugin({
+    //   targets: ['chrome 52'],  // 需要兼容的目标列表,可以设置多个
+    //   additionalLegacyPolyfills: ['regenerator-runtime/runtime'] // 面向IE11时需要此插件
+    // }),
+    ReactivityTransform(),
     vue({
       reactivityTransform: true
     }),

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 460 - 416
yarn.lock