comment.wxml 6.02 KB
<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
<view class="container">
  <view class="type-navbar padding">
    <view class="type-box fs28 type-navbar-item {{activeStatus==item.status?'type-item-on':''}}" data-status="{{item.status}}" wx:for="{{categories}}" wx:key="{{index}}">
      <view class="title_width" bindtap="changeTab" data-status="{{item.status}}">{{item.name}}</view>
    </view>

  </view>

  <!-- 无评价 -->
  <view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}">
    <view class="flex-level">
      <image src="{{iurl}}/miniapp/images/comment.png"></image>
    </view>
    <view class="flex-level fs30 xc-ash">当前暂无评价</view>
    <view class="flex-level">
      <navigator url="/pages/index/index/index" bindtap="goto">
        <view class="flex-center fs28 white">去首页逛逛</view>
      </navigator>
    </view>
  </view>

  <!-- 待评价栏 -->
  <view class="stay_evaluate" wx:if="{{comments.length>0}}" wx:for="{{comments}}">

    <!-- 商品编号和状态 -->
    <view class="Commodity_number flex-vertical-between fs26 padding border_bottom">
      <!--商品编号 -->
      <view>订单编号:{{item.order_sn}}</view>
      <!-- 商品评价状态 -->
      <view class="xc-wc">{{item.comment_id>0?'已评价':'待评价'}}</view>
    </view>

    <!-- 商品详情集合 -->
    <view class="detail_commoditys">
      <!-- 单个商品 -->
      <view>
        <navigator class="detail_commodity flex-vertical padding border_bottom" url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id}}">
          <!-- 商品图片 -->
          <image src="{{item.original_img}}" binderror="bind_bnerr2" data-errorimg="comments[{{index}}].original_img"></image>
          <!-- 商品内容 -->
          <view class="Commodity_content">
            <view class="Commodity_goods">
              <!-- 商品名称 -->
              <view class="goods_name ellipsis-2 fs26">{{item.goods_name}}</view>
              <!-- 商品规格 -->
              <view class="Commodity_spec fs20">
                <view class="flex-center">{{item.goods_color+item.goods_spec.length>-1?item.goods_color+item.goods_spec:'规格1'}}</view>
              </view>
            </view>
            <!-- 商品价格数量 -->
            <view class="Commodity_money flex-vertical-between baseline">
              <!-- 商品价格 -->
              <view class="flex-vertical xc-wc baseline">
                <view class="fs20">¥</view>
                <view class="fs30">{{filter.toFix(item.goods_price,2)}}</view>
              </view>
              <view class="fs26">x{{item.goods_num}}</view>

            </view>
          </view>
        </navigator>
        <!-- 评论信息 -->
        <view class="Commodity_evaluation padding border_bottom" wx:if="{{item.comment_id>0}}">
          <!-- 评价星级 -->
          <view class="starss flex fs26">
            <view class="commen">评价:</view>
            <view class="stars">
              <image src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image>
            </view>
          </view>
          <!-- 评价内容 -->
          <view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view>
          <view class="Comment_images flex">
            <image wx:if="{{item.source_type==0  && aitem.length>10}}" data-index="{{index}}" src="{{iurl+aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image>
            <image wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{iurl+aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image>

          </view>

          <!-- 商家回复 -->
          <view class="reply rel" wx:if="{{item.replay_list}}">
            <view class="line_bulge"></view>
            <view class="shop-reply fs26">店家回复: </view>
            <view class="shop-font fs24" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}">
              {{r_item.content}}
            </view>
          </view>


          <!-- 评价时间 -->
          <view class="fs24 xc-ash comment_addtime flex-vertical">{{item.comment_addtime}}</view>
        </view>
      </view>
      <!-- 去评价 -->
      <view class="commodity_evaluate flex jc_sb padding baseline fs26">
        <!-- 商品数量 -->
        <view class="commodity_smy flex">
          <view>共{{item.goods_num}}件商品</view>
          <!-- 商品总价格 -->
          <view class="flex commodity_money">
            <view>合计:</view>
            <view class="flex baseline xc-wc">
              <view class="fs24">¥</view>
              <view>{{filter.toFix(item.goods_price,2)}}</view>
            </view>
          </view>
        </view>
        <view class="flex">
          <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">
            <view>查看订单</view>
          </navigator>

          <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level comment_go" url="/packageB/pages/user/view_comment/view_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}">
            <view>查看评价</view>
          </navigator>

          <navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="{{item.comment_id>0?'/packageB/pages/user/add_comment/add_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}':''}}">
            <view class="fs24">去评价</view>
          </navigator>
        </view>
      </view>
    </view>
  </view>

  <view class="get_bottom fs26" wx:if="{{comments.length>0 && is_no_more}}">已经加载到底部</view>

</view>