Browse Source

学习改为课程

natasha 3 years ago
parent
commit
4a76453fc3

+ 1 - 1
src/components/learnCenter/Course.vue

@@ -6,7 +6,7 @@
         <span>
         <span>
           <img src="../../assets/learncenter/listTitleImg1.png" alt="" />
           <img src="../../assets/learncenter/listTitleImg1.png" alt="" />
         </span>
         </span>
-        学习
+        课程
       </div>
       </div>
       <div class="more" @click="gotolist">
       <div class="more" @click="gotolist">
         <span> 查看更多 </span>
         <span> 查看更多 </span>

+ 1 - 1
src/components/learnCenter/HeaderOne.vue

@@ -7,7 +7,7 @@
       <span v-if="classilfyID"> > </span>
       <span v-if="classilfyID"> > </span>
       <span
       <span
         v-if="classilfyID"
         v-if="classilfyID"
-        v-text="classilfyID == 'TEXTBOOK' ? '教材' : '教学'"
+        v-text="classilfyID == 'TEXTBOOK' ? '教材' : '课程'"
         @click="back"
         @click="back"
       ></span>
       ></span>
       <span class="arrows" v-if="title"> > </span>
       <span class="arrows" v-if="title"> > </span>

+ 1 - 1
src/views/learn-center/CourseDetail.vue

@@ -3,7 +3,7 @@
   <div class="CourseDetail" v-if="CourseData">
   <div class="CourseDetail" v-if="CourseData">
     <Header />
     <Header />
 
 
-    <HeaderOne text="123" :name="CourseData.name" title="教学" />
+    <HeaderOne text="123" :name="CourseData.name" title="课程" />
     <div class="main" v-if="CourseData" v-loading="loading">
     <div class="main" v-if="CourseData" v-loading="loading">
       <div class="bookDetail">
       <div class="bookDetail">
         <div class="rightUp">
         <div class="rightUp">

+ 1 - 1
src/views/learn-center/ListPage.vue

@@ -143,7 +143,7 @@ export default {
   created() {
   created() {
     this.navName = this.$route.query.id;
     this.navName = this.$route.query.id;
     if (this.navName == "COURSE") {
     if (this.navName == "COURSE") {
-      this.headerOneTitle = "教学";
+      this.headerOneTitle = "课程";
     }
     }
     if (this.navName == "TEXTBOOK") {
     if (this.navName == "TEXTBOOK") {
       this.headerOneTitle = "教材";
       this.headerOneTitle = "教材";

+ 47 - 47
src/views/learn-center/Seekresult.vue

@@ -94,27 +94,27 @@ export default {
       CourseList: null, //课程列表
       CourseList: null, //课程列表
       TextList: null, //教材列表
       TextList: null, //教材列表
       dataList: null, //展示列表
       dataList: null, //展示列表
-      seekContent: "", //搜索内容
-      gotoPage: "",
-      keycode: "",
+      seekContent: '', //搜索内容
+      gotoPage: '',
+      keycode: '',
       pageNum: 1,
       pageNum: 1,
       pageSize: 8,
       pageSize: 8,
       targetPage: 1,
       targetPage: 1,
       loading: false,
       loading: false,
-      classilfyList: ["学习", "教材"],
+      classilfyList: ['课程', '教材'],
       classilfyIndex: 0,
       classilfyIndex: 0,
       classilfyID: null,
       classilfyID: null,
-    };
+    }
   },
   },
   computed: {
   computed: {
     getCurrentQuestionView() {
     getCurrentQuestionView() {
       switch (this.classilfyIndex) {
       switch (this.classilfyIndex) {
         case 0:
         case 0:
-          return Course;
+          return Course
         case 1:
         case 1:
-          return Textbook;
+          return Textbook
         default:
         default:
-          return null;
+          return null
       }
       }
     },
     },
   },
   },
@@ -122,11 +122,11 @@ export default {
     classilfyIndex(newval, oldval) {
     classilfyIndex(newval, oldval) {
       if (newval != oldval) {
       if (newval != oldval) {
         if (newval == 0) {
         if (newval == 0) {
-          this.pageNum = 1;
-          this.getData("课程");
+          this.pageNum = 1
+          this.getData('课程')
         } else if (newval == 1) {
         } else if (newval == 1) {
-          this.pageNum = 1;
-          this.getData("教材");
+          this.pageNum = 1
+          this.getData('教材')
         }
         }
       }
       }
     },
     },
@@ -135,90 +135,90 @@ export default {
     handleSizeChange(val) {},
     handleSizeChange(val) {},
     // 跳页
     // 跳页
     handleCurrentChange(val) {
     handleCurrentChange(val) {
-      this.pageNum = val;
+      this.pageNum = val
       if (this.classilfyIndex == 0) {
       if (this.classilfyIndex == 0) {
-        this.getData("课程");
+        this.getData('课程')
       } else if (this.classilfyIndex == 1) {
       } else if (this.classilfyIndex == 1) {
-        this.getData("教材");
+        this.getData('教材')
       }
       }
     },
     },
     // 切换分类
     // 切换分类
     cutClassilfy(item, i) {
     cutClassilfy(item, i) {
-      this.classilfyIndex = i;
+      this.classilfyIndex = i
     },
     },
     // 获取子组件传过来的keycode进行查询
     // 获取子组件传过来的keycode进行查询
     changeKeycode(val) {
     changeKeycode(val) {
-      this.keycode = val;
+      this.keycode = val
       if (this.classilfyIndex == 0) {
       if (this.classilfyIndex == 0) {
-        this.getData("课程");
+        this.getData('课程')
       } else if (this.classilfyIndex == 1) {
       } else if (this.classilfyIndex == 1) {
-        this.getData("教材");
+        this.getData('教材')
       }
       }
     },
     },
     // 输入目标页 并跳到目标页
     // 输入目标页 并跳到目标页
     toPageChange() {
     toPageChange() {
-      this.gotoPage = this.gotoPage.replace(/[^\d]/g, ""); //使用空字符串去替换非数字的字符
+      this.gotoPage = this.gotoPage.replace(/[^\d]/g, '') //使用空字符串去替换非数字的字符
       if (this.gotoPage > Math.ceil(this.CourseList.total / 8)) {
       if (this.gotoPage > Math.ceil(this.CourseList.total / 8)) {
-        return;
+        return
       } else if (this.gotoPage != this.targetPage) {
       } else if (this.gotoPage != this.targetPage) {
-        this.targetPage = this.gotoPage * 1;
-        this.pageNum = this.gotoPage * 1;
+        this.targetPage = this.gotoPage * 1
+        this.pageNum = this.gotoPage * 1
         if (this.classilfyIndex == 0) {
         if (this.classilfyIndex == 0) {
-          this.getData("课程");
+          this.getData('课程')
         } else if (this.classilfyIndex == 1) {
         } else if (this.classilfyIndex == 1) {
-          this.getData("教材");
+          this.getData('教材')
         }
         }
       }
       }
     },
     },
     // 获取数据
     // 获取数据
     getData(val) {
     getData(val) {
-      this.loading = true;
-      if (val == "课程") {
+      this.loading = true
+      if (val == '课程') {
         // 获取课程列表
         // 获取课程列表
-        cousrseAPI("page_query-PageQueryCourseList", {
+        cousrseAPI('page_query-PageQueryCourseList', {
           page_capacity: this.pageSize,
           page_capacity: this.pageSize,
           cur_page: this.pageNum,
           cur_page: this.pageNum,
           finish_status: 53,
           finish_status: 53,
           release_status: 1,
           release_status: 1,
           name: this.keycode,
           name: this.keycode,
         }).then((res) => {
         }).then((res) => {
-          this.dataList = res;
-          this.CourseList = res;
-          this.loading = false;
-        });
+          this.dataList = res
+          this.CourseList = res
+          this.loading = false
+        })
       }
       }
-      TextbookAPI("book-book_manager-PageQueryBookList", {
+      TextbookAPI('book-book_manager-PageQueryBookList', {
         cur_page: this.pageNum,
         cur_page: this.pageNum,
         page_capacity: this.pageSize,
         page_capacity: this.pageSize,
         name: this.keycode,
         name: this.keycode,
         publish_status: 1,
         publish_status: 1,
-        is_control_publish_scope: "true",
+        is_control_publish_scope: 'true',
       }).then((res) => {
       }).then((res) => {
-        this.TextList = res;
-        if (val == "教材") {
-          this.dataList = null;
-          this.dataList = this.TextList;
-          this.loading = false;
+        this.TextList = res
+        if (val == '教材') {
+          this.dataList = null
+          this.dataList = this.TextList
+          this.loading = false
         }
         }
-      });
+      })
     },
     },
   },
   },
   created() {
   created() {
-    this.keycode = this.$route.query.keycode;
-    this.classilfyID = this.$route.query.id;
+    this.keycode = this.$route.query.keycode
+    this.classilfyID = this.$route.query.id
     // classilfyIndex
     // classilfyIndex
     // if (this.$route.query.id == "COURSE") {
     // if (this.$route.query.id == "COURSE") {
-    this.classilfyIndex = 0;
-    this.getData("课程");
+    this.classilfyIndex = 0
+    this.getData('课程')
     // } else {
     // } else {
     //   this.getData("教材");
     //   this.getData("教材");
     //   this.classilfyIndex = 1;
     //   this.classilfyIndex = 1;
     // }
     // }
   },
   },
-};
+}
 </script>
 </script>
 
 
-<style lang="scss"  scoped>
+<style lang="scss" scoped>
 .SeekResult {
 .SeekResult {
   min-height: 100vh;
   min-height: 100vh;
   background: #f6f6f6;
   background: #f6f6f6;
@@ -324,4 +324,4 @@ export default {
     }
     }
   }
   }
 }
 }
-</style>
+</style>

+ 1 - 1
src/views/learn-center/index.vue

@@ -12,7 +12,7 @@
           text-color="#000"
           text-color="#000"
           active-text-color="#FF9900"
           active-text-color="#FF9900"
         >
         >
-          <el-menu-item index="COURSE">学习</el-menu-item>
+          <el-menu-item index="COURSE">课程</el-menu-item>
           <el-menu-item index="TEXTBOOK">教材</el-menu-item>
           <el-menu-item index="TEXTBOOK">教材</el-menu-item>
           <!-- <el-menu-item index="LIVE LESSON">LIVE LESSON</el-menu-item>
           <!-- <el-menu-item index="LIVE LESSON">LIVE LESSON</el-menu-item>
         <el-menu-item index="VIDEO COURSE">VIDEO COURSE</el-menu-item> -->
         <el-menu-item index="VIDEO COURSE">VIDEO COURSE</el-menu-item> -->