根据后台所给数据,在前台显示相应的星星数量

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hhy2014yatan/article/details/82181172
 <block wx:if='{{hospital.num > 0}}'><!--判断后台传入的数据>0再进行处理-->
        <view class='star' wx:for="{{ hospital.num-0}}">
          <image src='/images/organ/star.png' mode='aspectFit' class='star1'></image>
        </view>
        <text class='count'>{{hospital.judge}}人评价</text>
 </block>

猜你喜欢

转载自blog.csdn.net/hhy2014yatan/article/details/82181172