This commit is contained in:
Gdpao 2020-08-14 19:49:57 +08:00
parent cd0e8bbf9e
commit 9158f27afb
5 changed files with 62 additions and 51 deletions

10
package-lock.json generated
View File

@ -6,13 +6,13 @@
"dependencies": {
"blueimp-md5": {
"version": "2.17.0",
"resolved": "https://registry.npm.taobao.org/blueimp-md5/download/blueimp-md5-2.17.0.tgz?cache=0&sync_timestamp=1595922448921&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fblueimp-md5%2Fdownload%2Fblueimp-md5-2.17.0.tgz",
"integrity": "sha1-9PysCIsRX3tARfGfXaWenQGxu5Y="
"resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.17.0.tgz",
"integrity": "sha512-x5PKJHY5rHQYaADj6NwPUR2QRCUVSggPzrUKkeENpj871o9l9IefJbO2jkT5UvYykeOK9dx0VmkIo6dZ+vThYw=="
},
"uview-ui": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.0.tgz",
"integrity": "sha512-1UdMUGJqWx60ALbXXXs3rQHKUNBARDIV5XHc06mKFxpccO/i0tzoSqS6RuPdmYwXU1q59wnIU+NLABvcU5u4vw=="
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.6.2.tgz",
"integrity": "sha512-AvTXUk8A/AdJazxTziApw0NMv61jlE9cEO+Jxe84cTvcm2Ej7Ngf8zb3a6aSPVi6OVu81vTCC71R1wN7dZC3ig=="
},
"vuex": {
"version": "3.5.1",

View File

@ -14,7 +14,7 @@
"license": "ISC",
"dependencies": {
"blueimp-md5": "^2.17.0",
"uview-ui": "^1.5.0",
"uview-ui": "^1.6.2",
"vuex": "^3.5.1"
}
}

View File

@ -52,7 +52,7 @@
</view>
<view class="child_content">{{ child.content }}</view>
</view>
<view class="more-reply" v-if="item.reply_count && is_more" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
<view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
</view>
</block>
<view class="no-data" v-if="!commentList.length">还没有评论快来评论吧</view>
@ -292,6 +292,7 @@
height: 90rpx;
& > input {
width: 80%;
font-size: 24rpx;
padding: 4rpx 20rpx;
border-radius: 20rpx;
}
@ -575,7 +576,6 @@ export default {
})
if (!this.page_[id] === 0) {
}
console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
uni.hideLoading();
if (res.errCode == 0) {
@ -583,10 +583,8 @@ export default {
// this.is_more = false;
// }
this.page_[id]++;
console.log(this.page_[id]);
this.$nextTick(() => {
this.allList[id] = res.data;
})
this.allList[id] = res.data;
this.$forceUpdate();
console.log(this.allList);
}
})

View File

@ -77,9 +77,9 @@
</view>
</view>
</view>
<view class="send-box">
<view class="send-box" @click="openKeyInput">
<input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
disabled="true" @blur="blue" @click="openKeyInput" value="" />
disabled="true" @click="openKeyInput" />
<text class="btn-send">发送</text>
</view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
@ -89,13 +89,13 @@
</scroller>
</cover-view>
<!-- 评论框 -->
<cover-view class="edit-box" :style="videoSize" v-if="is_edit">
<view class="input-main" :style="{ bottom: editTop }">
<input class="edit-input" type="text" value="" :focus="is_focus" :placeholder=" edit_text_other ? edit_text_other : edit_text"
<cover-view class="edit-box" :style="videoSize" v-if="is_edit" @click="hideEdit">
<view class="input-main">
<input class="edit-input" type="text" :focus="is_focus" :placeholder=" edit_text_other ? edit_text_other : edit_text"
placeholder-class="placeholder-class" v-model="send_value" />
<text class="btn-send" @click="sendComment">发送</text>
</view>
<view></view>
<!-- <view class="key-height" :style="{ height: editTop }"></view> -->
</cover-view>
<!-- 购物车 -->
<cover-view class="cart-box" v-if="cart_type">
@ -124,9 +124,10 @@
<cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<!-- 暂停按钮 -->
<cover-image class="pause" :style="{ top: fixTop + 100 }" @click="stoping" src="../../static/videoPlay.png"
v-if="!is_play">
</cover-image>
<cover-view class="pause" :style="{ top: fixTop + 100 }">
<cover-image class="pause-img" src="../../static/videoPlay.png" @click="stoping" v-if="!is_play">
</cover-image>
</cover-view>
</view>
</template>
@ -242,9 +243,12 @@
},
// 发布评论
sendComment() {
console.log(this.article_id,this.send_value,this.pid,this.reply_id);
console.log(this.article_id, this.send_value, this.pid, this.reply_id);
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
uni.showToast({
title: "输入内容不能为空!",
icon: "none"
})
return;
}
uni.request({
@ -266,7 +270,7 @@
this.send_value = "";
this.comment_num = res.data.num;
let p_id = res.data.data.data.pid;
console.log(this.pid,this.reply_id,this.comment_id);
console.log(this.pid, this.reply_id, this.comment_id);
if (res.data.data.data.pid) {
this.commentList[this.comment_id].reply_count = true;
console.log(this.allList[p_id]);
@ -305,8 +309,7 @@
uni.showLoading({
title: "loading..."
})
if (!this.page_[id] === 0) {
}
if (!this.page_[id] === 0) {}
console.log(id);
uni.request({
url: temp_url + "article/articleReplyList",
@ -325,11 +328,10 @@
this.is_more = false;
}
this.page_[id]++;
console.log(this.page_[id]);
this.$nextTick(function(){
this.allList[id] = res.data.data;
})
console.log(this.allList);
this.allList[id] = res.data.data;
this.$forceUpdate();
// console.log(this.page_[id]);
// console.log(this.allList);
}
}
})
@ -404,7 +406,7 @@
},
// 打开评论输入
openKeyInput(data, index) {
console.log(data);
// console.log(data);
let me = this;
this.is_focus = true;
setTimeout(() => {
@ -416,7 +418,7 @@
me.is_focus = false;
me.is_edit = false;
} else {
me.editTop = res.height;
me.editTop = res.height + "rpx";
}
})
this.comment_id = index;
@ -458,6 +460,8 @@
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
// 收起键盘
hideEdit() {},
// stop
stopClick(event) {
event.stopPropagation();
@ -478,6 +482,7 @@
/* 关闭 */
.close {
z-index: 99;
position: fixed;
top: 100rpx;
right: 70rpx;
@ -494,6 +499,11 @@
height: 100rpx;
}
.pause-img {
width: 100rpx;
height: 100rpx;
}
/* 用户操作 */
.user-info {
position: fixed;
@ -561,7 +571,7 @@
}
.mask {
z-index: 999999;
z-index: 10000;
position: fixed;
top: 0;
left: 0;
@ -569,7 +579,7 @@
}
.content-box {
z-index: 99;
z-index: 999;
position: fixed;
bottom: 0;
left: 0;
@ -617,9 +627,7 @@
margin-left: 100rpx;
}
.child-box {
}
.child-box {}
.child-info {
margin: 10rpx 0;
@ -725,6 +733,7 @@
.input-main {
position: fixed;
left: 0;
bottom: 0;
/* #ifdef H5 */
display: flex;
/* #endif */
@ -735,6 +744,13 @@
padding: 0 20rpx;
line-height: 80rpx;
background-color: #fff;
border-top-right-radius: 10rpx;
border-top-left-radius: 10rpx;
}
.key-height {
width: 750rpx;
background-color: #fff;
}
.edit-input {
@ -746,7 +762,7 @@
}
.cart-box {
z-index: 99;
z-index: 1000;
position: fixed;
bottom: 0;
left: 0;

View File

@ -104,10 +104,7 @@
{
"path" : "video/video",
"style" : {
"navigationStyle":"custom",
"app-plus": {
"softinputMode": "adjustResize"
}
"navigationStyle":"custom"
}
},
{