This commit is contained in:
闫世杰 2023-09-05 10:24:32 +08:00
parent 1594b4321c
commit 29253c593f
2 changed files with 25 additions and 5 deletions

View File

@ -3,12 +3,18 @@
<view class="forms">
<view class="teamBox" v-for="item in list" :key="item.id">
<view class="teamBox-top" v-if="item.type == 'locality'">
<video id="myVideo" :src="item.file" @error="videoErrorCallback" style="width: 750rpx;height: 500rpx;"
<video :src="item.file" @error="videoErrorCallback" style="width: 750rpx;height: 500rpx;"
controls></video>
<!-- <player-component vid="p0743x9grjv"></player-component> -->
</view>
<view class="teamBox-top" v-else-if="item.type == 'tencent'">
<player-component :autoplay="false" :enablePlayGesture="true" :vid="item.linkPath"></player-component>
<!-- #ifdef MP-WEIXIN -->
<player-component :autoplay="false" :enablePlayGesture="true" :vid="item.linkPath"
:bindplay="onBindplay">
</player-component>
<!-- #endif -->
</view>
<view class="teamBox-bottom">
<view class="interactive">
@ -63,6 +69,9 @@ export default {
console.log(store);
},
methods: {
onBindplay() {
console.log('执行');
},
toTab(val) {
this.tabC = val;
// this.getData()
@ -125,7 +134,18 @@ export default {
.request("/exhibition/list", this.query, "GET")
.then((res) => {
if (res.code == 200) {
this.list = res.data.records;
let list = []
list = res.data.records;
/* #ifdef MP-WEIXIN*/
list.forEach(item => {
if (item.linkPath) {
let path = item.linkPath.split('/')
let video = path[path.length - 1].split('.html')
item.linkPath = video[0]
}
});
/* #endif */
this.list = list;
this.query.page = res.data.current;
this.query.size = res.data.size;
}

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',