|
|
@@ -3,57 +3,88 @@
|
|
3
|
3
|
<!-- 差评标签和评分 -->
|
|
4
|
4
|
<view class="top-info">
|
|
5
|
5
|
<text class="bad-comment">差评</text>
|
|
6
|
|
- <text class="score">商品评分{{score}}★</text>
|
|
|
6
|
+ <text class="score">商品评分{{ score }}★</text>
|
|
7
|
7
|
</view>
|
|
8
|
8
|
<!-- 遍历展示每条差评内容 -->
|
|
9
|
|
- <view class="comment-content" v-for="(subComment, index) in commentList" :key="index">
|
|
10
|
|
- <text>{{subComment}}</text>
|
|
|
9
|
+ <view
|
|
|
10
|
+ class="comment-content"
|
|
|
11
|
+ v-for="(subComment, index) in commentList"
|
|
|
12
|
+ :key="index"
|
|
|
13
|
+ >
|
|
|
14
|
+ <text>{{ subComment }}</text>
|
|
11
|
15
|
</view>
|
|
12
|
16
|
<!-- 图片展示,这里假设图片数组为imgList -->
|
|
13
|
17
|
<view class="img-list">
|
|
14
|
|
- <image v-for="(img, index) in imgList" :key="index" :src="img" mode="aspectFill"></image>
|
|
|
18
|
+ <image
|
|
|
19
|
+ v-for="(img, index) in imgList"
|
|
|
20
|
+ :key="index"
|
|
|
21
|
+ :src="img"
|
|
|
22
|
+ mode="aspectFill"
|
|
|
23
|
+ ></image>
|
|
15
|
24
|
</view>
|
|
16
|
25
|
<!-- 遍历展示产品信息数组 -->
|
|
17
|
|
- <view class="product-info-content">
|
|
18
|
|
- <view class="product-info-list" v-for="(product, index) in productList" :key="index">
|
|
19
|
|
- <image class="product-img" :src="product.img" mode="aspectFill"></image>
|
|
20
|
|
- <view class="product-detail">
|
|
21
|
|
- <text>{{product.detail}}</text>
|
|
|
26
|
+ <view class="product-info-content">
|
|
|
27
|
+ <view
|
|
|
28
|
+ class="product-info-list"
|
|
|
29
|
+ v-for="(product, index) in productList"
|
|
|
30
|
+ :key="index"
|
|
|
31
|
+ >
|
|
|
32
|
+ <image class="product-img" :src="product.img" mode="aspectFill"></image>
|
|
|
33
|
+ <view class="product-detail">
|
|
|
34
|
+ <text>{{ product.detail }}</text>
|
|
|
35
|
+ </view>
|
|
22
|
36
|
</view>
|
|
23
|
37
|
</view>
|
|
24
|
|
- </view>
|
|
25
|
38
|
<!-- 操作按钮 -->
|
|
26
|
39
|
<view class="action-buttons">
|
|
27
|
40
|
<!-- <button class="order-btn">查看订单</button> -->
|
|
28
|
|
- <button class="reply-btn">回复评论</button>
|
|
|
41
|
+ <button class="reply-btn" @click="replyHandler">回复评论</button>
|
|
29
|
42
|
</view>
|
|
|
43
|
+ <ReplyModal ref="ReplyRefs"></ReplyModal>
|
|
30
|
44
|
</view>
|
|
31
|
45
|
</template>
|
|
32
|
46
|
<script>
|
|
|
47
|
+import ReplyModal from "./ReplyModal.vue";
|
|
33
|
48
|
export default {
|
|
|
49
|
+ components: { ReplyModal },
|
|
|
50
|
+ props: {
|
|
|
51
|
+ item: {
|
|
|
52
|
+ type: Object,
|
|
|
53
|
+ default: () => {},
|
|
|
54
|
+ },
|
|
|
55
|
+ },
|
|
|
56
|
+ index: {
|
|
|
57
|
+ type: Number,
|
|
|
58
|
+ default: 0,
|
|
|
59
|
+ },
|
|
34
|
60
|
data() {
|
|
35
|
61
|
return {
|
|
36
|
62
|
score: 1, // 假设差评情况下的评分,可根据实际逻辑调整
|
|
37
|
|
- commentList: [
|
|
38
|
|
- '包装破损',
|
|
39
|
|
- '物流速度极慢',
|
|
40
|
|
- '与描述不符'
|
|
41
|
|
- ], // 差评信息数组,可从后端获取
|
|
42
|
|
- imgList: ['/static/images/new_ui/delivery_man_dialog.png', '/static/images/new_ui/delivery_man_dialog.png'], // 图片地址数组,需替换为实际地址
|
|
|
63
|
+ commentList: ["包装破损", "物流速度极慢", "与描述不符"], // 差评信息数组,可从后端获取
|
|
|
64
|
+ imgList: [
|
|
|
65
|
+ "/static/images/new_ui/delivery_man_dialog.png",
|
|
|
66
|
+ "/static/images/new_ui/delivery_man_dialog.png",
|
|
|
67
|
+ ], // 图片地址数组,需替换为实际地址
|
|
43
|
68
|
productList: [
|
|
44
|
69
|
{
|
|
45
|
|
- img: '/static/images/new_ui/qcode.png',
|
|
46
|
|
- detail: '【直播现装】DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款'
|
|
|
70
|
+ img: "/static/images/new_ui/qcode.png",
|
|
|
71
|
+ detail:
|
|
|
72
|
+ "【直播现装】DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款",
|
|
47
|
73
|
},
|
|
48
|
74
|
{
|
|
49
|
|
- img: '/static/logo.png',
|
|
50
|
|
- detail: '小瓶子混装DIY 女孩玩具夜光大白DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款'
|
|
51
|
|
- }
|
|
52
|
|
- ] // 产品信息数组,包含图片和详细信息
|
|
|
75
|
+ img: "/static/logo.png",
|
|
|
76
|
+ detail:
|
|
|
77
|
+ "小瓶子混装DIY 女孩玩具夜光大白DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款",
|
|
|
78
|
+ },
|
|
|
79
|
+ ], // 产品信息数组,包含图片和详细信息
|
|
53
|
80
|
};
|
|
54
|
81
|
},
|
|
|
82
|
+ methods: {
|
|
|
83
|
+ replyHandler() {
|
|
|
84
|
+ this.$refs.ReplyRefs.open();
|
|
|
85
|
+ },
|
|
|
86
|
+ },
|
|
55
|
87
|
};
|
|
56
|
|
-
|
|
57
|
88
|
</script>
|
|
58
|
89
|
|
|
59
|
90
|
<style lang="scss" scoped>
|
|
|
@@ -61,7 +92,7 @@ export default {
|
|
61
|
92
|
background-color: #fff;
|
|
62
|
93
|
border-radius: 10rpx;
|
|
63
|
94
|
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
|
64
|
|
-// margin: 15rpx;
|
|
|
95
|
+ // margin: 15rpx;
|
|
65
|
96
|
padding: 15rpx;
|
|
66
|
97
|
width: calc(100% - 30rpx);
|
|
67
|
98
|
}
|
|
|
@@ -101,18 +132,17 @@ export default {
|
|
101
|
132
|
margin-right: 10rpx;
|
|
102
|
133
|
margin-bottom: 10rpx;
|
|
103
|
134
|
}
|
|
104
|
|
-.product-info-content{
|
|
105
|
|
- background: #f3f5f7;
|
|
|
135
|
+.product-info-content {
|
|
|
136
|
+ background: #f3f5f7;
|
|
106
|
137
|
border-radius: 10rpx;
|
|
107
|
138
|
padding: 10rpx 15rpx;
|
|
108
|
139
|
}
|
|
109
|
140
|
.product-info-list {
|
|
110
|
141
|
display: flex;
|
|
111
|
|
-// align-items: center;
|
|
|
142
|
+ // align-items: center;
|
|
112
|
143
|
padding-bottom: 12rpx;
|
|
113
|
144
|
padding-top: 12rpx;
|
|
114
|
145
|
font-size: 26rpx;
|
|
115
|
|
-
|
|
116
|
146
|
}
|
|
117
|
147
|
|
|
118
|
148
|
.product-img {
|
|
|
@@ -134,12 +164,10 @@ export default {
|
|
134
|
164
|
.order-btn,
|
|
135
|
165
|
.reply-btn {
|
|
136
|
166
|
flex: 1;
|
|
137
|
|
-
|
|
138
|
167
|
}
|
|
139
|
|
-.reply-btn{
|
|
140
|
|
- background: #187fdf;
|
|
141
|
|
- color: #fff;
|
|
|
168
|
+.reply-btn {
|
|
|
169
|
+ background: #187fdf;
|
|
|
170
|
+ color: #fff;
|
|
142
|
171
|
margin-right: 0rpx;
|
|
143
|
172
|
}
|
|
144
|
|
-
|
|
145
|
173
|
</style>
|