Browse Source

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_pc into dev

yangdamao 3 years ago
parent
commit
4ee869e9d5

BIN
src/assets/topic/banner_one.png


BIN
src/assets/topic/one_bg.png


+ 4 - 4
src/axios.js

@@ -1,20 +1,20 @@
 import axios from 'axios'
 import store from './store'
 import { Message } from 'element-ui'
-// export const BASE_URL = 'https://api.xyyxt.net'   //release
+export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
 // export const BASE_URL = 'http://192.168.1.7:5055'    //dev
 // export const BASE_URL = 'http://192.168.1.24:5055'    //dev
-export const BASE_URL = 'http://120.79.166.78:19012'    //测试-外网
+// 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'    //测试
 export const tenantId = '867735392558919680'
 
 
 //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 import tools from './common/tools'
 import router from './router'

+ 1 - 0
src/common/tools.js

@@ -128,6 +128,7 @@ export default {
 	 * @returns {*}
 	 */
 	timestampToTime(timestamp, isDay = true,hasChinese) {
+		console.log('timestampToTime---', timestamp)
 		var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
 		var Y = date.getFullYear() + (hasChinese ? '' : '-');
 		var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + (hasChinese ? '' : '-');

+ 1 - 0
src/pages/bank-report/index.vue

@@ -250,6 +250,7 @@ export default {
                 examId: this.examId,
                 pageNum: this.pageNum,
                 pageSize: this.pageSize,
+                platform: 2,
             }
         }).then((res) => {
             if (res.code == 200) {

+ 0 - 1
src/pages/course-detail/index.vue

@@ -2688,7 +2688,6 @@
           <!-- <span v-if="courseItem.teaList && courseItem.teaList.length > 0" v-for="(tea, index) in courseItem.teaList" :key="index">
             <el-button type="info" round>{{tea.aliasName}}</el-button>
           </span> -->
-          <!--  @click="switchTeacher(item.courseId, cindex)"-->
           <span v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
             <span v-for="(tea, cindex) in courseItem.teaList" :key="cindex + 'three'" class="names"  >
               {{ tea.aliasName }}

+ 1 - 0
src/pages/course-report/index.vue

@@ -175,6 +175,7 @@ export default {
                 examId: this.examId,
                 pageNum: this.pageNum,
                 pageSize: this.pageSize,
+                platform: 2,
             }
         }).then((res) => {
             if (res.code == 200) {

+ 10 - 9
src/pages/goods-detail/course-detail.vue

@@ -72,13 +72,13 @@
                     <div class="goods-menu clearfix" >
                       
                       <div class="left-box">
-                        <div v-for="(courseItem, index) in goodsTeacher" :key="index + 'one'">
+                        <div v-for="(courseItem, tindex) in goodsTeacher" :key="tindex + 'one'">
                         <div class="left-box__body">
-                          <template v-for="(course, index) in courseItem.courseList">
+                          <template v-for="(course, cindex) in courseItem.courseList">
                           <div
                             class="course-list-item"
                             v-if="course.show == 1"
-                            :key="index + 'two'"
+                            :key="cindex + 'two'"
                           >
                             <div class="doubles">
                               <div
@@ -95,10 +95,9 @@
                               </div>
                               <div v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
                                 <div v-for="(tea, index) in courseItem.teaList" :key="index + 'three'" class="names"
-                                 :class="{nactive: teaIndex == index}" @click="switchTeacher(tea, index)">
+                                 :class="{nactive: States[tindex] == index}" @click="switchTeacher(tea, index, tindex)">
                                   {{ tea.aliasName }}
                                 </div>
-                                <!-- <el-button type="info" @click="switchTeacher(tea)" round>{{tea.aliasName}}</el-button> -->
                               </div>
                             </div>
                             <template v-if="course.showList">
@@ -589,6 +588,7 @@ export default {
       menuIndex: [], //需要展开的章节索引值
       freeMenuList: [], //赠送题卷列表
       teaIndex: 0,
+      States: {0: 0},
     };
   },
   beforeDestroy() {
@@ -1559,17 +1559,18 @@ export default {
       });
     },
         //切换老师
-    switchTeacher(data, index){
+    switchTeacher(data, index, tindex){
+      this.States[tindex] = index
       this.teaIndex = index
-        console.log(data,'data');
+        console.log(data,'data',index, tindex);
         this.goodsTeacher.forEach((item,index) => {
             if(item.teaList && item.teaList.length > 0){
                let list = item.teaList.filter(x => x.aliasName == data.aliasName)
                if(list && list.length > 0){
                   item.courseList.forEach((course,courseIndex) => {
                       if(course.courseId == data.courseId){
-                        console.log(index,'index');
-                         console.log(courseIndex,'courseIndex');
+                        // console.log(index,'index');
+                        //  console.log(courseIndex,'courseIndex');
                         this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
                       }else{
                         this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)

+ 8 - 3
src/pages/goodsTopic/components/buyDialog.vue

@@ -55,7 +55,7 @@ export default {
         },
         topicId: {
             type: [String, Number],
-            default: '1'
+            default: ''
         }
     },
     data() {
@@ -71,7 +71,6 @@ export default {
     watch: {
         buyModal(newV, oldV) {
             if (newV) {
-                console.log('监听')
                 this.getDetail()
             }
         },
@@ -96,12 +95,16 @@ export default {
                 noToken: true,
                 params: {
                     subjectType: this.subjectType,
-                    topicId: this.topicId || 1,
+                    topicId: this.topicId,
                     type: this.type
                 }
             }).then((res) => {
                 if (res.code == 200) {
                     this.courseSku = res.data || []
+                    if (this.courseSku.length) {
+                        this.skuItem = this.courseSku[0]
+                        this.skuIndex = 0
+                    }
                 } else {
                     this.$message.warning(res.msg)
                 }
@@ -189,7 +192,9 @@ export default {
         }
     }
     .check_con {
+        width: 100%;
         display: flex;
+        flex-wrap: wrap;
         .course_items {
             min-width: 190px;
             padding: 13px 16px;

+ 361 - 237
src/pages/goodsTopic/components/catalogue.vue

@@ -10,8 +10,8 @@
                 class="video_box"
                 :style="{ backgroundImage: `url(${$tools.splitImgHost(goodsDetail.coverUrl,false)})`,}"
                 >
-                <div v-show="vid" id="player"></div>
-                <div v-show="vidzb" id="playerzb"></div>
+                <div v-show="vid" id="player" class="video"></div>
+                <div v-show="vidzb" id="playerzb" class="video"></div>
             </div>
             <div class="right-box">
                 <div class="right-box__header">
@@ -27,199 +27,220 @@
                                 </div>
                                 <!-- 章节目录 -->
                                 <template v-if="tab.name == '1'">
-                                    <!-- <catalogue :goodsId='goodsId'></catalogue> -->
                                     <div class="mulu_body">
                                         <div class="left-box">
+                                            <div v-for="(courseItem, tindex) in goodsTeacher" :key="tindex + 'one'">
                                             <div class="left-box__body">
-                                                <div
-                                                class="course-list-item"
-                                                v-for="(course, index) in s_courseList"
-                                                :key="index"
-                                                >
-                                                <div
-                                                    class="course-list-item_title"
-                                                    @click="openCourse(course)"
-                                                >
-                                                    <i
-                                                    :class="{
-                                                        'el-icon-caret-right': !course.showList,
-                                                        'el-icon-caret-bottom': course.showList,
-                                                    }"
-                                                    ></i>
-                                                    {{ course.courseName }}
-                                                </div>
-                                                <template v-if="course.showList">
-                                                    <div
-                                                    class="item"
-                                                    v-for="(item, index) in course.list"
-                                                    :key="index"
-                                                    >
-                                                    <template v-if="item.type == 1">
-                                                        <div
-                                                        class="item__title"
-                                                        @click="openModule(item)"
-                                                        >
-                                                        <i
-                                                            :class="{
-                                                            'el-icon-caret-right': !item.showList,
-                                                            'el-icon-caret-bottom': item.showList,
-                                                            }"
-                                                        ></i>
-                                                        {{ item.name }}
-                                                        </div>
-                                                        <div class="item__content">
+                                                <template v-for="(course, cindex) in courseItem.courseList">
+                                                    <!-- v-for="(course, cindex) in s_courseList" -->
+                                                    <div v-if="course.show == 1" :key="cindex + 'two'">
                                                         <div
-                                                            class="bank-chapter"
-                                                            v-if="item.showList"
+                                                            class="course-list-item"
+                                                            v-show="course.subjectId === newActiveSubjectId || !newActiveSubjectId"
                                                         >
                                                             <div
-                                                            class="bank-chapter__item"
-                                                            v-for="(
-                                                                chapter, chapterIndex
-                                                            ) in item.list"
-                                                            :key="chapterIndex"
-                                                            >
-                                                            <div
-                                                                class="bank-chapter__item__text"
-                                                                @click="openChapter(chapter)"
+                                                                class="course-list-item_title"
+                                                                @click="openCourse(course)"
                                                             >
                                                                 <i
                                                                 :class="{
-                                                                    'el-icon-caret-right':
-                                                                    !chapter.showList,
-                                                                    'el-icon-caret-bottom':
-                                                                    chapter.showList,
+                                                                    'el-icon-caret-right': !course.showList,
+                                                                    'el-icon-caret-bottom': course.showList,
                                                                 }"
-                                                                ></i
-                                                                >{{ chapter.name }}
+                                                                ></i>
+                                                                {{ course.courseName }}
                                                             </div>
-
-                                                            <div
-                                                                class="bank-section"
-                                                                v-if="chapter.showList"
-                                                            >
-                                                                <div
-                                                                class="bank-section__item"
-                                                                v-for="(
-                                                                    section, sectionIndex
-                                                                ) in chapter.list"
-                                                                :key="sectionIndex"
-                                                                >
-                                                                <div
-                                                                    class="bank-section__item__text"
-                                                                >
-                                                                    {{ section.name }}
+                                                            <div v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
+                                                                <div v-for="(tea, index) in courseItem.teaList" :key="index + 'three'" class="names"
+                                                                :class="{nactive: States[tindex] == index}"
+                                                                 @click="switchTeacher(tea, index, tindex)">
+                                                                {{ tea.aliasName }}
                                                                 </div>
+                                                            </div>
+                                                            <template v-if="course.showList">
                                                                 <div
-                                                                    v-if="section.tryListen"
-                                                                    @click="
-                                                                    toDo(section, item.courseId)
-                                                                    "
-                                                                    class="btn"
+                                                                class="item"
+                                                                v-for="(item, index) in course.list"
+                                                                :key="index"
                                                                 >
-                                                                    试看
-                                                                </div>
-                                                                </div>
-                                                            </div>
-                                                            </div>
-                                                        </div>
-                                                        </div>
-                                                    </template>
+                                                                <template v-if="item.type == 1">
+                                                                    <div
+                                                                    class="item__title"
+                                                                    @click="openModule(item)"
+                                                                    >
+                                                                    <i
+                                                                        :class="{
+                                                                        'el-icon-caret-right': !item.showList,
+                                                                        'el-icon-caret-bottom': item.showList,
+                                                                        }"
+                                                                    ></i>
+                                                                    {{ item.name }}
+                                                                    </div>
+                                                                    <div class="item__content">
+                                                                    <div
+                                                                        class="bank-chapter"
+                                                                        v-if="item.showList"
+                                                                    >
+                                                                        <div
+                                                                        class="bank-chapter__item"
+                                                                        v-for="(
+                                                                            chapter, chapterIndex
+                                                                        ) in item.list"
+                                                                        :key="chapterIndex"
+                                                                        >
+                                                                        <div
+                                                                            class="bank-chapter__item__text"
+                                                                            @click="openChapter(chapter)"
+                                                                        >
+                                                                            <i
+                                                                            :class="{
+                                                                                'el-icon-caret-right':
+                                                                                !chapter.showList,
+                                                                                'el-icon-caret-bottom':
+                                                                                chapter.showList,
+                                                                            }"
+                                                                            ></i
+                                                                            >{{ chapter.name }}
+                                                                        </div>
 
-                                                    <template v-if="item.type == 2">
-                                                        <div class="item__content">
-                                                        <div class="bank-chapter">
-                                                            <div class="bank-chapter__item">
-                                                            <div
-                                                                class="bank-chapter__item__text"
-                                                                @click="openChapter(item)"
-                                                            >
-                                                                <i
-                                                                :class="{
-                                                                    'el-icon-caret-right':
-                                                                    !item.showList,
-                                                                    'el-icon-caret-bottom':
-                                                                    item.showList,
-                                                                }"
-                                                                ></i
-                                                                >{{ item.name }}
-                                                            </div>
+                                                                        <div
+                                                                            class="bank-section"
+                                                                            v-if="chapter.showList"
+                                                                        >
+                                                                            <div
+                                                                            class="bank-section__item"
+                                                                            v-for="(
+                                                                                section, sectionIndex
+                                                                            ) in chapter.list"
+                                                                            :key="sectionIndex"
+                                                                            >
+                                                                            <div
+                                                                                class="bank-section__item__text"
+                                                                            >
+                                                                                {{ section.name }}
+                                                                            </div>
+                                                                            <div
+                                                                                v-if="section.tryListen"
+                                                                                @click="
+                                                                                toDo(section, item.courseId)
+                                                                                "
+                                                                                class="btn"
+                                                                            >
+                                                                                试看
+                                                                            </div>
+                                                                            </div>
+                                                                        </div>
+                                                                        </div>
+                                                                    </div>
+                                                                    </div>
+                                                                </template>
 
-                                                            <div
-                                                                class="bank-section"
-                                                                v-if="item.showList"
-                                                            >
-                                                                <div
-                                                                class="bank-section__item"
-                                                                v-for="(
-                                                                    section, sectionIndex
-                                                                ) in item.list"
-                                                                :key="sectionIndex"
-                                                                >
-                                                                <div
-                                                                    class="bank-section__item__text"
-                                                                >
-                                                                    {{ section.name }}
-                                                                </div>
-                                                                <div
-                                                                    v-if="section.tryListen"
-                                                                    @click="
-                                                                    toDo(section, item.courseId)
-                                                                    "
-                                                                    class="btn"
-                                                                >
-                                                                    试看
-                                                                </div>
-                                                                </div>
-                                                            </div>
-                                                            </div>
-                                                        </div>
-                                                        </div>
-                                                    </template>
+                                                                <template v-if="item.type == 2">
+                                                                    <div class="item__content">
+                                                                    <div class="bank-chapter">
+                                                                        <div class="bank-chapter__item">
+                                                                        <div
+                                                                            class="bank-chapter__item__text"
+                                                                            @click="openChapter(item)"
+                                                                        >
+                                                                            <i
+                                                                            :class="{
+                                                                                'el-icon-caret-right':
+                                                                                !item.showList,
+                                                                                'el-icon-caret-bottom':
+                                                                                item.showList,
+                                                                            }"
+                                                                            ></i
+                                                                            >{{ item.name }}
+                                                                        </div>
 
-                                                    <template v-if="item.type == 3">
-                                                        <div class="item__content">
-                                                        <div class="bank-section">
-                                                            <div class="bank-section__item">
-                                                            <div class="bank-section__item__text">
-                                                                {{ item.name }}
-                                                            </div>
-                                                            <div
-                                                                v-if="item.tryListen"
-                                                                @click="toDo(item, item.courseId)"
-                                                                class="btn"
-                                                            >
-                                                                试看
-                                                            </div>
-                                                            </div>
-                                                        </div>
+                                                                        <div
+                                                                            class="bank-section"
+                                                                            v-if="item.showList"
+                                                                        >
+                                                                            <div
+                                                                            class="bank-section__item"
+                                                                            v-for="(
+                                                                                section, sectionIndex
+                                                                            ) in item.list"
+                                                                            :key="sectionIndex"
+                                                                            >
+                                                                            <div
+                                                                                class="bank-section__item__text"
+                                                                            >
+                                                                                {{ section.name }}
+                                                                            </div>
+                                                                            <div
+                                                                                v-if="section.tryListen"
+                                                                                @click="
+                                                                                toDo(section, item.courseId)
+                                                                                "
+                                                                                class="btn"
+                                                                            >
+                                                                                试看
+                                                                            </div>
+                                                                            </div>
+                                                                        </div>
+                                                                        </div>
+                                                                    </div>
+                                                                    </div>
+                                                                </template>
+
+                                                                <template v-if="item.type == 3">
+                                                                    <div class="item__content">
+                                                                    <div class="bank-section">
+                                                                        <div class="bank-section__item">
+                                                                        <div class="bank-section__item__text">
+                                                                            {{ item.name }}
+                                                                        </div>
+                                                                        <div
+                                                                            v-if="item.tryListen"
+                                                                            @click="toDo(item, item.courseId)"
+                                                                            class="btn"
+                                                                        >
+                                                                            试看
+                                                                        </div>
+                                                                        </div>
+                                                                    </div>
+                                                                    </div>
+                                                                </template>
+                                                                </div>
+                                                            </template>
                                                         </div>
-                                                    </template>
                                                     </div>
                                                 </template>
-                                                </div>
+                                            </div>
+
                                             </div>
                                         </div>
                                     </div>
                                     <div class="down_bottons">
-                                        <div class="ask_manage" @click="toAskManage()">咨询管理</div>
-                                        <div class="ask_manage ask_buy" @click="togoBuy()">立即购买</div>
-                                        <div v-if="showAsk" class="apply_ask">
-                                            <div class="ask_titles">报名咨询</div>
-                                            <div class="ask_time">周一至周日 9:00-18:00</div>
-                                            <div class="phones">
-                                                <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
-                                                <span>020-87085983</span>
+                                        <!-- <div class="asks">
+                                            <div class="ask_manage" @click="toAskManage()">咨询管理</div>
+                                            <div class="apply_ask">
+                                                <div class="ask_titles">报名咨询</div>
+                                                <div class="ask_time">{{ header.serviceTel.time }}</div>
+                                                <div class="phones" v-for="(item, index) in getTel(header.serviceTel.tel)" :key="index">
+                                                    <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
+                                                    <span>{{ item }}</span>
+                                                </div>
                                             </div>
-                                            <div class="phones">
-                                                <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
-                                                <span>020-87085982</span>
+                                        </div> -->
+                                        <el-popover placement="top" width="202" trigger="hover">
+                                            <div class="apply_ask">
+                                                <div class="ask_titles">报名咨询</div>
+                                                <div class="ask_time">{{ header.serviceTel.time }}</div>
+                                                <div class="phones" v-for="(item, index) in getTel(header.serviceTel.tel)" :key="index">
+                                                    <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
+                                                    <span>{{ item }}</span>
+                                                </div>
                                             </div>
-                                            <div class="phones">
-                                                <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
-                                                <span>13631379636</span>
+                                            <div slot="reference">
+                                                <div class="ask_manage" @click="toAskManage()">咨询管理</div>
                                             </div>
-                                        </div>
+                                        </el-popover>
+                                        <div class="ask_buy" @click="togoBuy()">立即购买</div>
+                                        
                                     </div>
                                 </template>
                             </el-tab-pane>
@@ -230,13 +251,14 @@
         </div>
         
         <!-- 弹窗 -->
-        <buy-dialog :buyModal.sync="buyModal" :topicId="topicId" :subjectType="1" :type="1"></buy-dialog>
+        <buy-dialog :buyModal.sync="buyModal" :topicId="topicId" :subjectType="1" :type="3"></buy-dialog>
     </div>
         
     <!-- </div> -->
 </template>
 
 <script>
+import { mapGetters } from "vuex"
 import buyDialog from './buyDialog.vue'
 export default {
     name: 'boxs',
@@ -288,24 +310,34 @@ export default {
             playCourseId: 0, // 播放课程id
             showAsk: false,
             buyModal: false,
+            goodsTeacher: [],
+            teaIndex: 0,
+            States: {0: 0},
+            newActiveSubjectId: '',
         }
     },
     watch: {
         async goodsId(newV, oldV) {
             if (newV) {
-                console.log('监听', this.topicId)
                 await this.getGoodsDetail()
                 this.goodsCourseList()
             }
         }
     },
+    computed: {
+        ...mapGetters(["header"]),
+    },
     methods: {
+        getTel(tel) {
+            return tel ? tel.split(";") : []
+        },
         toAskManage() {
             this.showAsk = !this.showAsk
         },
         toChangeCou(item, index) {
+            this.newActiveSubjectId = item.subjectId
             this.subIndex = index
-            this.s_courseList = this.courseList.filter(e => e.subjectId == item.subjectId)
+            // this.s_courseList = this.courseList.filter(e => e.subjectId == item.subjectId)
         },
         togoBuy() {
             this.buyModal = true
@@ -338,6 +370,27 @@ export default {
                 }
             });
         },
+        //切换老师
+        switchTeacher(data, index, tindex){
+            console.log(data,'data', index,tindex);
+            this.States[tindex] = index
+            this.teaIndex = index
+            this.goodsTeacher.forEach((item,index) => {
+                if(item.teaList && item.teaList.length > 0){
+                let list = item.teaList.filter(x => x.aliasName == data.aliasName)
+                if(list && list.length > 0){
+                    item.courseList.forEach((course,courseIndex) => {
+                        if(course.courseId == data.courseId){
+                            
+                            this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
+                        }else{
+                            this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)
+                        }
+                    })
+                }
+                }
+            })
+        },
         /**
          * 获取课程章节列表,/app/common/goods/course/list/' + data,
          */
@@ -348,6 +401,8 @@ export default {
                         item.showList = false
                         item.list = []
                     })
+                    // 获取双师制
+                    this.getCourseTeacher(res.rows)
                     this.courseList = res.rows || []
                     // 筛选科目名称
                     let ids = []
@@ -361,6 +416,7 @@ export default {
 					this.subList = [...newArr]
                     this.subList = this.subList.filter(item => item.subjectName)
                     console.log('this.subList', this.subList)
+                    this.subList.length && (this.newActiveSubjectId = this.subList[0].subjectId)
                     
                     if (this.needOpen) {
                         for (let i = 0; i < this.courseList.length; i++) {
@@ -381,6 +437,73 @@ export default {
                 
             })
         },
+        getCourseTeacher(rows) {
+            //获取商品双师资模板
+            this.$request.getGoodsCourseTeacher({
+               goodsId: this.goodsId
+            }).then((res1) => {
+              console.log(res1,'res1');
+              if(res1.data && res1.data.length > 0){
+                  //课程老师模板
+                  let teacherTel = res1.data;
+                  //商品课程
+                  let courses = rows;
+                  teacherTel.forEach((tea) => {
+                    let dataList = []
+                    let teacherList = []
+                      courses.forEach((item) => {
+                        if(tea.courseIds.search(item.courseId) > -1){
+                          dataList.push(item)
+                          teacherList = tea.courseList
+                        }
+                      })
+                      let result = {
+                        teaList:teacherList,
+                        courseList:dataList
+                      }
+                      this.goodsTeacher.push(result)
+                  })
+                  if(this.goodsTeacher && this.goodsTeacher.length > 0){
+                    let courseIds = []
+                    this.goodsTeacher.forEach((item) => {
+                        item.courseList.forEach((course) => {
+                          courseIds.push(course.courseId)
+                        })
+                    })
+                    if(courseIds.length > 0){
+                      courses.forEach((item) => {
+                          if(!courseIds.includes(item.courseId)){
+                              let data = {
+                                teaList:[],
+                                courseList: []
+                              }
+                              data.courseList.push(item)
+                              this.goodsTeacher.push(data)
+                          }
+                      })
+                    }
+                    this.goodsTeacher.forEach((item) => {
+                      if(item.courseList && item.courseList.length > 0){
+                        item.courseList[0].show = 1
+                      }
+                    })
+                  }
+              }else{
+                //没有双师资模板
+                rows.forEach((item) => {
+                  item.show = 1
+                  let data = {
+                      teaList:[],
+                      courseList: []
+                  }
+                  data.courseList.push(item)
+                  this.goodsTeacher.push(data)
+                })
+               
+              }
+            }) 
+            console.log(this.goodsTeacher,'this.goodsTeacher');
+        },
         // 获取课程目录,/app/common/course/menuList
         getCourseMenus(item) {
             return new Promise((resolve) => {
@@ -534,8 +657,8 @@ export default {
             const polyvLivePlayer = window.polyvLivePlayer;
             this.playerzb = polyvLivePlayer({
                 wrap: "#playerzb",
-                width: 700,
-                height: 528,
+                // width: 700,
+                height: 484,
                 uid: this.uidzb,
                 vid: this.vidzb,
             });
@@ -551,8 +674,8 @@ export default {
             // this.$request.obtainpolyvvideosign(this.vid).then((res) => {
             this.player = polyvPlayer({
                 wrap: "#player",
-                width: 700,
-                height: 528,
+                // width: 700,
+                height: 484,
                 vid: this.vid,
                 start: 0,
                 end: auditionMinute,
@@ -682,9 +805,9 @@ export default {
         width: 100%;
         height: 100%;
         overflow-y: auto;
-
+        padding-top: 10px;
         .course-list-item {
-            padding: 16px;
+            padding: 0px 16px 10px;
             border-radius: 10px;
 
             .item {
@@ -705,8 +828,7 @@ export default {
 
                         &__item {
                             padding-top: 10px;
-                            padding-bottom: 10px;
-                            // border-bottom: 1px solid #eeeeee;
+                            // padding-bottom: 10px;
                             font-size: 14px;
                             color: #fff;
                             &__text {
@@ -721,8 +843,7 @@ export default {
 
                         &__item {
                             padding-top: 10px;
-                            padding-bottom: 10px;
-                            // border-bottom: 1px solid #eeeeee;
+                            // padding-bottom: 10px;
                             font-size: 14px;
                             display: flex;
                             color: #3f8dfd;
@@ -758,67 +879,70 @@ export default {
     width: 404px;
     height: 44px;
     display: flex;
-    position: relative;
-    top: 0px;
-    left: 0px;
-    .ask_manage {
-        width: 202px;
-        height: 44px;
-        background: #1B2632;
-        font-size: 16px;
-        font-weight: 500;
-        color: #FFFFFF;
-        line-height: 44px;
-        text-align: center;
-        cursor: pointer;
+    align-items: center;
+}
+.ask_manage, .ask_buy {
+    width: 202px;
+    height: 44px;
+    background: #1B2632;
+    font-size: 16px;
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 44px;
+    text-align: center;
+    cursor: pointer;
+}
+.ask_buy {
+    background: #3F8DFD;
+}
+
+.apply_ask {
+    display: block;
+    width: 173px;
+    // height: 196px;
+    background: #FFFFFF;
+    border-radius: 2px;
+    padding: 20px;
+    .ask_titles {
+        font-size: 14px;
+        font-weight: bold;
+        color: #222222;
     }
-    .ask_buy {
-        background: #3F8DFD;
+    .ask_time {
+        font-size: 12px;
+        color: #999999;
+        margin: 3px 0px 21px 0px;
     }
-    .apply_ask {
-        width: 173px;
-        height: 196px;
-        background: #FFFFFF;
-        border: 1px solid #CCCCCC;
-        border-radius: 2px;
-        padding: 20px;
-        position: absolute;
-        top: -213px;
-        left: 17px;
-        .ask_titles {
+    .phones {
+        margin-bottom: 21px;
+        display: flex;
+        align-items: center;
+        .icon_phone {
+            width: 16px;
+            height: 16px;
+            margin-right: 12px;
+        }
+        >span {
             font-size: 14px;
-            font-weight: bold;
             color: #222222;
         }
-        .ask_time {
-            font-size: 12px;
-            color: #999999;
-            margin: 3px 0px 21px 0px;
-        }
-        .phones {
-            margin-bottom: 21px;
-            display: flex;
-            align-items: center;
-            .icon_phone {
-                width: 16px;
-                height: 16px;
-                margin-right: 12px;
-            }
-            >span {
-                font-size: 14px;
-                color: #222222;
-            }
-        }
-        &::after {
-            content: '';
-            width: 0;
-            height: 0;
-            border-top: 14px solid #fff;
-            border-right: 12px solid transparent;
-            border-left: 12px solid transparent;
-            position: absolute;
-            bottom: -10px;
-            left: 72px;
+    }
+}
+// 老师名称样式
+.teacher_names {
+    display: flex;
+    margin-left: 20px;
+    margin-top: 10px;
+    .names {
+        font-size: 13px;
+        color: #383838;
+        margin-right: 8px;
+        cursor: pointer;
+        background: #818181;
+        border-radius: 4px;
+        padding: 3px 6px;
+        &.nactive {
+            background: #CCCCCC;
         }
     }
 }

+ 21 - 254
src/pages/goodsTopic/index.vue

@@ -42,7 +42,11 @@
             </div>
             <div class="mains">
                 <div class="content_up">
-                    <div class="banner_one"></div>
+                    <div class="banner_one">
+                        <div class="one_bg">
+                            <img class="bgimg" src="@/assets/topic/one_bg.png" alt="" />
+                        </div>
+                    </div>
                     <div class="banner_two">
                         <catalogue :goodsId='goodsId' :topicId="topicId"></catalogue>
                     </div> 
@@ -274,10 +278,7 @@ export default {
             }).then(async(res) => {
                 if (res.code == 200) {
                     this.goodsInfo = res.data
-                    // this.goodsId = res.data.goodsId
-                    this.goodsId = 823
-                    console.log('goodsInfo: ', this.goodsInfo)
-                    
+                    this.goodsId = res.data.goodsId
                 }
             })
         },
@@ -306,7 +307,7 @@ export default {
     .course_btns {
         padding: 10px 10px 10px 115px;
         .meun_btns {
-            width: 100%;
+            width: 100px;
             .btns {
                 width: 96px;
                 height: 32px;
@@ -389,260 +390,26 @@ export default {
                 width: 100%;
                 height: 280px;
                 background: url('../../assets/topic/banner_one.png') center center no-repeat;
-                background-size: 100% 100%;
-                display: flex;
-                align-items: center;
-                justify-content: center;
+                // background-size: 100% 100%;
+                // display: flex;
+                // align-items: center;
+                // justify-content: center;
+                .one_bg {
+                    width: 1056px;
+                    height: 280px;
+                    margin: 0 auto;
+                    >img {
+                        width: 100%;
+                        height: 100%;
+                    }
+                }
             }
             .banner_two {
                 width: 100%;
                 height: 528px;
                 background: url('../../assets/topic/banner_two.png') center center no-repeat;
                 background-size: 100% 100%;
-                // .con_header {
-                //     width: 1113px;
-                //     height: 44px;
-                //     background: #3F4449;
-                //     display: flex;
-                //     .con_item {
-                //         padding: 12px 20px;
-                //         font-size: 16px;
-                //         font-weight: 500;
-                //         color: #FFFFFF;
-                //         &.nactive {
-                //             background: #3F8DFD;
-                //         }
-                //     }
-                // }
-                // .course_info {
-                //     display: flex;
-                //     align-items: center;
-                //     justify-items: center;
-                // }
-                // .left_box {
-                //     width: 700px;
-                //     height: 528px;
-                //     .video {
-                //         width: 100%;
-                //         height: 100%;
-                //     }
-                // }
-                // .right-box {
-                //     width: 420px;
-                //     height: 528px;
-                //     background: #3f4449;
-                //     border-radius: 0px;
-                //     &__header {
-                //         .tabs {
-                //             /deep/.el-tabs__nav-wrap::after {
-                //                 background-color: #999;
-                //             }
-
-                //             /deep/ .el-tabs__header {
-                //                 margin: 0;
-                //             }
-
-                //             .label {
-                //                 color: #fff;
-                //                 height: 40px;
-                //                 line-height: 40px;
-                //                 padding: 0 20px;
-                //             }
-
-                //             .item {
-                //                 &__title {
-                //                     padding-left: 12px;
-                //                     height: 40px;
-                //                     line-height: 40px;
-                //                     cursor: pointer;
-                //                     font-size: 14px;
-                //                     font-family: Microsoft YaHei;
-                //                     font-weight: bold;
-                //                     color: #fff;
-
-                //                     .el-icon-caret-right,
-                //                     .el-icon-caret-bottom {
-                //                     color: #999;
-                //                     }
-                //                 }
-
-                //                 &__content {
-                //                     .bank-chapter {
-                //                         &__item {
-                //                             color: #fff;
-                //                             font-size: 14px;
-
-                //                             &__text {
-                //                             padding: 8px 8px 8px 24px;
-                //                             cursor: pointer;
-                //                             flex: 1;
-
-                //                             .el-icon-caret-right,
-                //                             .el-icon-caret-bottom {
-                //                                 color: #999;
-                //                             }
-                //                             }
-                //                         }
-                //                     }
-
-                //                     .bank-section {
-                //                         &__item {
-                //                             user-select: none;
-                //                             color: #fff;
-                //                             font-size: 14px;
-                //                             display: flex;
-                //                             align-items: center;
-
-                //                             &.active {
-                //                             background: #132b4d;
-                //                             font-size: 14px;
-                //                             font-family: Microsoft YaHei;
-                //                             font-weight: bold;
-                //                             color: #3f8dfd;
-                //                             }
-
-                //                             &__text {
-                //                             flex: 1;
-                //                             padding: 8px 8px 8px 12px;
-                //                             height: 40px;
-                //                             display: flex;
-                //                             flex-direction: column;
-                //                             justify-content: center;
-                //                             cursor: pointer;
-
-                //                             .el-icon-caret-right,
-                //                             .el-icon-caret-bottom {
-                //                                 color: #999;
-                //                             }
-                //                             }
-
-                //                             .test-btn {
-                //                             margin-left: 10px;
-                //                             width: 32px;
-                //                             height: 20px;
-                //                             background: #007aff;
-                //                             border-radius: 4px;
-                //                             line-height: 18px;
-                //                             color: #fff;
-                //                             text-align: center;
-                //                             }
-
-                //                             .note {
-                //                             margin-left: 10px;
-                //                             width: 32px;
-                //                             height: 20px;
-                //                             border: 1px solid #ff3b30;
-                //                             border-radius: 4px;
-                //                             line-height: 18px;
-                //                             color: #ff3b30;
-                //                             text-align: center;
-
-                //                             &--yellow {
-                //                                 border-color: #ff9500;
-                //                                 color: #ff9500;
-                //                             }
-
-                //                             &--blue {
-                //                                 border-color: #3f8dfd;
-                //                                 color: #3f8dfd;
-                //                             }
-                //                             }
-
-                //                             .during {
-                //                             color: #999;
-                //                             margin-right: 10px;
-                //                             }
-
-                //                             .btn {
-                //                             margin-right: 12px;
-                //                             width: 48px;
-                //                             height: 20px;
-                //                             border: 1px solid #ff3b30;
-                //                             background: #ff3b30;
-                //                             border-radius: 4px;
-                //                             line-height: 18px;
-                //                             color: #fff;
-                //                             text-align: center;
-
-                //                             &--green {
-                //                                 border: 1px solid #34c759;
-                //                                 background: #34c759;
-                //                             }
-                //                             }
-
-                //                             .live-btn {
-                //                             margin-left: 20px;
-                //                             width: 60px;
-                //                             height: 20px;
-                //                             border-radius: 4px;
-                //                             background: #eeeeee;
-                //                             line-height: 18px;
-                //                             color: #666666;
-                //                             text-align: center;
-
-                //                             &--yellow {
-                //                                 background: #fff7eb;
-                //                                 color: #ff9500;
-                //                             }
-
-                //                             &--blue {
-                //                                 border-color: #ebf4ff;
-                //                                 color: #007aff;
-                //                             }
-                //                             }
-                //                         }
-                //                     }
-                //                 }
-                //             }
-                //         }
-
-                //         .title {
-                //             height: 40px;
-                //             border-bottom: 1px solid #999;
-                //             color: #fff;
-
-                //             .select {
-                //             width: 100%;
-                //             }
-
-                //             /deep/ .el-input__icon {
-                //             width: 20px;
-                //             height: 20px;
-                //             border: 1px solid #fff;
-                //             border-radius: 4px;
-                //             margin-top: 10px;
-                //             line-height: 20px;
-                //             }
-
-                //             /deep/ .el-input__inner {
-                //             color: #fff;
-                //             font-size: 16px;
-                //             background: none;
-                //             border: 0;
-                //             }
-                //         }
-                //     }
-                //     &__body {
-                //         height: 374px;
-                //         overflow-y: scroll;
-                //         &::-webkit-scrollbar {
-                //             // width: 6px;
-                //             display: none;
-                //         }
-                //         &::-webkit-scrollbar-track {
-                //             background-color: #060e1a;
-                //             -webkit-border-radius: 2em;
-                //             -moz-border-radius: 2em;
-                //             border-radius: 2em;
-                //         }
-                //         &::-webkit-scrollbar-thumb {
-                //             background-color: #eeeeee;
-                //             -webkit-border-radius: 2em;
-                //             -moz-border-radius: 2em;
-                //             border-radius: 2em;
-                //         }
-                //     }
-                // }
+                
             }
             
         }

+ 5 - 2
src/pages/mock-report/index.vue

@@ -10,6 +10,7 @@
       >
         <div class="container section__top">
           <div class="text">
+            {{ subscribeInfo.liveStartTime}}
             模考讲解直播将在{{
               $tools.timestampToTime(subscribeInfo.liveStartTime, false, true)
             }}开始,开启模考讲解直播提醒,不错过每一个考点
@@ -23,7 +24,7 @@
       <template v-else>
         <div
           class="container section__top"
-          v-if="subscribeInfo.liveSubscribe == 0"
+          v-if="subscribeInfo.liveSubscribe == 0 && subscribeInfo.liveStartTime"
         >
           <div class="text">
             模考讲解直播将在{{
@@ -42,7 +43,7 @@
 
         <div
           class="container section__top"
-          v-if="subscribeInfo.liveSubscribe == 1"
+          v-if="subscribeInfo.liveSubscribe == 1 && subscribeInfo.liveStartTime"
         >
           <div class="text">
             模考讲解直播将在{{
@@ -309,6 +310,7 @@ export default {
     ...mapGetters(["examResult", "sysTime"]),
   },
   async mounted() {
+    console.log('sysTime', this.sysTime)
     this.eachExamId = this.$route.query.eachExamId;
     this.examId = this.$route.query.examId;
     this.recordId = this.$route.query.recordId;
@@ -330,6 +332,7 @@ export default {
                 examId: this.examId,
                 pageNum: this.pageNum,
                 pageSize: this.pageSize,
+                platform: 2,
             }
         }).then((res) => {
             if (res.code == 200) {

+ 14 - 12
src/pages/person-center/my-course/index.vue

@@ -57,12 +57,9 @@
           <div class="doubles">
             <span class="iconStyle">课</span>
             <span class="titles">{{ item.courseName }}</span>
-            <!-- <span v-if="courseItem.teaList && courseItem.teaList.length > 0" v-for="(tea, index) in courseItem.teaList" :key="index">
-              <el-button type="info" @click="switchTeacher(tea)" round>{{tea.aliasName}}</el-button>
-            </span> -->
             <div v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
-              <div v-for="(tea, lindex) in courseItem.teaList" :key="lindex + 'three'" class="names"
-                :class="{nactive: teaIndex == lindex}" @click="switchTeacher(tea, lindex)">
+              <div v-for="(tea, lindex) in courseItem.teaList" :key="lindex + 'three'" class="names" :class="{nactive: States[teacherIndex] == lindex}"
+                 @click="switchTeacher(tea, lindex, teacherIndex)">
                 {{ tea.aliasName }}
               </div>
             </div>
@@ -639,6 +636,7 @@
           </template>
         </div>
         </div>
+
       </div>
       </div>
     </div>
@@ -722,6 +720,7 @@ export default {
       newActiveSubjectId: "", //当前选中ID
       businessData: {},
       teaIndex: 0,
+      States: {0: 0},
       sectionExamList:[],//节试卷集合
       sectionExam:[]//节试卷集合
     };
@@ -744,6 +743,7 @@ export default {
     // },
   },
   mounted() {
+    console.log('States-----', this.States)
     this.getRecord();
     this.sysTime = this.$tools.timest();
   },
@@ -812,7 +812,7 @@ export default {
             this.$request.courseTeacherList({
                goodsId: item.goodsId
             }).then((res1) => {
-              console.log(res1,'res1');
+              // console.log(res1,'res1');
               if(res1.data && res1.data.length > 0){
                   //课程老师模板
                   let teacherTel = res1.data;
@@ -869,9 +869,10 @@ export default {
                   data.courseList.push(item)
                   this.goodsTeacher.push(data)
                 })
-                console.log(this.goodsTeacher,'this.goodsTeacher');
               }
-            })   
+              console.log(this.goodsTeacher,'this.goodsTeacher')
+            })
+
             this.courseList = res.rows;
             array = this.uniqueFunc(array, "id");
             array.unshift({
@@ -889,8 +890,9 @@ export default {
       });
     },
     //切换老师
-    switchTeacher(data, index){
-        console.log(data,'data');
+    switchTeacher(data, index, teacherIndex){
+        // console.log(data,'data',  index, teacherIndex);
+        this.States[teacherIndex] = index
         this.teaIndex = index
         this.goodsTeacher.forEach((item,index) => {
             if(item.teaList && item.teaList.length > 0){
@@ -898,8 +900,8 @@ export default {
                if(list && list.length > 0){
                   item.courseList.forEach((course,courseIndex) => {
                       if(course.courseId == data.courseId){
-                        console.log(index,'index');
-                         console.log(courseIndex,'courseIndex');
+                        // console.log(index,'index');
+                        //  console.log(courseIndex,'courseIndex');
                         this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
                       }else{
                         this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)