This commit is contained in:
YeMingfei666 2024-12-31 09:56:43 +08:00
commit 05ad8ffaae
3 changed files with 23 additions and 10 deletions

View File

@ -1,7 +1,7 @@
// APP
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg/"; //
// const ROOTPATH = "https://dj-api.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg/"; //
const ROOTPATH = "https://dj-api.hnsiyao.cn/czg/"; //后台服务域名
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://video.hnsiyao.cn/czg/"; //
// const ROOTPATH = "https://video.hnsiyao.cn/czg/"; //后台服务域名
@ -12,9 +12,9 @@
// const ROOTPATH = "https://web.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg/"; //
const ROOTPATH = "https://web-api.hnsiyao.cn/czg/"; //后台服务域名
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg/"; //
// const ROOTPATH = "https://web-api.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.41:8100/czg/"; //
// const ROOTPATH = "http://192.168.1.41:8100/czg/"; //后台服务域名

View File

@ -2,8 +2,8 @@
"name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1",
"description" : "",
"versionName" : "1.1.2",
"versionCode" : 112,
"versionName" : "1.1.4",
"versionCode" : 114,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -166,7 +166,9 @@
'width': '750rpx',
},
isShowVideo: '',
playFlag: false
playFlag: false,
// 延时器对象
scrollTimer : null,
};
},
@ -185,7 +187,13 @@
})
this.page = 1
this.randomNum = Math.floor(Math.random() * 33);
this.getDataList()
console.log("getDataList1")
if(this.scrollTimer != null){
clearTimeout(this.scrollTimer);
}
this.scrollTimer = setTimeout(()=>{
this.getDataList()
}, 1000)
},
onHide() {
try {
@ -208,6 +216,7 @@
this.$forceUpdate()
},
methods: {
//播放时的回掉
videoPlay(videoId,courseDetailsId) {
this.courseDetailsId = courseDetailsId
@ -395,6 +404,7 @@
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '',
randomNum: this.randomNum
};
console.log("getDataList")
httpsRequest.getT('/app/course/selectCourseDetailsList', data).then(res => {
if (res.code == 0) {
this.pages = res.data.totalPage
@ -413,8 +423,11 @@
if (this.page == 1) {
let numIdCurr = this.videoList[0].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr;
console.log(this.videoList)
console.log(this.videoContextId)
this.$nextTick(() => {
this.videoContext = uni.createVideoContext(this.videoContextId, this);
console.log("videoContext",this.videoContext)
this.videoContext.play();
})
if (uni.getStorageSync('token')) { //如果有token则插入