Bladeren bron

课程目录

xuqiaoying 3 jaren geleden
bovenliggende
commit
95d9a401a9
4 gewijzigde bestanden met toevoegingen van 27 en 3 verwijderingen
  1. 2 2
      common/request.js
  2. 1 0
      pages/course/index.vue
  3. 8 1
      pages3/polyv/css/detail.scss
  4. 16 0
      pages3/polyv/detail.vue

+ 2 - 2
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地

+ 1 - 0
pages/course/index.vue

@@ -250,6 +250,7 @@ export default {
 		},
 		subjectList(data) {
 			var self = this;
+			// /app/common/course/subject/list
 			this.$api.subjectList(data).then(res => {
 				if(res.data.code==200){
 					self.sList = res.data.rows

+ 8 - 1
pages3/polyv/css/detail.scss

@@ -68,7 +68,7 @@
     height: 938rpx;
     padding: 56rpx 56rpx 0rpx;
     .check_head {
-      height: 140rpx;
+      height: 190rpx;
       border-bottom: 2rpx solid #F0F0F0;
     }
     .headers {
@@ -87,6 +87,13 @@
       font-size: 28rpx;
       color: #222222;
     }
+    .menuSel {
+      width: 100%;
+      // height: 100rpx;
+      white-space:nowrap;
+      overflow: hidden;
+      margin-top: 40rpx;
+    }
     .course_items {
       width: 100%;
       padding: 24rpx 0rpx 20rpx;

+ 16 - 0
pages3/polyv/detail.vue

@@ -549,6 +549,16 @@
 					    <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
             </view>
             <view class="coruse_num">共{{ courseTotal }}门</view>
+            <view class="menuSel">
+              <scroll-view class="r_sliper" scroll-x="true" >
+                <view v-for="(item,index) in subList" :key="index" style="margin-right: 20rpx;display:inline-block">
+                  <!-- :class="paramList[0].subjectId==item.id?'r_t1':'r_t2'"@click="cMenu(item.id)" -->
+                  <view class="r_t1" @click="cMenu(item)">
+                    {{item.subjectName}}
+                  </view>
+                </view>
+              </scroll-view>
+            </view>
 				</view>
 				<view class="check_con">
 					<scroll-view scroll-y="true" style="height: 700rpx;">
@@ -697,6 +707,7 @@ export default {
       courseList: [], // 课程列表
       courseTotal: 0,
       reStart: false, // 是否显示模块/章/节
+      subList: []
     };
   },
   computed: {
@@ -754,6 +765,7 @@ export default {
       console.log('ahhhhh视频hhhhhhhh')
       // /course/courseList查询商品下的课程列表
       this.courseList = []
+      this.menuList = []
       this.$api.courseCourseList({
         pageNum: 1,
         pageSize: 100,
@@ -763,6 +775,10 @@ export default {
       }).then((res) => {
         if (res.data.code == 200) {
           this.courseList.push.apply(this.courseList, res.data.rows)
+          // this.menuList.push.apply(this.courseList, res.data.rows)
+          let allItem = [{ subjectId: 0, subjectName: '所有'}]
+					this.subList = [...allItem, ...this.courseList]
+          console.log('this.subList:', this.subList)
           this.courseTotal = res.data.total || 0
           if (res.data.rows.length) {
             this.courseBusiness(res.data.rows[0].businessId)