Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into zhy

This commit is contained in:
2020-08-11 15:40:53 +08:00
15 changed files with 185 additions and 45 deletions

View File

@@ -4,8 +4,8 @@
<image src="/static/image/common/10.png"></image>
<text>输入达人名称</text>
</view>
<view class="list">
<darenItem style="margin-top:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
<view class="list" style="margin-left:-20rpx">
<darenItem style="margin-top:20rpx;margin-left:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view>
</view>
</template>
@@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
url: '/pageB/search/index?type=1'
url: '/pageB/search/index?type=2'
})
},
},

View File

@@ -27,7 +27,7 @@
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
<view class="top">
<text>评论</text>
<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
<u-icon name="close" color="#333" size="28" @click="is_comment=false"></u-icon>
</view>
<scroll-view class="scroll-box" scroll-y="true" lower-threshold="50" @scrolltolower="scrollBottom">
<block v-for="(item,index) in commentList" :key="index">
@@ -66,7 +66,7 @@
<!-- 评论box -->
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
<view class="edit-box">
<input type="text" :focus="is_focus" :placeholder="edit_text_other" @focus="focus" v-model="send_value">
<input type="text" focus :placeholder="edit_text_other" @focus="focus" v-model="send_value">
<text @click="sendComment">发送</text>
</view>
</u-popup>
@@ -180,13 +180,15 @@
z-index: 1000;
position: fixed;
top: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 88rpx;
padding: 0 20rpx;
line-height: 88rpx;
background-color: #ECECEC;
& > text {
margin-right: 280rpx;
color: #333;
font-size: 30rpx;
font-weight: 500;
@@ -514,6 +516,10 @@ export default {
},
// 发布评论
sendComment() {
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
}
this.$u.post("article/articleAddComment",{
article_id: this.article_id,
content: this.send_value,

View File

@@ -135,7 +135,7 @@
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
<view class="num">
<text>购买数量</text>
<u-number-box v-model="goodsNumber"></u-number-box>
<u-number-box v-model="goodsNumber" :min="1"></u-number-box>
</view>
<view style="height:100rpx"></view>
</view>
@@ -524,6 +524,7 @@ export default {
} else {
this.$u.toast(res.message);
this.debounce = true;
this.$u.toast(res.message);
}
})
},

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