gdpao #185

Merged
gyh merged 1 commits from gyh into master 2020-08-13 11:42:29 +00:00
2 changed files with 47 additions and 12 deletions
Showing only changes of commit 137279b774 - Show all commits

View File

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

View File

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