Compare commits
5 Commits
ed6674f3ff
...
e0216062f1
| Author | SHA1 | Date | |
|---|---|---|---|
| e0216062f1 | |||
| 459e7fad0f | |||
|
|
e8ae43c726 | ||
| f1fbeb65a1 | |||
| a95336a5a6 |
@@ -25,7 +25,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
||||||
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
<!-- || order.view_type == 2 -->
|
||||||
|
<view class="cancel" v-if="(order.view_type == 3) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
||||||
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
|
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
|
||||||
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
|
|||||||
@@ -47,12 +47,12 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<image :src="child.member_avatar" mode=""></image>
|
<image :src="child.member_avatar" mode=""></image>
|
||||||
<text>{{ child.member_nickname }}</text>
|
<text>{{ child.member_nickname }}</text>
|
||||||
<u-icon v-if="!child.is_nickanme" class="icon" name="play-right-fill" color="#666" size="10rpx"></u-icon>
|
<u-icon class="icon" name="play-right-fill" color="#666" size="10rpx" v-if="0"></u-icon>
|
||||||
<text v-if="!child.is_nickanme">{{ 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-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></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>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
|
<view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
|
||||||
@@ -406,7 +406,7 @@ export default {
|
|||||||
list:{},
|
list:{},
|
||||||
swiper_id: "",
|
swiper_id: "",
|
||||||
page: 0, // 主评论
|
page: 0, // 主评论
|
||||||
page_: [], // 子评论
|
page_: {}, // 子评论
|
||||||
cart_type: false, // 显示购物车
|
cart_type: false, // 显示购物车
|
||||||
is_comment: false, // 显示评论
|
is_comment: false, // 显示评论
|
||||||
is_focus: false, // 聚焦
|
is_focus: false, // 聚焦
|
||||||
@@ -416,6 +416,7 @@ export default {
|
|||||||
cart_len: 0,
|
cart_len: 0,
|
||||||
photo_len: 0,
|
photo_len: 0,
|
||||||
comment_num: 0,
|
comment_num: 0,
|
||||||
|
is_more: true,
|
||||||
edit_text: "有爱评论,说点好听的 ~",
|
edit_text: "有爱评论,说点好听的 ~",
|
||||||
edit_text_other: "有爱评论,说点好听的 ~",
|
edit_text_other: "有爱评论,说点好听的 ~",
|
||||||
commentList: [], // 评论
|
commentList: [], // 评论
|
||||||
@@ -493,16 +494,19 @@ export default {
|
|||||||
}
|
}
|
||||||
this.page++;
|
this.page++;
|
||||||
let list = this.commentList;
|
let list = this.commentList;
|
||||||
// list.forEach((item,index) => {
|
list.forEach((item,index) => {
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
// })
|
item.page = 0;
|
||||||
|
item.commentList = [];
|
||||||
|
})
|
||||||
|
this.commentList = list;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 打开评论输入
|
// 打开评论输入
|
||||||
openKeyInput(data,index) {
|
openKeyInput(data,index) {
|
||||||
let me = this;
|
let me = this;
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
this.is_edit = true;
|
this.is_edit = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.is_focus = true;
|
this.is_focus = true;
|
||||||
@@ -542,12 +546,18 @@ export default {
|
|||||||
this.comment_num = res.data.num;
|
this.comment_num = res.data.num;
|
||||||
// console.log(this.comment_num);
|
// console.log(this.comment_num);
|
||||||
this.is_edit = false;
|
this.is_edit = false;
|
||||||
console.log(res.data.data.reply_id);
|
// console.log(res.data.data.reply_id);
|
||||||
if (res.data.data.reply_id) {
|
let p_id = res.data.data.pid;
|
||||||
console.log(this.allList);
|
// console.log(p_id);
|
||||||
|
if (res.data.data.pid) {
|
||||||
this.commentList[this.comment_id].reply_count = true;
|
this.commentList[this.comment_id].reply_count = true;
|
||||||
this.allList[this.comment_id] = [];
|
console.log(this.allList[p_id]);
|
||||||
this.allList[this.comment_id].push(res.data.data);
|
if (this.allList[p_id]) {
|
||||||
|
this.allList[p_id].push(res.data.data);
|
||||||
|
} else {
|
||||||
|
this.allList[p_id] = [];
|
||||||
|
this.allList[p_id].push(res.data.data);
|
||||||
|
}
|
||||||
console.log(this.allList);
|
console.log(this.allList);
|
||||||
} else {
|
} else {
|
||||||
this.commentList.unshift(res.data.data);
|
this.commentList.unshift(res.data.data);
|
||||||
@@ -559,15 +569,25 @@ export default {
|
|||||||
},
|
},
|
||||||
// 发现回复列表
|
// 发现回复列表
|
||||||
getReplyList(id) {
|
getReplyList(id) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "loading..."
|
||||||
|
})
|
||||||
if (!this.page_[id] === 0) {
|
if (!this.page_[id] === 0) {
|
||||||
}
|
}
|
||||||
console.log(this.page_[id]);
|
console.log(this.page_[id]);
|
||||||
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
|
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
|
||||||
console.log(res);
|
uni.hideLoading();
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
if (res.data.length < 10) {
|
||||||
|
this.is_more = false;
|
||||||
|
}
|
||||||
this.page_[id]++;
|
this.page_[id]++;
|
||||||
console.log(this.page_[id]);
|
console.log(this.page_[id]);
|
||||||
this.allList[id] = res.data;
|
this.$nextTick(() => {
|
||||||
|
this.allList[id] = res.data;
|
||||||
|
})
|
||||||
|
console.log(this.allList);
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -62,6 +62,19 @@
|
|||||||
<view class="content-main">
|
<view class="content-main">
|
||||||
<text class="content-style">{{ item.content }}</text>
|
<text class="content-style">{{ item.content }}</text>
|
||||||
</view>
|
</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>
|
||||||
|
<text v-if="0">{{ child.reply_member_nickname }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="child_content">{{ child.content }}</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="more-comment" v-if="item.reply_count">
|
||||||
|
展开更多回复
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="send-box">
|
<view class="send-box">
|
||||||
<input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
|
<input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
|
||||||
@@ -246,18 +259,31 @@
|
|||||||
if (res.data.errCode == 0) {
|
if (res.data.errCode == 0) {
|
||||||
this.send_value = "";
|
this.send_value = "";
|
||||||
this.comment_num = res.data.num;
|
this.comment_num = res.data.num;
|
||||||
if (res.data.data.data.reply_id) {
|
let p_id = res.data.data.data.pid;
|
||||||
// this.commentList[this.comment_id].reply_count = true;
|
console.log(this.pid,this.reply_id,this.comment_id);
|
||||||
// this.allList[this.comment_id].unshift(res.data.data);
|
if (res.data.data.data.pid) {
|
||||||
// console.log(this.allList, 111);
|
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);
|
||||||
|
} else {
|
||||||
|
this.allList[p_id] = [];
|
||||||
|
this.allList[p_id].push(res.data.data);
|
||||||
|
}
|
||||||
|
console.log(this.allList);
|
||||||
} else {
|
} else {
|
||||||
this.commentList.unshift(res.data.data.data);
|
this.commentList.unshift(res.data.data.data);
|
||||||
}
|
}
|
||||||
console.log(this.commentList);
|
// console.log(this.commentList);
|
||||||
} else if (res.data.errCode == 401) {
|
} else if (res.data.errCode == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "您还没有登录,请先登录!",
|
title: "您还没有登录,请先登录!",
|
||||||
icon: "none"
|
icon: "none",
|
||||||
|
// success: () => {
|
||||||
|
// setTimeout(function() {
|
||||||
|
// this.$u.route("/pageA/login/login")
|
||||||
|
// }, 2000)
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -338,6 +364,7 @@
|
|||||||
},
|
},
|
||||||
// 打开评论输入
|
// 打开评论输入
|
||||||
openKeyInput(data, index) {
|
openKeyInput(data, index) {
|
||||||
|
console.log(data);
|
||||||
let me = this;
|
let me = this;
|
||||||
this.is_focus = true;
|
this.is_focus = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -528,7 +555,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.comment-list-box {
|
.comment-list-box {
|
||||||
padding: 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -538,6 +565,7 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding-left: 100rpx;
|
padding-left: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.content-style {
|
.content-style {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
@@ -545,6 +573,16 @@
|
|||||||
color: #333;
|
color: #333;
|
||||||
lines: 2;
|
lines: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.more-content-box {
|
||||||
|
margin-left: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.more-comment {
|
||||||
|
margin: 10rpx 0;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
.comment-list-header {
|
.comment-list-header {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
@@ -324,18 +324,18 @@ export default {
|
|||||||
.btn {
|
.btn {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 154rpx;
|
width: 154rpx;
|
||||||
height: 54rpx;
|
// height: 54rpx;
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
// transform: translate(-50%, 0);
|
// transform: translate(-50%, 0);
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
border: 1rpx solid rgba(255,120,15,1);
|
border: 1rpx solid rgba(255,120,15,1);
|
||||||
color:rgba(255,120,15,1);
|
color:rgba(255,120,15,1);
|
||||||
// text-align: center;
|
text-align: center;
|
||||||
// line-height: 54rpx;
|
line-height: 54rpx;
|
||||||
// margin-right: -80rpx;
|
// margin-right: -80rpx;
|
||||||
display: flex;
|
// display: flex;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,8 +349,8 @@
|
|||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
|
"type": "transparent",
|
||||||
"titleColor": "#333333",
|
"titleColor": "#333333",
|
||||||
"backgroundColor": "rgba(255,255,255,0)",
|
|
||||||
"buttons": [
|
"buttons": [
|
||||||
// {
|
// {
|
||||||
// "type":"none",
|
// "type":"none",
|
||||||
@@ -367,6 +367,7 @@
|
|||||||
"fontSize":"22",
|
"fontSize":"22",
|
||||||
"fontSrc": "/static/fonts/cart.ttf",
|
"fontSrc": "/static/fonts/cart.ttf",
|
||||||
"color": "#FFFFFF"
|
"color": "#FFFFFF"
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchInput": {
|
"searchInput": {
|
||||||
|
|||||||
Reference in New Issue
Block a user