Преглед изворни кода

去除答疑列表接口定时器

xuqiaoying пре 2 година
родитељ
комит
fdde3cce08
3 измењених фајлова са 24 додато и 7 уклоњено
  1. 4 4
      common/request.js
  2. 6 0
      pages/learn/index.vue
  3. 14 3
      pages3/polyv/detail.vue

+ 4 - 4
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'    //后端本地
@@ -18,8 +18,8 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release
-export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
-// export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境
+// export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
+export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境
 // export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布(弃用了)
 
 // export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test

+ 6 - 0
pages/learn/index.vue

@@ -518,6 +518,12 @@ export default {
 	async onShow() {
 		this.getCourseLiveQues()
 		await this.commonSystemTime()
+	},
+	onUnload() {
+		console.log('index:--onUnload')
+	},
+	onHide() {
+		console.log('index:--onHide')
 	},
 	 onPullDownRefresh() {
 		this.getCourseLiveQues()

+ 14 - 3
pages3/polyv/detail.vue

@@ -772,6 +772,7 @@ export default {
     }
   },
   onLoad(option) {
+    console.log('index:--onLoad')
     this.courseId = Number(option.id) || '';
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
@@ -787,16 +788,25 @@ export default {
     
     this.$store.getters.dictObj;
   },
+  onReady() {
+    console.log('index:--onReady')
+  },
   onShow() {
+    console.log('index:--onShow')
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
   },
   onUnload() {
+    console.log('index:--onUnload')
     this.originUnload()
   },
+  onHide() {
+    console.log('index:--onHide')
+  },
   mounted() {
+    console.log('index:--mounted')
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
@@ -989,9 +999,9 @@ export default {
         this.getGoodsDetail();
         this.getAnswerList();
         this.studyRecordMenuAllList();
-        this.answerTimer = setInterval(() => {
-          this.getAnswerList();
-        }, 5000);
+        // this.answerTimer = setInterval(() => {
+        //   this.getAnswerList();
+        // }, 5000);
         let noteSecond = Number(this.option.noteSecond);
         console.log('noteSecondnoteSecond:', noteSecond, this.option)
         if (noteSecond > 0) {
@@ -1779,6 +1789,7 @@ export default {
       return {};
     },
 		loadedmetadata(e) {
+      console.log('999999999999999999999');
 			var polyvPlayerContext = this.selectComponent("#playerVideo");
 			this.hasStart = true;
 			uni.$off('playPause')