xuqiaoying 3 vuotta sitten
vanhempi
commit
c101a54b2b
2 muutettua tiedostoa jossa 12 lisäystä ja 8 poistoa
  1. 4 4
      src/axios.js
  2. 8 4
      src/pages/course-detail/index.vue

+ 4 - 4
src/axios.js

@@ -1,9 +1,9 @@
 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 = 'https://test.xyyxt.net'   //预发布
 // export const BASE_URL = 'http://192.168.1.7:5055'    //dev
 // export const BASE_URL = 'http://120.79.166.78:19012'    //测试-外网
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test
@@ -12,8 +12,8 @@ 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'

+ 8 - 4
src/pages/course-detail/index.vue

@@ -20,6 +20,7 @@
                 <div class="title">
                   <span>{{ changeName(courseId) }}</span>
                   <el-button
+                    v-if="courseTotal > 1"
                     size="mini"
                     type="primary"
                     plain
@@ -2972,6 +2973,7 @@ export default {
       disName: false, // 姓名是否禁止输入
       disCard: false, // 身份证是否禁止输入
       clickSectionItem: {}, // 点击节的内容
+      courseTotal: 0, 
     };
   },
   computed: {
@@ -4825,9 +4827,9 @@ export default {
         this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
         this.courseDetail(); //课程详情
         this.getAnswerList(); //答疑列表
-        this.answerTimer = setInterval(() => {
-          this.getAnswerList();
-        }, 5000);
+        // this.answerTimer = setInterval(() => {
+        //   this.getAnswerList();
+        // }, 5000);
         this.getMenuList(); //学习目录
         this.getReMenuList(); //获取重修目录
         this.getNoteList(); //获取节笔记
@@ -6963,8 +6965,10 @@ export default {
         this.param.goodsId = this.goodsId;
         this.param.gradeId = this.gradeId;
         this.$request.courseCourseList(this.param).then(async (res) => {
-          console.log(res.rows, "resresresres");
+          console.log(res, "resresresres");
           this.courseList.push(...res.rows);
+          this.courseTotal = res.total
+          // console.log('courseTotal::', this.courseTotal)
           if (!this.courseId) {
             this.courseId = this.courseList[0].courseId;
           }