Commit 65f276ce authored by zhengke's avatar zhengke

修改

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