视频圈点赞优化
This commit is contained in:
parent
9b3d6b9729
commit
c37845d422
|
@ -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;
|
||||
|
|
|
@ -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,//用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue