This commit is contained in:
lnn19986213 2023-09-09 17:20:04 +08:00
parent 1e34b8a9bc
commit db413baf43
4 changed files with 238 additions and 223 deletions

View File

@ -669,7 +669,8 @@
"path": "xskz/index",
"style": {
"navigationBarTitleText": "线上看展",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"onReachBottomDistance": 20,
"usingComponents": {
// #ifdef MP-WEIXIN
"player-component": "plugin://player/video"

View File

@ -1,7 +1,8 @@
<template>
<view>
<!-- <view class="teamBox-top" > -->
<video v-if="type == 'locality'" id="myVideo" :custom-cache="false" @error="videoErrorCallback" show-loading
<video v-if="type == 'locality'" id="myVideo" show-loading
muted autoplay preload loop
:src="file" style="width: 750rpx;height: 500rpx;" controls>
</video>
<!-- </view> -->
@ -65,9 +66,9 @@
.then((res) => {
if (res.code == 200) {
this.type = res.data.type
this.cover = res.data.cover
if (this.type == 'locality') {
this.file = res.data.file
console.log(111)
// this.getvideo(res.data.id)
} else if (this.type == 'tencent' && this.isWx) {
let path = res.data.linkPath.split('/')

View File

@ -43,16 +43,27 @@ export default {
return {
// tabC: "0",
list: [],
query: {
page: 1,
size: 999,
},
pages: 1,
size: 10,
};
},
onShow() {
// this.getData();
this.get();
},
onPullDownRefresh() {
this.pages = 1
this.list = []
this.get()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.get();
},
mounted() {
const store = requirePlugin('player')
console.log(store);
@ -116,24 +127,26 @@ export default {
}
},
get() {
let _this = this
this.http
.request("/exhibition/list", this.query, "GET")
.request("/exhibition/list", {
page: this.pages,
size: this.size,
}, "GET")
.then((res) => {
if (res.code == 200) {
let list = []
list = res.data.records;
/* #ifdef MP-WEIXIN*/
list.forEach(item => {
if (res.data.records.length > 0) {
res.data.records.forEach(item => {
if (item.linkPath) {
let path = item.linkPath.split('/')
let video = path[path.length - 1].split('.html')
item.linkPath = video[0]
}
_this.list.push(item)
});
/* #endif */
this.list = list;
this.query.page = res.data.current;
this.query.size = res.data.size;
} else {
this.pages--
}
}
})
.catch((e) => {
@ -212,7 +225,7 @@ export default {
}
.forms {
margin: 0 auto 0rpx;
margin: 0 auto 40rpx;
padding-top: 40rpx;
.teamBox {

View File

@ -5,9 +5,9 @@
export default {
config: {
baseUrl: "http://192.168.1.20:8080/h5/api", //俞燕红-小程序不能配跨域
// baseUrl: "http://192.168.1.20:8080/h5/api", //俞燕红-小程序不能配跨域
// baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "https://yxx.ydool.net/h5/api", //线上
baseUrl: "https://yxx.ydool.net/h5/api", //线上
// baseUrl: "/h5/api", //h5
header: {
'Content-Type': 'application/json;charset=UTF-8',