mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:53:25 +08:00
Merge branch 'dev' into 'master'
uniapp【优化】:商品详情评论显示图片 See merge request jianweie/coreshoppro!108
This commit is contained in:
@@ -74,7 +74,7 @@ export interface GoodsPictureListType {
|
||||
goodsId ?: number;
|
||||
id ?: number;
|
||||
images ?: string | null;
|
||||
imagesArr ?: Array<string> | string | null;
|
||||
imagesArr ?: Array<string>;
|
||||
isDisplay ?: boolean;
|
||||
mobile ?: string;
|
||||
nickName ?: string;
|
||||
|
||||
@@ -47,6 +47,19 @@
|
||||
font-size: 27rpx;
|
||||
color: #aaaaaa;
|
||||
}
|
||||
.img-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.sellerContent {
|
||||
font-size: 27rpx;
|
||||
margin-top: 15rpx;
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
<view class="content">{{ item.contentBody }}</view>
|
||||
<view class="time">{{ item.createTime }} </view>
|
||||
<view class="addon">{{ item.addon }}</view>
|
||||
<view class="sellerContent">
|
||||
<view class="img-box" v-if="item.imagesArr?.length > 0">
|
||||
<image v-for="cell,idx in item.imagesArr" @click="handlePreviewImg(item.imagesArr,idx)" :key="cell" class="img"
|
||||
:src="cell" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="sellerContent" v-if="item.sellerContent">
|
||||
商家回复:{{item.sellerContent}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -44,6 +48,14 @@
|
||||
const hanldeClickViewMore = () => {
|
||||
handleRouteNavigateTo(`/pages/goods/comment?id=${props.id}`);
|
||||
}
|
||||
|
||||
/** 预览图片 */
|
||||
const handlePreviewImg = (urls : Array<string>,current:number) => {
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
<view class="content">{{ item.contentBody }}</view>
|
||||
<view class="time">{{ item.createTime }} </view>
|
||||
<view class="addon">{{ item.addon }}</view>
|
||||
<view class="sellerContent">
|
||||
<view class="img-box" v-if="item.imagesArr?.length > 0">
|
||||
<image v-for="cell,idx in item.imagesArr" @click="handlePreviewImg(item.imagesArr,idx)" :key="cell" class="img"
|
||||
:src="cell" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="sellerContent" v-if="item.sellerContent">
|
||||
商家回复:{{item.sellerContent}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -74,6 +78,14 @@
|
||||
state.commentsList = state.commentsList.concat(goodsComment?.data?.list);
|
||||
}
|
||||
}
|
||||
|
||||
/** 预览图片 */
|
||||
const handlePreviewImg = (urls : Array<string>,current:number) => {
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.evaluate-box {
|
||||
@@ -119,6 +131,20 @@
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.img-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sellerContent {
|
||||
font-size: 27rpx;
|
||||
margin-top: 15rpx;
|
||||
|
||||
Reference in New Issue
Block a user