he2802 3 سال پیش
والد
کامیت
078922765c
2فایلهای تغییر یافته به همراه8 افزوده شده و 5 حذف شده
  1. 1 1
      common/request.js
  2. 7 4
      pages2/class/detail.vue

+ 1 - 1
common/request.js

@@ -4,7 +4,7 @@ import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
 
-export const BASE_URL = 'http://192.168.1.222:5055' //接口api  http://42.192.164.187:19005
+export const BASE_URL = 'http://42.192.164.187:19005' //接口api  http://42.192.164.187:19005
 
 
 export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/' //图片上传api  'https://file.xyyxt.net/

+ 7 - 4
pages2/class/detail.vue

@@ -298,10 +298,10 @@ export default {
 			let self = this
 			return new Promise(resolve=>{
 				let data = {
-						gradeId:self.gradeId,
-						goodsId:self.goodsId,
-						sectionId:self.playSectionId,
-						courseId: self.courseId,
+						gradeId:Number(self.gradeId),
+						goodsId:Number(self.goodsId),
+						sectionId:Number(self.playSectionId),
+						courseId: Number(self.courseId),
 					}
 					self.$api.recordLast(data).then(res => {
 						resolve(res.data.data)
@@ -419,6 +419,9 @@ export default {
 				chapterId:parseInt(self.chapterId),
 				moduleId:parseInt(self.moduleId)
 			}
+			if(data.studyDuration<=5){ //5秒内不上传记录
+				return
+			}
 			if(status>0){
 				data.status = status
 			}