视频圈 上拉加载
This commit is contained in:
parent
d00761b9d7
commit
8e9061b9b3
|
@ -44,10 +44,10 @@
|
||||||
<template v-if="Object.keys(replyTemp).length">
|
<template v-if="Object.keys(replyTemp).length">
|
||||||
<span class="text_aid">回复给</span>
|
<span class="text_aid">回复给</span>
|
||||||
<span class="text_main">{{
|
<span class="text_main">{{
|
||||||
replyTemp.item1.item2
|
replyTemp.item1.item2
|
||||||
? replyTemp.item1.item2.user_name
|
? replyTemp.item1.item2.user_name
|
||||||
: replyTemp.item1.item1.user_name
|
: replyTemp.item1.item1.user_name
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else class="text_main">发表新评论</span>
|
<span v-else class="text_main">发表新评论</span>
|
||||||
</view>
|
</view>
|
||||||
|
@ -92,7 +92,10 @@
|
||||||
deleteMode: {
|
deleteMode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "all"
|
default: "all"
|
||||||
}
|
},
|
||||||
|
showPopup: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -122,6 +125,9 @@
|
||||||
onPageScroll : function(e) { //nvue暂不支持滚动监听,可用bindingx代替
|
onPageScroll : function(e) { //nvue暂不支持滚动监听,可用bindingx代替
|
||||||
console.log("滚动距离为:" + e.scrollTop);
|
console.log("滚动距离为:" + e.scrollTop);
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log("this.tableData",this.tableData)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadMore() {
|
loadMore() {
|
||||||
if (this.isLoading) return;
|
if (this.isLoading) return;
|
||||||
|
@ -213,21 +219,22 @@
|
||||||
params.parent_id = this.tableData.parent_id;
|
params.parent_id = this.tableData.parent_id;
|
||||||
params.reply_id = this.tableData.reply_id;
|
params.reply_id = this.tableData.reply_id;
|
||||||
params.reply_name = this.tableData.reply_name;
|
params.reply_name = this.tableData.reply_name;
|
||||||
|
params.user_name=this.tableData.user_name;
|
||||||
} else {
|
} else {
|
||||||
params.id = this.tableData.id,
|
params.id = this.tableData.id;
|
||||||
params.parent_id = item.item1?.parent_id ?? item.item1.id,
|
params.parent_id = item.item1?.parent_id ?? item.item1.id;
|
||||||
params.reply_id = item.item1.id,
|
params.reply_id = item.item1.id;
|
||||||
params.reply_name = item.item2 ? item.item2.user_name : item.item1.user_name
|
params.user_name=this.tableData.user_name;
|
||||||
|
params.reply_name = item.item2 ? item.item2.user_name : item.item1.user_name;
|
||||||
|
|
||||||
}
|
}
|
||||||
params = {
|
params = {
|
||||||
...params,
|
...params,
|
||||||
user_name: this.userInfo.user_name,
|
user_avatar: this.tableData.filePath?this.tableData.filePath:'../../static/logo.png',
|
||||||
user_avatar: this.userInfo.user_avatar,
|
|
||||||
user_content: this.commentValue,
|
user_content: this.commentValue,
|
||||||
is_like: false,
|
is_like: false,
|
||||||
like_count: 0,
|
like_count: 0,
|
||||||
create_time: "刚刚",
|
create_time: this.tableData.createTime,
|
||||||
owner: true
|
owner: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -235,18 +242,24 @@
|
||||||
title: "正在发送",
|
title: "正在发送",
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
|
console.log("params======。",this.tableData)
|
||||||
|
if(this.showPopup==true){
|
||||||
|
this.$refs.cPopupRef.close();
|
||||||
|
}
|
||||||
this.$emit("replyFun", {
|
this.$emit("replyFun", {
|
||||||
params
|
params
|
||||||
}, (res) => {
|
}, (res) => {
|
||||||
|
console.log(11)
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
params = {
|
params = {
|
||||||
...params,
|
...params,
|
||||||
id: res.id
|
id: res.id
|
||||||
};
|
};
|
||||||
if (this.isNewComment) {
|
if (this.isNewComment) {
|
||||||
|
console.log(22)
|
||||||
this.dataList.push(params);
|
this.dataList.push(params);
|
||||||
} else {
|
} else {
|
||||||
console.log(this.dataList);
|
console.log("44",this.dataList);
|
||||||
let c_data = this.dataList[item.index1];
|
let c_data = this.dataList[item.index1];
|
||||||
(c_data.children || (c_data.children = [])).push(params);
|
(c_data.children || (c_data.children = [])).push(params);
|
||||||
if (
|
if (
|
||||||
|
@ -257,8 +270,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$emit("update:tableTotal", this.tableTotal + 1);
|
this.$emit("update:tableTotal", this.tableTotal + 1);
|
||||||
this.$refs.cPopupRef.close();
|
|
||||||
});
|
});
|
||||||
|
this.$refs.cPopupRef.close();
|
||||||
},
|
},
|
||||||
deleteClick(item1, index1, item2, index2) {
|
deleteClick(item1, index1, item2, index2) {
|
||||||
this.delTemp = JSON.parse(JSON.stringify({
|
this.delTemp = JSON.parse(JSON.stringify({
|
||||||
|
|
|
@ -108,12 +108,12 @@
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="video-list">
|
<view class="video-list">
|
||||||
<view class="video-list-top">
|
<view class="video-list-top">
|
||||||
<view class="video-list-title">
|
<view class="video-list-title">
|
||||||
技师主页
|
技师主页
|
||||||
</view>
|
</view>
|
||||||
<view class="video-list-geng">
|
<view class="video-list-geng" @click="videoGengduo">
|
||||||
<span>更多</span>
|
<span>更多</span>
|
||||||
<image src="../../static/shezhi-jiantou.png" mode=""></image>
|
<image src="../../static/shezhi-jiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
<video class="video-item" :src="item.url" :poster="'https://gd-hbimg.huaban.com/3ae3bb051cba65840b10d2149ecf978b80e1c9793dee6-GkA300_fw658'"></video>
|
<video class="video-item" :src="item.url" :poster="'https://gd-hbimg.huaban.com/3ae3bb051cba65840b10d2149ecf978b80e1c9793dee6-GkA300_fw658'"></video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="excel-line">
|
<view class="excel-line">
|
||||||
<view>
|
<view>
|
||||||
<image class="excel" src="../../static/excel.png" mode=""></image>
|
<image class="excel" src="../../static/excel.png" mode=""></image>
|
||||||
|
@ -365,6 +365,11 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
videoGengduo(){
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/videoCircle/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
shangxian(){//请TA上线
|
shangxian(){//请TA上线
|
||||||
var data={
|
var data={
|
||||||
userId: this.artificerId,
|
userId: this.artificerId,
|
||||||
|
|
|
@ -78,7 +78,8 @@
|
||||||
<!-- 最底下的文字部分 -->
|
<!-- 最底下的文字部分 -->
|
||||||
<view class="content" style="display: flex;flex-direction: column;">
|
<view class="content" style="display: flex;flex-direction: column;">
|
||||||
<!-- <text class="userName" :style="'width: '+ (windowWidth - 90) +'px;'">{{list.title}}</text> -->
|
<!-- <text class="userName" :style="'width: '+ (windowWidth - 90) +'px;'">{{list.title}}</text> -->
|
||||||
<text class="words" :style="'width: '+ (windowWidth - 90) +'px;'">{{list.content}}</text><!-- k={{k}} -->
|
{{list.content}}
|
||||||
|
<!-- <text class="words" :style="'width: '+ (windowWidth - 90) +'px;'"></text> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 进度条 -->
|
<!-- 进度条 -->
|
||||||
<view v-if="k === index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="'width: '+ (windowWidth - (windowWidth*0.10)) +'px; margin-left: '+ (windowWidth * 0.05) +'px; height: 40px; position: absolute;bottom: 0px;margin-bottom: 6px;z-index: 14;'">
|
<view v-if="k === index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="'width: '+ (windowWidth - (windowWidth*0.10)) +'px; margin-left: '+ (windowWidth * 0.05) +'px; height: 40px; position: absolute;bottom: 0px;margin-bottom: 6px;z-index: 14;'">
|
||||||
|
@ -97,7 +98,7 @@
|
||||||
</swiper>
|
</swiper>
|
||||||
<uni-popup class="uni-popup" type="bottom" ref="pinglun" @touchmove.stop.prevent="moveHandle">
|
<uni-popup class="uni-popup" type="bottom" ref="pinglun" @touchmove.stop.prevent="moveHandle">
|
||||||
<view class="popup-content" :style="'width: '+ windowWidth +'px; height: '+ (boxStyle.height/heightNum) +'px;'">
|
<view class="popup-content" :style="'width: '+ windowWidth +'px; height: '+ (boxStyle.height/heightNum) +'px;'">
|
||||||
<CComment ref="ccRef" :userInfo="userInfo" :tableData="tableData" :tableTotal="tableTotal" likeFun="likeFun" @replyFun="replyFun" @deleteFun="deleteFun" :deleteMode="deleteMode"></CComment>
|
<CComment ref="ccRef" :showPopup="showPopup" :userInfo="userInfo" :tableData="tableData" :tableTotal="tableTotal" likeFun="likeFun" @replyFun="replyFun" @deleteFun="deleteFun" :deleteMode="deleteMode"></CComment>
|
||||||
<div class="btn" @click="openComment">发一条新评论</div>
|
<div class="btn" @click="openComment">发一条新评论</div>
|
||||||
<!-- <douyin-scrollview
|
<!-- <douyin-scrollview
|
||||||
:Width="windowWidth"
|
:Width="windowWidth"
|
||||||
|
@ -124,7 +125,8 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ccRef: null,
|
showPopup:false,
|
||||||
|
ccRef: null,
|
||||||
userInfo: {
|
userInfo: {
|
||||||
id: 120,
|
id: 120,
|
||||||
user_name: "🍁",
|
user_name: "🍁",
|
||||||
|
@ -394,9 +396,10 @@
|
||||||
}
|
}
|
||||||
this.$Request.post("/app/shipinquan/addContent",data).then(res => {
|
this.$Request.post("/app/shipinquan/addContent",data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
setTimeout(() => this.getPingL(this.videoID), 500);
|
setTimeout(() => this.getPingL(this.videoID), 500);
|
||||||
|
this.showPopup==true;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
callback(this.videoID);
|
// callback(this.videoID);
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -677,7 +680,9 @@
|
||||||
animationfinish(event){
|
animationfinish(event){
|
||||||
// 1.这里进行判断,如果是最后一个视频就进入 get() 方法加载视频进入列表
|
// 1.这里进行判断,如果是最后一个视频就进入 get() 方法加载视频进入列表
|
||||||
if(this.k == this.dataList.length - 1){
|
if(this.k == this.dataList.length - 1){
|
||||||
|
this.page++
|
||||||
this.GET()
|
this.GET()
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//每一组结束时新的请求
|
//每一组结束时新的请求
|
||||||
|
@ -940,6 +945,13 @@
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
z-index: 12;
|
z-index: 12;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
|
||||||
/* background-color: aqua; */
|
/* background-color: aqua; */
|
||||||
}
|
}
|
||||||
.userName {
|
.userName {
|
||||||
|
|
Loading…
Reference in New Issue