<view class="page-container">
  <view class="card" wx:for="{{items}}" wx:key="id" wx:for-item="it">
    <view class="rv-goods">
      <image class="rv-img" src="{{it.image}}" mode="aspectFill" />
      <view class="rv-name text-ellipsis-2">{{it.product_name}}</view>
    </view>

    <!-- 星级 -->
    <view class="rv-stars">
      <text class="star {{star}" wx:for="{{reviewMap[it.id].stars}}" wx:key="index" wx:for-item="star"
            data-id="{{it.id}}" data-rating="{{index + 1}}" bindtap="onRating">{{star ? '★' : '☆'}}</text>
    </view>

    <!-- 评价内容 -->
    <textarea class="rv-input" data-id="{{it.id}}" bindinput="onContent"
              placeholder="{{mode === 'followup' ? '补充评价内容...' : '说说商品的使用感受...'}}" maxlength="500"
              value="{{reviewMap[it.id].content}}" />
  </view>

  <view class="submit-wrap" style="margin: 24rpx">
    <button class="btn btn-primary btn-block" bindtap="submit" disabled="{{submitting}}">提交评价</button>
  </view>
</view>
