视频圈点赞优化

This commit is contained in:
曹磊 2024-08-28 17:16:58 +08:00
parent 9b3d6b9729
commit c37845d422
2 changed files with 56 additions and 52 deletions

View File

@ -356,7 +356,7 @@
id:4,
name: '女性专区',
},
],
scrollLeft:0,
tabs: [{
@ -641,19 +641,21 @@
},
getVideo(){
var that=this;
console.log(that.parType);
// 1.
var data={
parType:that.parType,
userId:uni.getStorageSync('userId'),
userId: uni.getStorageSync('userId'),
page: this.page,
limit:4,
}
if(that.parType=='3'){
data.longitude=that.longitude;
data.latitude=that.latitude;
}else{
if(that.parType=='1'){
data.longitude='';
data.latitude='';
}else if(that.parType=='2'){
data.longitude=that.longitude;
data.latitude=that.latitude;
}else if(that.parType=='3'){
data.gzrId = uni.getStorageSync('userId');
}
this.$Request.get("/app/shipinquan/list", data).then(res => {
if (res.code == 0) {
@ -680,7 +682,7 @@
url: '/pages/public/login'
})
}
},
searchBtn(){//
@ -694,7 +696,7 @@
url: '/pages/public/login'
})
}
},
input(res) {//
this.searchValue=res;
@ -713,7 +715,7 @@
url: '/pages/public/login'
})
}
},
yuedao(text){
let userId = uni.getStorageSync('userId')
@ -726,7 +728,7 @@
url: '/pages/public/login'
})
}
},
closePopup(type){//
this.type = type
@ -770,7 +772,7 @@
url: '/pages/public/login'
})
}
} else{
// #ifdef MP-WEIXIN
let that = this
@ -900,7 +902,7 @@
},
chaoji(){//
let userId = uni.getStorageSync('userId')
if (userId) {
uni.navigateTo({
@ -936,7 +938,7 @@
url: '/pages/public/login'
})
}
},
goNav(e){
let userId = uni.getStorageSync('userId')
@ -955,7 +957,7 @@
url: '/pages/public/login'
})
}
},
// chooseItem(item){
@ -1031,7 +1033,7 @@
url: '/pages/public/login'
})
}
},
getCity(e) {
@ -1219,8 +1221,8 @@
url: '/pages/public/login'
})
}
},
chengFel(item){//
this.currentTabFl=item.id;
@ -1237,7 +1239,7 @@
url: '/pages/public/login'
})
}
}else if(this.currentTabFl=='3'){//
let userId = uni.getStorageSync('userId')
if (userId) {
@ -1249,7 +1251,7 @@
url: '/pages/public/login'
})
}
}else{//
let userId = uni.getStorageSync('userId')
if (userId) {
@ -1261,8 +1263,8 @@
url: '/pages/public/login'
})
}
}
},
remen(){//
@ -1291,12 +1293,12 @@
font-size: 14px;
color: #1296db;
}
.kefu image {
width: 50px;
height: 50px;
}
.kefu {
width: 75px;
height: 75px;

View File

@ -6,7 +6,7 @@
<swiper-item v-for="(list,index) in dataList" :key="index">
<view v-if="Math.abs(k-index)<=1">
<view>
<!--
<!--
1.v-if用于控制视频在节点的渲染数
2.muted的默认值是 false代表默认是禁音视频的
3.http-cache默认开启视频缓存
@ -34,7 +34,7 @@
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; background-color: #000000; z-index: 8;'"
:poster="list.filePath"
></video>
<!--
<!--
1.这里是封面方案二这里的封面可以自定义
2.也在代码中做了批注两种方案可以共存不会相互影响
-->
@ -155,23 +155,23 @@
'height': 0,
'width': 0,
},
videoID: "",
isShow: false,
showPlay: false,//
rotates: 0,//
rotateTime: "",//
xrotats: "",
mpcleartime: "",
isClick: false,
changeTimeout: "",
mptime: 0,
mpstartTime: 0,
duration: 500,
// -- -- start
videoStartPositon: 0,
@ -183,14 +183,14 @@
// -- -- end
// -
heightNum: 1.18,
//
touchNum: 0,
aixinLeft: 0,
aixinTop: 0,
isShowAixin: false,
Rotate: 0,
isShow1: false,//1
isShow2: false,//2 uni-popup
currents: 0,//01🌟💗
@ -198,12 +198,12 @@
limit:10
}
},
watch:{
async k(k,old_k){
// console.log(k, old_k)
this.progressBarPercent = 0;
this.isShow = false
this.dataList[old_k].playIng = false//
this.dataList[old_k].isplay = true
@ -291,7 +291,7 @@
audo.pause()
}
},
methods: {
openComment() {//
this.$refs.ccRef.newCommentFun();
@ -310,9 +310,9 @@
uni.setStorageSync("user",this.peopleList[i]);
这个东西用于存储当前用户信息 插件里面会使用到这个东西
记得写一下
4打开评论
*/
*/
uni.showToast({
title: '加载中...',
icon: 'none',
@ -338,7 +338,7 @@
// for (let i = 0; i < msg.length; i++) {
// list.push(msg[i])
// }
this.tableData = msg.map(item => {
return {
...item,
@ -528,7 +528,7 @@
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10));
}
// #endif
},
touchend(e){
// #ifdef H5
@ -543,7 +543,7 @@
this.isTouch = false;
},500)
// #endif
},
timeupdate(event,index){
//
@ -556,7 +556,7 @@
// ---- --- ending
doubleLike(){
if(this.dataList[this.k].sfdz == '0'){
var data={
createBy:uni.getStorageSync('userId'),
shipinquanId:this.dataList[this.k].id,
@ -625,7 +625,7 @@
if(this.k == this.dataList.length - 1){
this.page++
this.GET()
}
},
//
@ -633,6 +633,7 @@
var data={
page: this.page,
limit:this.limit,
userId:uni.getStorageSync('userId')
}
this.$Request.get("/app/shipinquan/list", data).then(res => {
if (res.code == 0) {
@ -654,6 +655,7 @@
var data={
page: this.page,
limit:this.limit,
userId:uni.getStorageSync('userId')
}
this.$Request.get("/app/shipinquan/list", data).then(res => {
if (res.code == 0) {
@ -680,7 +682,7 @@
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).seek(0)
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
audo.src = this.dataList[this.k].src;
},500)
},200)
this.videoID = this.dataList[this.k].id
@ -698,7 +700,7 @@
icon: 'none'
})
},
cLike(sss){
var data={
createBy:uni.getStorageSync('userId'),
@ -717,7 +719,7 @@
})
}
});
}else{//
this.$Request.post("/app/shipinquan/delDianzan", data).then(res => {
if (res.code == 0) {
@ -730,9 +732,9 @@
})
}
});
}
}
}
}
@ -748,7 +750,7 @@
width: 100%;
height: 100%;
background-color: #242424;
border-top-left-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
position: relative;
display: flex;
@ -757,7 +759,7 @@
/deep/uni-tabbar /deep/.uni-tabbar-bottom /deep/.uni-tabbar{
z-index: 998;
}
.btn {
text-align: center;
color: #fff;
@ -848,7 +850,7 @@
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/* background-color: aqua; */
}
.userName {