1.在 .js 页面中,定义consume(人均消费)
2.在 .wxml 页面中,使用wx:if="{{advantage.consume != ‘’}}"判断人均消费consume是否为空,若不为空,则该元素显示
<!-- 人均消费, 若商家不填写则不显示,wx:if做判断 -->
<view class='consume' wx:if="{{advantage.consume != ''}}">¥{{advantage.consume}}/人</view>
<!-- 人均消费, 若商家不填写则不显示,wx:if做判断 -->
<view class='consume' wx:if="{{advantage.consume != ''}}">¥{{advantage.consume}}/人</view>