Commit 6a4f8fc2 authored by zhengke's avatar zhengke

修改

parent cfaed020
......@@ -139,17 +139,17 @@
<view
class="sku-box u-skeleton-rect"
v-if="comments.comments.length == 0 && setting.is_comment == '1'"
v-if="comments.length == 0 && setting.is_comment == '1'"
>
<view class="label">暂无评论信息</view>
</view>
<view class="comment" v-if="comments.comments.length > 0">
<view class="comment" v-if="comments.length > 0">
<view class="chead">
<u-section
:bold="false"
:sub-color="secondary"
:show-split="false"
:title="`商品评价(${comments.comments.length})`"
:title="`商品评价(${comments.length})`"
sub-title="查看更多"
@click="clickCommentHandler"
font-size="24"
......@@ -159,16 +159,16 @@
<view class="u-box">
<view class="user">
<u-avatar
:src="comments.comments[0].avatar"
:src="comments[0].UserPhotoPath"
:size="50"
></u-avatar>
<text style="margin-left: 10px;">{{
comments.comments[0].nickname
comments[0].UserName
}}</text>
</view>
<view class="timer">{{ comments.comments[0].time }}</view>
<view class="timer">{{ comments[0].CreateDate }}</view>
</view>
<view class="ucontent">{{ comments.comments[0].content }}</view>
<view class="ucontent">{{ comments[0].Content }}</view>
</view>
</view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent"
......@@ -219,7 +219,7 @@
v-if="!isExsitGoods"
></u-empty>
<share
:good-id="id"
:id="id"
v-if="showShare"
:good-name="g.name"
:images="g.pic_url"
......@@ -258,7 +258,13 @@ export default {
prevPage: "",
//自定义接手传递
opTionObj: {},
showShare:false
showShare:false,
msg:{
pageIndex:1,
pageSize:20,
GoodsId:0,
CommentGrade:0
}
};
},
components: {
......@@ -269,7 +275,6 @@ export default {
share,
},
onLoad(option) {
console.log(option, "optionnnn");
this.opTionObj = option;
this.id = option.GoodsId ? option.GoodsId : 29; //40887 59512 46942
this.init();
......@@ -333,7 +338,6 @@ export default {
this.skuimage.push(x.pic_url);
}
});
console.log(this.skuimage);
var richtext = this.g.detail;
richtext = richtext.replace(
/<img/g,
......@@ -372,18 +376,16 @@ export default {
});
},
initComments() {
this.request(
this.msg.GoodsId=this.id;
console.log(this.msg,'msg');
this.request2(
{
url: "",
data: {
r: "api/goods/comments-list",
goods_id: this.id,
page: 1,
status: 0,
},
url: "/api/AppletOrder/GetAppletGoodsCommentPageList",
data: this.msg,
},
(res) => {
this.comments = res.data;
console.log(res,'pinglun');
this.comments = res.data.pageData;
// this.initRecommend();
}
);
......@@ -398,6 +400,7 @@ export default {
},
(res) => {
this.recommend = res.data.List;
console.log(this.recommend,'recommeds');
}
);
},
......
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