Commit 65f276ce authored by zhengke's avatar zhengke

修改

parent 6a4f8fc2
......@@ -20,12 +20,12 @@
<view class="content" v-for="(x, i) in comments" :key="i">
<view class="u-box">
<view class="user">
<u-avatar :src="x.avatar" :size="50"></u-avatar>
<text style="margin-left: 10px;">{{ x.nickname }}</text>
<u-avatar :src="x.UserPhotoPath" :size="50"></u-avatar>
<text style="margin-left: 10px;">{{ x.UserName }}</text>
</view>
<view class="timer">{{ x.time }}</view>
<view class="timer">{{ x.CreateDate }}</view>
</view>
<view class="ucontent">{{ x.content }}</view>
<view class="ucontent">{{ x.Content }}</view>
<view class="imagebox" v-for="(y, yi) in x.formatPic" :key="yi">
<view
class="item"
......@@ -90,6 +90,12 @@ export default {
loading: "努力加载中",
nomore: "没有更多评论了",
},
msg:{
pageIndex:1,
pageSize:20,
GoodsId:0,
CommentGrade:0
}
};
},
onLoad(option) {
......@@ -140,28 +146,27 @@ export default {
this.isover = false;
this.loading = true;
this.showLoading = this.page != 1;
this.request(
this.msg.GoodsId=this.id;
this.request2(
{
url: "",
data: {
r: "api/goods/comments-list",
goods_id: this.id,
page: this.page,
status: this.commentCount.length>0?this.commentCount[this.current].index:0,
},
url: "/api/AppletOrder/GetAppletGoodsCommentPageList",
data: this.msg,
},
(res) => {
this.comments = res.data.comments;
this.comments = res.data.pageData;
this.comments.forEach((x) => {
x.formatPic = this.formatPic(x.pic_url);
x.formatPic = this.formatPic(x.CommentImgList);
});
//TODO 缺陷待处理
this.commentCount = res.data.comment_count;
// this.commentCount = res.data.comment_count;
this.commentCount = res.data.pageData;
this.pageCount = Math.ceil(
parseFloat(this.commentCount[0].count) / 10.0
// parseFloat(this.commentCount[0].count) / 10.0
parseFloat(res.data.count) / 10.0
);
this.commentCount.forEach((x) => {
x.name = x.name + "(" + x.count + ")";
x.name = x.UserName + "(" + x.Content + ")";
});
this.showLoading = true;
if (this.pageCount == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment