rating detail
This commit is contained in:
@@ -74,34 +74,39 @@
|
||||
</view>
|
||||
|
||||
<!-- 评分项列表 -->
|
||||
<view class="rating-list">
|
||||
<view class="rating-card" v-for="(item, index) in ratingItems" :key="item.id">
|
||||
<view class="card-header">
|
||||
<image class="item-avatar" :src="item.avatar" mode="aspectFill" />
|
||||
<text class="item-name">{{ item.name }}</text>
|
||||
<view class="rank-tag" v-if="item.rank <= 3">NO.{{ item.rank }}</view>
|
||||
<view class="flex-spacer"></view>
|
||||
<text class="item-score">{{ item.score }}</text>
|
||||
</view>
|
||||
<view class="quote-box">
|
||||
<text class="quote-text">“{{ item.quote }}”</text>
|
||||
</view>
|
||||
<view class="action-group">
|
||||
<view
|
||||
class="action-item"
|
||||
v-for="(action, aIndex) in actions"
|
||||
:key="aIndex"
|
||||
:class="{ active: item.userAction === action.value }"
|
||||
@tap="handleAction(item, action.value)"
|
||||
>
|
||||
<view class="action-icon-wrap" :class="'icon-' + action.value">
|
||||
<text class="emoji">{{ action.emoji }}</text>
|
||||
<view class="rating-list">
|
||||
<view
|
||||
class="rating-card"
|
||||
v-for="(item, index) in ratingItems"
|
||||
:key="item.id"
|
||||
@tap="goToDetail(item.id)"
|
||||
>
|
||||
<view class="card-header">
|
||||
<image class="item-avatar" :src="item.avatar" mode="aspectFill" />
|
||||
<text class="item-name">{{ item.name }}</text>
|
||||
<view class="rank-tag" v-if="item.rank <= 3">NO.{{ item.rank }}</view>
|
||||
<view class="flex-spacer"></view>
|
||||
<text class="item-score">{{ item.score }}</text>
|
||||
</view>
|
||||
<view class="quote-box">
|
||||
<text class="quote-text">“{{ item.quote }}”</text>
|
||||
</view>
|
||||
<view class="action-group">
|
||||
<view
|
||||
class="action-item"
|
||||
v-for="(action, aIndex) in actions"
|
||||
:key="aIndex"
|
||||
:class="{ active: item.userAction === action.value }"
|
||||
@tap.stop="handleAction(item, action.value)"
|
||||
>
|
||||
<view class="action-icon-wrap" :class="'icon-' + action.value">
|
||||
<text class="emoji">{{ action.emoji }}</text>
|
||||
</view>
|
||||
<text class="action-name">{{ action.label }}</text>
|
||||
</view>
|
||||
<text class="action-name">{{ action.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 热门锐评 -->
|
||||
<view class="comments-section">
|
||||
@@ -222,6 +227,12 @@ const handleAction = (item, actionValue) => {
|
||||
item.userAction = item.userAction === actionValue ? '' : actionValue;
|
||||
};
|
||||
|
||||
const goToDetail = (itemId) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/rating/detail?itemId=${itemId}`
|
||||
});
|
||||
};
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(() => {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user