This commit is contained in:
Gdpao
2020-08-11 10:00:06 +08:00
parent e6f73f01cd
commit aad2bca5c6
13 changed files with 137 additions and 35 deletions

View File

@@ -8,7 +8,7 @@
</cover-image>
<!-- 用户操作 -->
<userinfo class="user-info" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
<cover-view class="info-box">
<cover-view class="info-box" @click="stopClick">
<view class="video-info-box">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
@@ -68,6 +68,7 @@
<script>
import userinfo from "../components/userinfo/index" // 点赞组件
const temp_url = "https://dmmall.sdbairui.com/api/";
export default {
components: {
userinfo
@@ -101,7 +102,7 @@
// 获取信息
getVideoInfo(article_id) {
uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleInfo",
url: temp_url + "article/articleInfo",
method: "POST",
data: {
article_id: article_id
@@ -130,7 +131,7 @@
// 获取评论
getComment() {
uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleCommentList",
url: temp_url + "article/articleCommentList",
method: "POST",
data: {
article_id: this.article_id,
@@ -144,6 +145,35 @@
}
})
},
// 发布评论
sendComment() {
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
}
uni.request({
url: temp_url + "article/articleAddComment",
method: "POST",
data: {
article_id: this.article_id,
content: this.send_value,
pid: this.pid,
reply_id: this.reply_id,
},
success: (res) => {
if (res.data.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num;
console.log(res.data);
} else {
uni.showToast({
title: res.data.message,
icon: "none"
})
}
}
})
},
// 获取手机信息
getInfo() {
uni.getSystemInfo({
@@ -201,6 +231,10 @@
this.loadinging = false;
}, 2000)
},
// stop
stopClick(event) {
event.stopPropagation();
},
goBack() {
uni.navigateBack({
delta: 1
@@ -222,6 +256,7 @@
/* 暂停 */
.pause {
z-index: 99;
position: fixed;
top: 600rpx;
left: 330rpx;
@@ -241,6 +276,7 @@
position: fixed;
bottom: 0;
left: 0;
width: 720rpx;
padding: 30rpx;
}
@@ -257,7 +293,7 @@
}
.content-box {
z-index: 99;
z-index: 100;
position: fixed;
bottom: 0;
left: 0;