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", "path": "xskz/index",
"style": { "style": {
"navigationBarTitleText": "线上看展", "navigationBarTitleText": "线上看展",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"onReachBottomDistance": 20,
"usingComponents": { "usingComponents": {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
"player-component": "plugin://player/video" "player-component": "plugin://player/video"

View File

@ -1,7 +1,8 @@
<template> <template>
<view> <view>
<!-- <view class="teamBox-top" > --> <!-- <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> :src="file" style="width: 750rpx;height: 500rpx;" controls>
</video> </video>
<!-- </view> --> <!-- </view> -->
@ -65,9 +66,9 @@
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.type = res.data.type this.type = res.data.type
this.cover = res.data.cover
if (this.type == 'locality') { if (this.type == 'locality') {
this.file = res.data.file this.file = res.data.file
console.log(111)
// this.getvideo(res.data.id) // this.getvideo(res.data.id)
} else if (this.type == 'tencent' && this.isWx) { } else if (this.type == 'tencent' && this.isWx) {
let path = res.data.linkPath.split('/') let path = res.data.linkPath.split('/')

View File

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

View File

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