This commit is contained in:
闫世杰 2023-09-04 14:00:35 +08:00
parent 5794abf2c5
commit 1594b4321c
2 changed files with 235 additions and 229 deletions

View File

@ -18,9 +18,11 @@
}
}
],
"subPackages": [{
"subPackages": [
{
"root": "pagesA/",
"pages": [{
"pages": [
{
"path": "msg/msg",
"style": {
"enablePullDownRefresh": true,
@ -195,7 +197,8 @@
},
{
"root": "pagesB/",
"pages": [{
"pages": [
{
"path": "ArtRace/ArtRace",
"style": {
"navigationBarTitleText": "文艺比赛",
@ -673,19 +676,17 @@
"usingComponents": {
"player-component": "plugin://player/video"
}
}
}
// 线-
// {
// "path": "xskz/details",
// "style": {
// "navigationBarTitleText": "线上看展-详情",
// "enablePullDownRefresh": false
// // "usingComponents": {
// // "player-component": "plugin://player/video"
// // }
// }
// "path": "xskz/details",
// "style": {
// "navigationBarTitleText": "线上看展-详情",
// "enablePullDownRefresh": false,
// "usingComponents": {
// "player-component": "plugin://player/video"
// }
// }
// }
]
}

View File

@ -3,12 +3,12 @@
<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;" controls></video>
<video id="myVideo" :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 :vid="item.linkPath"></player-component>
<player-component :autoplay="false" :enablePlayGesture="true" :vid="item.linkPath"></player-component>
</view>
<view class="teamBox-bottom">
<view class="interactive">
@ -19,19 +19,21 @@
<image src="../../static/workDetail/heart2.png" class="bot_img" v-if="item.isGreat"
@click="clickHeart()">
</image>
<image src="../../static/workDetail/heart1.png" class="bot_img" v-else @click="clickHeart(item.isGreat,item.id)">
<image src="../../static/workDetail/heart1.png" class="bot_img" v-else
@click="clickHeart(item.isGreat, item.id)">
</image>
<view class="title" @click="clickHeart(item.isGreat,item.id)">
{{item.likes}}
<view class="title" @click="clickHeart(item.isGreat, item.id)">
{{ item.likes }}
</view>
</view>
<view class="interactive">
<image src="../../static/workDetail/star2.png" class="bot_img" v-if="item.isColl"
@click="clickStar()"></image>
<image src="../../static/workDetail/star1.png" class="bot_img" v-else @click="clickStar(item.isColl,item.id)">
<image src="../../static/workDetail/star1.png" class="bot_img" v-else
@click="clickStar(item.isColl, item.id)">
</image>
<view class="title" @click="clickStar(item.isColl,item.id)">
{{item.collections}}
<view class="title" @click="clickStar(item.isColl, item.id)">
{{ item.collections }}
</view>
</view>
</view>
@ -41,242 +43,245 @@
</template>
<script>
export default {
data() {
return {
// tabC: "0",
list: [],
query: {
page: 1,
size: 20,
},
};
export default {
data() {
return {
// tabC: "0",
list: [],
query: {
page: 1,
size: 20,
},
};
},
onShow() {
// this.getData();
this.get();
},
mounted() {
const store = requirePlugin('player')
console.log(store);
},
methods: {
toTab(val) {
this.tabC = val;
// this.getData()
},
onShow() {
// this.getData();
this.get();
},
mounted() {},
methods: {
toTab(val) {
this.tabC = val;
// this.getData()
},
//
clickHeart(val0,val1) {
console.log(val1)
if (val0) {
this.http.request('/worksGreat/delGreat?type=3&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else {
this.http.request('/worksGreat/addGreat?type=3&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
//
clickStar(val0,val1) {
if (val0) {
this.http.request('/worksCollection/delCollection?workId=' + val1 + '&type=3', "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else {
this.http.request('/worksCollection/addCollection?workId=' + val1 + '&type=3', "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
get() {
this.http
.request("/exhibition/list", this.query, "GET")
.then((res) => {
if (res.code == 200) {
this.list = res.data.records;
this.query.page = res.data.current;
this.query.size = res.data.size;
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
//
clickHeart(val0, val1) {
console.log(val1)
if (val0) {
this.http.request('/worksGreat/delGreat?type=3&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
},
skip(query = {}) {
uni.navigateTo({
//
url: "/pagesD/xskz/details",
});
},
videoErrorCallback: function(e) {
console.log(e.target.errMsg)
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
},
playMask(obj) {
// this.videoList[index].play = false;
// var video = document.getElementById("video");
// //
// video.addEventListener("pause", function (e) {
// console.log("");
// console.log(e);
// });
// // 15ended
// video.addEventListener("ended", function (e) {
// console.log("");
// console.log(e);
// });
},
} else {
this.http.request('/worksGreat/addGreat?type=3&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
};
//
clickStar(val0, val1) {
if (val0) {
this.http.request('/worksCollection/delCollection?workId=' + val1 + '&type=3', "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else {
this.http.request('/worksCollection/addCollection?workId=' + val1 + '&type=3', "POST").then(res => {
if (res.code == 200) {
this.get()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
get() {
this.http
.request("/exhibition/list", this.query, "GET")
.then((res) => {
if (res.code == 200) {
this.list = res.data.records;
this.query.page = res.data.current;
this.query.size = res.data.size;
}
})
.catch((err) => {
uni.showToast({
title: e.data.message,
icon: "none",
});
});
},
skip(query = {}) {
uni.navigateTo({
//
url: "/pagesD/xskz/details",
});
},
videoErrorCallback: function (e) {
console.log(e.target.errMsg)
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
},
playMask(obj) {
// this.videoList[index].play = false;
// var video = document.getElementById("video");
// //
// video.addEventListener("pause", function (e) {
// console.log("");
// console.log(e);
// });
// // 15ended
// video.addEventListener("ended", function (e) {
// console.log("");
// console.log(e);
// });
},
},
};
</script>
<style lang="scss">
.wyxx {
background-color: #fefefe;
}
.wyxx {
background-color: #fefefe;
}
.tabTitle {
display: flex;
width: 100%;
background: #ffffff;
.tabTitle {
display: flex;
width: 100%;
background: #ffffff;
.tabs {
width: 33.3%;
text-align: center;
padding: 32rpx 0 0rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
.tabs {
width: 33.3%;
text-align: center;
padding: 32rpx 0 0rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
.line {
width: 36rpx;
height: 4rpx;
margin: 10rpx auto 8rpx;
}
}
.tabsC {
width: 33.3%;
text-align: center;
padding: 32rpx 0 0;
font-size: 28rpx;
font-weight: 600;
color: #000;
.line {
width: 44rpx;
height: 4rpx;
margin: 10rpx auto 8rpx;
background-color: #a02521;
}
.line {
width: 36rpx;
height: 4rpx;
margin: 10rpx auto 8rpx;
}
}
.forms {
margin: 0 auto 0rpx;
padding-top: 40rpx;
.tabsC {
width: 33.3%;
text-align: center;
padding: 32rpx 0 0;
font-size: 28rpx;
font-weight: 600;
color: #000;
.teamBox {
.teamBox-top {
.line {
width: 44rpx;
height: 4rpx;
margin: 10rpx auto 8rpx;
background-color: #a02521;
}
}
}
.forms {
margin: 0 auto 0rpx;
padding-top: 40rpx;
.teamBox {
.teamBox-top {
position: relative;
.content {
position: relative;
z-index: 4;
.content {
position: relative;
z-index: 4;
.content-title {
position: absolute;
z-index: 10;
padding: 18rpx;
.content-title {
position: absolute;
z-index: 10;
padding: 18rpx;
text {
color: #fff;
max-width: 500rpx;
overflow: hidden;
/* 超出一行文字自动隐藏 */
text-overflow: ellipsis;
/*文字隐藏后添加省略号*/
white-space: nowrap;
}
}
.team-image {
width: 100%;
height: 400rpx;
text {
color: #fff;
max-width: 500rpx;
overflow: hidden;
/* 超出一行文字自动隐藏 */
text-overflow: ellipsis;
/*文字隐藏后添加省略号*/
white-space: nowrap;
}
}
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 12;
display: flex;
align-items: center;
justify-content: center;
.mask-play {
image {
width: 60rpx;
height: 60rpx;
}
}
.team-image {
width: 100%;
height: 400rpx;
}
}
.teamBox-bottom {
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 12;
display: flex;
justify-content: space-between;
padding: 15rpx 32rpx;
background-color: #fff;
box-sizing: border-box;
.interactive {
display: flex;
align-items: center;
align-items: center;
justify-content: center;
.mask-play {
image {
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
width: 60rpx;
height: 60rpx;
}
}
}
}
.teamBox-bottom {
display: flex;
justify-content: space-between;
padding: 15rpx 32rpx;
background-color: #fff;
box-sizing: border-box;
.interactive {
display: flex;
align-items: center;
image {
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
}
}
}
}
</style>