| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <template>
- <view class="review-list-page">
- <view class="list-container">
- <view class="review-card" v-for="item in reviews" :key="item.id">
- <view class="card-header">
- <text class="order-no">{{ item.orderNo }}</text>
- <text class="stars">{{ '★'.repeat(item.rating) }}{{ '☆'.repeat(5 - item.rating) }}</text>
- </view>
- <text class="review-content">{{ item.content }}</text>
- <view class="card-footer">
- <text class="time">{{ item.time }}</text>
- <text class="service-type">{{ item.serviceType }}</text>
- </view>
- </view>
- <view class="empty-state" v-if="reviews.length === 0">
- <text>暂无评价记录</text>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import { ref } from 'vue'
- import reviewMockData from '@/mock/review.json'
- const reviews = ref(reviewMockData)
- </script>
- <style lang="scss" scoped>
- .review-list-page { min-height: 100vh; background: #f7f8fa; }
- .list-container { padding: 24rpx; }
- .review-card { background: #fff; border-radius: 24rpx; padding: 32rpx; margin-bottom: 24rpx; }
- .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16rpx; }
- .order-no { font-size: 24rpx; color: #999; }
- .stars { color: #f7ca3e; font-size: 28rpx; }
- .review-content { font-size: 28rpx; color: #333; line-height: 1.6; margin-bottom: 20rpx; }
- .card-footer { display: flex; justify-content: space-between; padding-top: 16rpx; border-top: 1rpx solid #f5f5f5; }
- .time { font-size: 24rpx; color: #999; }
- .service-type { font-size: 24rpx; color: #ff9500; }
- .empty-state { text-align: center; padding: 100rpx 0; color: #999; font-size: 28rpx; }
- </style>
|