chenxiong 3 år sedan
förälder
incheckning
77d700a217
3 ändrade filer med 15 tillägg och 8 borttagningar
  1. 2 2
      common/request.js
  2. 1 1
      pages2/wd/course.vue
  3. 12 5
      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 = 'http://120.79.166.78:19009'   //预发布
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'http://120.79.166.78:19009'   //预发布
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api

+ 1 - 1
pages2/wd/course.vue

@@ -16,7 +16,7 @@
 				</view>
 				<view class="box_progress">
 					<view style="width: 60%;"><u-line-progress height="22" :show-percent="false" active-color="#ff9900" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
-					<view><u-button type="warning" size="mini">进入学习</u-button></view>
+					<view><u-button type="warning" size="mini"  @click.stop="jump(item,index)">进入学习</u-button></view>
 				</view>
 			</view>
 		</view>

+ 12 - 5
pages3/polyv/detail.vue

@@ -857,11 +857,18 @@ export default {
 						if(photoNum == 1) { //开头拍1张
 							this.photoList.push(1)
 						} else if(photoNum == 3){ //拍2张
-							this.photoList.push(1) //开头拍一张
-							let endMaxTime = totalVideoTime - 60;
-							let endMinTime = totalVideoTime - 300;
-							let endTakeTime = this.randomNum(endMinTime,endMaxTime)
-							this.photoList.push(endTakeTime) //最后拍一张
+							if(totalVideoTime <= 300) { //小于5分钟
+								this.photoList.push(1) //开头拍一张
+								let endTakeTime = this.randomNum(10,totalVideoTime) //中间随机取一张
+								this.photoList.push(endTakeTime) 
+							} else {
+								
+								this.photoList.push(1) //开头拍一张
+								let endMaxTime = totalVideoTime - 60;
+								let endMinTime = totalVideoTime - 300;
+								let endTakeTime = this.randomNum(endMinTime,endMaxTime)
+								this.photoList.push(endTakeTime) //最后1-5分钟拍一张
+							}
 						}
 					}
 					// for(let i=0;i<photoNum;i++){