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

View File

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