视频圈点赞优化
This commit is contained in:
parent
9b3d6b9729
commit
c37845d422
|
@ -356,7 +356,7 @@
|
||||||
id:4,
|
id:4,
|
||||||
name: '女性专区',
|
name: '女性专区',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
scrollLeft:0,
|
scrollLeft:0,
|
||||||
tabs: [{
|
tabs: [{
|
||||||
|
@ -641,19 +641,21 @@
|
||||||
},
|
},
|
||||||
getVideo(){
|
getVideo(){
|
||||||
var that=this;
|
var that=this;
|
||||||
|
console.log(that.parType);
|
||||||
// 1.这里引入后端请求数据
|
// 1.这里引入后端请求数据
|
||||||
var data={
|
var data={
|
||||||
parType:that.parType,
|
userId: uni.getStorageSync('userId'),
|
||||||
userId:uni.getStorageSync('userId'),
|
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit:4,
|
limit:4,
|
||||||
}
|
}
|
||||||
if(that.parType=='3'){
|
if(that.parType=='1'){
|
||||||
data.longitude=that.longitude;
|
|
||||||
data.latitude=that.latitude;
|
|
||||||
}else{
|
|
||||||
data.longitude='';
|
data.longitude='';
|
||||||
data.latitude='';
|
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 => {
|
this.$Request.get("/app/shipinquan/list", data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -680,7 +682,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
searchBtn(){//搜索按钮
|
searchBtn(){//搜索按钮
|
||||||
|
@ -694,7 +696,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
input(res) {//搜索 输入框
|
input(res) {//搜索 输入框
|
||||||
this.searchValue=res;
|
this.searchValue=res;
|
||||||
|
@ -713,7 +715,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
yuedao(text){
|
yuedao(text){
|
||||||
let userId = uni.getStorageSync('userId')
|
let userId = uni.getStorageSync('userId')
|
||||||
|
@ -726,7 +728,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
closePopup(type){//提前结束 关闭弹出框
|
closePopup(type){//提前结束 关闭弹出框
|
||||||
this.type = type
|
this.type = type
|
||||||
|
@ -770,7 +772,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
} else{
|
} else{
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
let that = this
|
let that = this
|
||||||
|
@ -900,7 +902,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
chaoji(){//超级满减
|
chaoji(){//超级满减
|
||||||
|
|
||||||
let userId = uni.getStorageSync('userId')
|
let userId = uni.getStorageSync('userId')
|
||||||
if (userId) {
|
if (userId) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -936,7 +938,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
goNav(e){
|
goNav(e){
|
||||||
let userId = uni.getStorageSync('userId')
|
let userId = uni.getStorageSync('userId')
|
||||||
|
@ -955,7 +957,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// chooseItem(item){
|
// chooseItem(item){
|
||||||
|
@ -1031,7 +1033,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getCity(e) {
|
getCity(e) {
|
||||||
|
@ -1219,8 +1221,8 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
chengFel(item){//大家常买。。。 导航切换
|
chengFel(item){//大家常买。。。 导航切换
|
||||||
this.currentTabFl=item.id;
|
this.currentTabFl=item.id;
|
||||||
|
@ -1237,7 +1239,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(this.currentTabFl=='3'){//行业大拿
|
}else if(this.currentTabFl=='3'){//行业大拿
|
||||||
let userId = uni.getStorageSync('userId')
|
let userId = uni.getStorageSync('userId')
|
||||||
if (userId) {
|
if (userId) {
|
||||||
|
@ -1249,7 +1251,7 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{// 女性专区
|
}else{// 女性专区
|
||||||
let userId = uni.getStorageSync('userId')
|
let userId = uni.getStorageSync('userId')
|
||||||
if (userId) {
|
if (userId) {
|
||||||
|
@ -1261,8 +1263,8 @@
|
||||||
url: '/pages/public/login'
|
url: '/pages/public/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remen(){//大家常买
|
remen(){//大家常买
|
||||||
|
@ -1291,12 +1293,12 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #1296db;
|
color: #1296db;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kefu image {
|
.kefu image {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kefu {
|
.kefu {
|
||||||
width: 75px;
|
width: 75px;
|
||||||
height: 75px;
|
height: 75px;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<swiper-item v-for="(list,index) in dataList" :key="index">
|
<swiper-item v-for="(list,index) in dataList" :key="index">
|
||||||
<view v-if="Math.abs(k-index)<=1">
|
<view v-if="Math.abs(k-index)<=1">
|
||||||
<view>
|
<view>
|
||||||
<!--
|
<!--
|
||||||
1.v-if:用于控制视频在节点的渲染数
|
1.v-if:用于控制视频在节点的渲染数
|
||||||
2.muted的默认值是 false,代表默认是禁音视频的
|
2.muted的默认值是 false,代表默认是禁音视频的
|
||||||
3.http-cache默认开启视频缓存
|
3.http-cache默认开启视频缓存
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; background-color: #000000; z-index: 8;'"
|
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; background-color: #000000; z-index: 8;'"
|
||||||
:poster="list.filePath"
|
:poster="list.filePath"
|
||||||
></video>
|
></video>
|
||||||
<!--
|
<!--
|
||||||
1.这里是封面(方案二):这里的封面可以自定义。
|
1.这里是封面(方案二):这里的封面可以自定义。
|
||||||
2.也在代码中做了批注,两种方案可以共存,不会相互影响。
|
2.也在代码中做了批注,两种方案可以共存,不会相互影响。
|
||||||
-->
|
-->
|
||||||
|
@ -155,23 +155,23 @@
|
||||||
'height': 0,
|
'height': 0,
|
||||||
'width': 0,
|
'width': 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
videoID: "",
|
videoID: "",
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
|
||||||
showPlay: false,//转轮显示控制
|
showPlay: false,//转轮显示控制
|
||||||
rotates: 0,//转轮旋转角度
|
rotates: 0,//转轮旋转角度
|
||||||
rotateTime: "",//转轮递归事件控制
|
rotateTime: "",//转轮递归事件控制
|
||||||
xrotats: "",
|
xrotats: "",
|
||||||
|
|
||||||
mpcleartime: "",
|
mpcleartime: "",
|
||||||
|
|
||||||
isClick: false,
|
isClick: false,
|
||||||
|
|
||||||
changeTimeout: "",
|
changeTimeout: "",
|
||||||
mptime: 0,
|
mptime: 0,
|
||||||
mpstartTime: 0,
|
mpstartTime: 0,
|
||||||
|
|
||||||
duration: 500,
|
duration: 500,
|
||||||
// -- 进度条相关 -- start
|
// -- 进度条相关 -- start
|
||||||
videoStartPositon: 0,
|
videoStartPositon: 0,
|
||||||
|
@ -183,14 +183,14 @@
|
||||||
// -- 进度条相关 -- end
|
// -- 进度条相关 -- end
|
||||||
// 引入评论 - 参数
|
// 引入评论 - 参数
|
||||||
heightNum: 1.18,
|
heightNum: 1.18,
|
||||||
|
|
||||||
// 双击点赞参数
|
// 双击点赞参数
|
||||||
touchNum: 0,
|
touchNum: 0,
|
||||||
aixinLeft: 0,
|
aixinLeft: 0,
|
||||||
aixinTop: 0,
|
aixinTop: 0,
|
||||||
isShowAixin: false,
|
isShowAixin: false,
|
||||||
Rotate: 0,
|
Rotate: 0,
|
||||||
|
|
||||||
isShow1: false,//控制渲染变量1
|
isShow1: false,//控制渲染变量1
|
||||||
isShow2: false,//控制渲染变量2 : 专门控制 uni-popup
|
isShow2: false,//控制渲染变量2 : 专门控制 uni-popup
|
||||||
currents: 0,//用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
|
currents: 0,//用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
|
||||||
|
@ -198,12 +198,12 @@
|
||||||
limit:10
|
limit:10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch:{
|
watch:{
|
||||||
async k(k,old_k){
|
async k(k,old_k){
|
||||||
// console.log(k, old_k)
|
// console.log(k, old_k)
|
||||||
this.progressBarPercent = 0;
|
this.progressBarPercent = 0;
|
||||||
|
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
this.dataList[old_k].playIng = false//如果视频暂停,就加载封面
|
this.dataList[old_k].playIng = false//如果视频暂停,就加载封面
|
||||||
this.dataList[old_k].isplay = true
|
this.dataList[old_k].isplay = true
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
audo.pause()
|
audo.pause()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
openComment() {//点击发布新评论按钮
|
openComment() {//点击发布新评论按钮
|
||||||
this.$refs.ccRef.newCommentFun();
|
this.$refs.ccRef.newCommentFun();
|
||||||
|
@ -310,9 +310,9 @@
|
||||||
uni.setStorageSync("user",this.peopleList[i]);
|
uni.setStorageSync("user",this.peopleList[i]);
|
||||||
这个东西,用于存储当前用户信息。在 插件里面会使用到这个东西,
|
这个东西,用于存储当前用户信息。在 插件里面会使用到这个东西,
|
||||||
记得写一下。
|
记得写一下。
|
||||||
|
|
||||||
(4)打开评论
|
(4)打开评论
|
||||||
*/
|
*/
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
// for (let i = 0; i < msg.length; i++) {
|
// for (let i = 0; i < msg.length; i++) {
|
||||||
// list.push(msg[i])
|
// list.push(msg[i])
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.tableData = msg.map(item => {
|
this.tableData = msg.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
@ -528,7 +528,7 @@
|
||||||
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10));
|
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10));
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
touchend(e){
|
touchend(e){
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
@ -543,7 +543,7 @@
|
||||||
this.isTouch = false;
|
this.isTouch = false;
|
||||||
},500)
|
},500)
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
timeupdate(event,index){
|
timeupdate(event,index){
|
||||||
// 触发进度条更新
|
// 触发进度条更新
|
||||||
|
@ -556,7 +556,7 @@
|
||||||
// ---- 进度条相关 --- ending
|
// ---- 进度条相关 --- ending
|
||||||
doubleLike(){
|
doubleLike(){
|
||||||
if(this.dataList[this.k].sfdz == '0'){
|
if(this.dataList[this.k].sfdz == '0'){
|
||||||
|
|
||||||
var data={
|
var data={
|
||||||
createBy:uni.getStorageSync('userId'),
|
createBy:uni.getStorageSync('userId'),
|
||||||
shipinquanId:this.dataList[this.k].id,
|
shipinquanId:this.dataList[this.k].id,
|
||||||
|
@ -625,7 +625,7 @@
|
||||||
if(this.k == this.dataList.length - 1){
|
if(this.k == this.dataList.length - 1){
|
||||||
this.page++
|
this.page++
|
||||||
this.GET()
|
this.GET()
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//每一组结束时新的请求
|
//每一组结束时新的请求
|
||||||
|
@ -633,6 +633,7 @@
|
||||||
var data={
|
var data={
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit:this.limit,
|
limit:this.limit,
|
||||||
|
userId:uni.getStorageSync('userId')
|
||||||
}
|
}
|
||||||
this.$Request.get("/app/shipinquan/list", data).then(res => {
|
this.$Request.get("/app/shipinquan/list", data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -654,6 +655,7 @@
|
||||||
var data={
|
var data={
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit:this.limit,
|
limit:this.limit,
|
||||||
|
userId:uni.getStorageSync('userId')
|
||||||
}
|
}
|
||||||
this.$Request.get("/app/shipinquan/list", data).then(res => {
|
this.$Request.get("/app/shipinquan/list", data).then(res => {
|
||||||
if (res.code == 0) {
|
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).seek(0)
|
||||||
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
||||||
audo.src = this.dataList[this.k].src;
|
audo.src = this.dataList[this.k].src;
|
||||||
|
|
||||||
},500)
|
},500)
|
||||||
},200)
|
},200)
|
||||||
this.videoID = this.dataList[this.k].id
|
this.videoID = this.dataList[this.k].id
|
||||||
|
@ -698,7 +700,7 @@
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cLike(sss){
|
cLike(sss){
|
||||||
var data={
|
var data={
|
||||||
createBy:uni.getStorageSync('userId'),
|
createBy:uni.getStorageSync('userId'),
|
||||||
|
@ -717,7 +719,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{//取消点赞
|
}else{//取消点赞
|
||||||
this.$Request.post("/app/shipinquan/delDianzan", data).then(res => {
|
this.$Request.post("/app/shipinquan/delDianzan", data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -730,9 +732,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -748,7 +750,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #242424;
|
background-color: #242424;
|
||||||
border-top-left-radius: 10px;
|
border-top-left-radius: 10px;
|
||||||
border-top-right-radius: 10px;
|
border-top-right-radius: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -757,7 +759,7 @@
|
||||||
/deep/uni-tabbar /deep/.uni-tabbar-bottom /deep/.uni-tabbar{
|
/deep/uni-tabbar /deep/.uni-tabbar-bottom /deep/.uni-tabbar{
|
||||||
z-index: 998;
|
z-index: 998;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -848,7 +850,7 @@
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
|
|
||||||
/* background-color: aqua; */
|
/* background-color: aqua; */
|
||||||
}
|
}
|
||||||
.userName {
|
.userName {
|
||||||
|
|
Loading…
Reference in New Issue