This commit is contained in:
Gdpao 2020-08-13 19:41:46 +08:00
parent 459e7fad0f
commit 137279b774
2 changed files with 47 additions and 12 deletions

View File

@ -8,7 +8,7 @@
@openCart="openPopup"></userinfo>
<!-- 视频信息 -->
<cover-view class="info-box" @click="stopClick">
<view class="video-info-box">
<view class="video-info-box" :style="{ width: time_count > 99 ? '200rpx' : '160rpx' }">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text>
@ -63,14 +63,14 @@
<text class="content-style">{{ item.content }}</text>
</view>
<view class="more-content-box">
<!-- <view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
<view class="info">
<image :src="child.member_avatar" mode=""></image>
<text>{{ child.member_nickname }}</text>
<view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
<view class="child-info">
<image class="child-avatar" :src="child.member_avatar" mode=""></image>
<text class="child-name">{{ child.member_nickname }}</text>
<text v-if="0">{{ child.reply_member_nickname }}</text>
</view>
<view class="child_content">{{ child.content }}</view>
</view> -->
</view>
<view class="more-comment" v-if="item.reply_count">
展开更多回复
</view>
@ -153,6 +153,7 @@
edit_text_other: "有爱评论,说点好听的 ~",
pid: 0, // 主键
reply_id: 0, // 回复id
allList: {}, // 全部子评论
page: 0,
comment_id: 0,
send_value: "", // 评论
@ -168,6 +169,7 @@
this.article_id = option.id;
this.getVideoInfo(option.id);
this.getInfo();
this.allList = {};
},
onReady() {
this.videoBox = uni.createVideoContext("videoId", this);
@ -238,6 +240,7 @@
},
// 发布评论
sendComment() {
console.log(this.article_id,this.send_value,this.pid,this.reply_id);
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
@ -255,6 +258,7 @@
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res);
this.is_edit = false;
if (res.data.errCode == 0) {
this.send_value = "";
@ -265,10 +269,10 @@
this.commentList[this.comment_id].reply_count = true;
console.log(this.allList[p_id]);
if (this.allList[p_id]) {
this.allList[p_id].push(res.data.data);
this.allList[p_id].push(res.data.data.data);
} else {
this.allList[p_id] = [];
this.allList[p_id].push(res.data.data);
this.allList[p_id].push(res.data.data.data);
}
console.log(this.allList);
} else {
@ -471,7 +475,6 @@
.video-info-box {
flex-direction: row;
align-items: center;
width: 160rpx;
height: 40rpx;
padding: 4rpx 10rpx;
margin-bottom: 20rpx;
@ -569,7 +572,7 @@
.content-style {
width: 600rpx;
font-size: 26rpx;
font-size: 28rpx;
color: #333;
lines: 2;
}
@ -578,6 +581,34 @@
margin-left: 100rpx;
}
.child-box {
}
.child-info {
margin: 10rpx 0;
flex-direction: row;
align-items: center;
}
.child-avatar {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 50%;
}
.child-name {
font-size: 22rpx;
color: #333;
}
.child_content {
padding: 4rpx 0;
margin-left: 40rpx;
font-size: 26rpx;
}
.more-comment {
margin: 10rpx 0;
font-size: 22rpx;

View File

@ -16,7 +16,7 @@
</view> -->
<view class="top" :style="{'background':'url(' + info.store_banner + ') 100% 100% no-repeat' }">
<view class="mantle"></view>
<view class="main-container">
<view class="main-container" :style="{ 'padding-top': paddingTop }">
<image :src="info.store_avatar"></image>
<view class="info">
<view class="name u-line-1">{{info.store_name}}</view>
@ -93,6 +93,7 @@ export default {
info: {},
page: 1,
scrollHeiht: '',
paddingTop: 0,
}
},
components:{
@ -212,6 +213,8 @@ export default {
setViewHeight() {
const res = uni.getSystemInfoSync();
this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px';
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
console.log(this.paddingTop);
}
},
onLoad(option){
@ -250,7 +253,8 @@ export default {
.main-container {
display: flex;
align-items: center;
padding: 54rpx 60rpx 0 30rpx;
// padding-top: calc(var(--status-bar-height) + 54);
padding: 0 60rpx 0 30rpx;
position: absolute;
top: 0;
left: 0;