|
@@ -130,6 +130,16 @@
|
|
|
<text>{{ item.statusText }}</text>
|
|
<text>{{ item.statusText }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <!-- 健康问卷个性化调整提示条(diet.food.healthAdjustUi · B2):blocked 红条 / warning 黄条 / boost 绿条,normal 或缺失不渲染 -->
|
|
|
|
|
+ <view class="adjustment-tip" v-if="item.adjustment === 'blocked'">
|
|
|
|
|
+ <text class="adjustment-tip-text adjustment-tip-blocked">⚠ 健康问卷不建议:{{ item.adjustmentReason }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="adjustment-tip" v-if="item.adjustment === 'warning'">
|
|
|
|
|
+ <text class="adjustment-tip-text adjustment-tip-warning">注意:{{ item.adjustmentReason }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="adjustment-tip" v-if="item.adjustment === 'boost'">
|
|
|
|
|
+ <text class="adjustment-tip-text adjustment-tip-boost">✓ 符合饮食习惯偏好</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -387,6 +397,13 @@ export default {
|
|
|
result = result.slice().sort(sortFn)
|
|
result = result.slice().sort(sortFn)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 健康问卷个性化调整分组(diet.food.healthAdjustUi · B3):suitable Tab 中 blocked 项整体排到列表末尾
|
|
|
|
|
+ // (保持可见但不置顶,组内仍按既有分值排序,stable 分组;unsuitable / all 位置不变、仅带提示条)
|
|
|
|
|
+ if (self.filterType === 'suitable') {
|
|
|
|
|
+ result = result.filter(function(f) { return f.adjustment !== 'blocked' })
|
|
|
|
|
+ .concat(result.filter(function(f) { return f.adjustment === 'blocked' }))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return result
|
|
return result
|
|
|
},
|
|
},
|
|
|
pagedFoods: function() {
|
|
pagedFoods: function() {
|
|
@@ -1340,6 +1357,33 @@ export default {
|
|
|
color: $mat-red;
|
|
color: $mat-red;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/* 健康问卷个性化调整提示条(diet.food.healthAdjustUi · B2) */
|
|
|
|
|
+.adjustment-tip {
|
|
|
|
|
+ margin-top: 12rpx;
|
|
|
|
|
+ align-self: flex-start;
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.adjustment-tip-text {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 6rpx 16rpx;
|
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
|
+ font-size: calc(22rpx * var(--font-scale, 1));
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+}
|
|
|
|
|
+.adjustment-tip-blocked {
|
|
|
|
|
+ background: $status-danger-soft;
|
|
|
|
|
+ color: $status-danger;
|
|
|
|
|
+}
|
|
|
|
|
+.adjustment-tip-warning {
|
|
|
|
|
+ background: $status-warning-soft;
|
|
|
|
|
+ color: $status-warning;
|
|
|
|
|
+}
|
|
|
|
|
+.adjustment-tip-boost {
|
|
|
|
|
+ background: $status-success-soft;
|
|
|
|
|
+ color: $status-success;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/* 空状态 */
|
|
/* 空状态 */
|
|
|
.food-empty-state {
|
|
.food-empty-state {
|
|
|
text-align: center;
|
|
text-align: center;
|