commentdetail.wxml 8.2 KB
<view class="box" wx:if="{{commentdetail.status==1}}">
  <view class="iconbox">
    <image src="/img/chenggong_img.png" class="icon" mode="widthFix" />
  </view>
  <view class="tipsword">
    <view>点评正在审核中</view>
    <view>可在我的评论中查看审核状态</view>
  </view>
  <view class="btnbox">

    <view class="btnItem" bindtap="mycomment">我的评论</view>
  </view>
</view>

<view wx:else>
  <view class="photo">
    <view class="commentbox">
      <view class="comtop flextwo" catchtap="personpage" data-userid="{{commentdetail.user_id}}">
        <view class="comleft">
          <image src="{{commentdetail.avatar}}"></image>
        </view>
        <view class="comright">

          <view class="comrtop flexone">
            <view class="comrname">{{commentdetail.nickname}}</view>
            <view class="star starone flexone">
              <view class="staritem">
                <image src="/img/star.png" wx:if="{{commentdetail.user_level>=1}}"></image>
                <image src="/img/huangkong.png" wx:if="{{commentdetail.user_level<0.5}}"></image>
                <image src="/img/huangban.png" wx:if="{{commentdetail.user_level>=0.5&&commentdetail.user_level<1}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/star.png" wx:if="{{commentdetail.user_level>=2}}"></image>
                <image src="/img/huangkong.png" wx:if="{{commentdetail.user_level<1.5}}"></image>
                <image src="/img/huangban.png" wx:if="{{commentdetail.user_level>=1.5&&commentdetail.user_level<2}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/star.png" wx:if="{{commentdetail.user_level>=3}}"></image>
                <image src="/img/huangkong.png" wx:if="{{commentdetail.user_level<2.5}}"></image>
                <image src="/img/huangban.png" wx:if="{{commentdetail.user_level>=2.5&&commentdetail.user_level<3}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/star.png" wx:if="{{commentdetail.user_level>=4}}"></image>
                <image src="/img/huangkong.png" wx:if="{{commentdetail.user_level<3.5}}"></image>
                <image src="/img/huangban.png" wx:if="{{commentdetail.user_level>=3.5&&commentdetail.user_level<4}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/star.png" wx:if="{{commentdetail.user_level>=5}}"></image>
                <image src="/img/huangkong.png" wx:if="{{commentdetail.user_level<4.5}}"></image>
                <image src="/img/huangban.png" wx:if="{{commentdetail.user_level>=4.5&&commentdetail.user_level<5}}"></image>
              </view>
            </view>
          </view>
          <view class="comdate">{{commentdetail.createtime}}</view>

        </view>
      </view>
      <view class="comtext flexone">
        <view class="comleft"></view>

        <view class="comright">
          <view class="flexone fenxia">
            <view class="star starone flexone">
              <view class="staritem">
                <image src="/img/pingfenshi.png" wx:if="{{commentdetail.score>=1}}"></image>
                <image src="/img/lingfen_icon.png" wx:if="{{commentdetail.score<0.5}}"></image>
                <image src="/img/banke.png" wx:if="{{commentdetail.score>=0.5&&commentdetail.score<1}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/pingfenshi.png" wx:if="{{commentdetail.score>=2}}"></image>
                <image src="/img/lingfen_icon.png" wx:if="{{commentdetail.score<1.5}}"></image>
                <image src="/img/banke.png" wx:if="{{commentdetail.score>=1.5&&commentdetail.score<2}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/pingfenshi.png" wx:if="{{commentdetail.score>=3}}"></image>
                <image src="/img/lingfen_icon.png" wx:if="{{commentdetail.score<2.5}}"></image>
                <image src="/img/banke.png" wx:if="{{commentdetail.score>=2.5&&commentdetail.score<3}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/pingfenshi.png" wx:if="{{commentdetail.score>=4}}"></image>
                <image src="/img/lingfen_icon.png" wx:if="{{commentdetail.score<3.5}}"></image>
                <image src="/img/banke.png" wx:if="{{commentdetail.score>=3.5&&commentdetail.score<4}}"></image>
              </view>
              <view class="staritem">
                <image src="/img/pingfenshi.png" wx:if="{{commentdetail.score>=5}}"></image>
                <image src="/img/lingfen_icon.png" wx:if="{{commentdetail.score<4.5}}"></image>
                <image src="/img/banke.png" wx:if="{{commentdetail.score>=4.5&&commentdetail.score<5}}"></image>
              </view>
            </view>
            <view class="fen">{{commentdetail.score}}分</view>
          </view>
          <text class="textk">
            {{commentdetail.content}}
          </text>
          <view class="textboximg flexone" wx:if="{{commentdetail.images.length!=0}}">
          <!-- wx:for="{{commentdetail.images}}" wx:key="" -->
            <view class="boxitem" wx:for="{{commentdetail.images}}" wx:key=""  >
              <image src="{{item}}" mode="aspectFill" bindtap="previewimgk" data-index="index"></image>
            </view>
           
          </view>
        </view>
      </view>
    </view>
  </view>

  <view class="detailcommentbox" wx:if="{{commentdetail.comments.length!=0}}">
    <view class="phototopleft flexone">
      <view class="xiang">点评 </view>
      <view class="tiao">({{commentdetail.comments.length}}条)</view>
    </view>
    <view class="commentlist">

      <view class="commentitem" wx:for="{{commentdetail.comments}}" wx:key="">
        <view class="comtop flextwo">
          <view class="comleft">
            <image src="{{item.avatar}}"></image>
          </view>
          <view class="comright">
            <view class="listtop flextwo">
              <view class="comrtop">
                <view class="comrname">{{item.nickname}}</view>
                <view class="comdate">{{item.createtime}}</view>
              </view>
              <view class="listzan flexone" bindtap="xiaozan" data-id="{{item.id}}" data-index="{{index}}">
                <view class="lsitzanleft">
                  <image src="/img/xiaozan.png" wx:if="{{item.is_praise==0}}"></image>
                  <image src="/img/yizan.png" wx:else></image>
                </view>
                <view class="zannumber">{{item.praise_num}}</view>
              </view>
            </view>


          </view>
        </view>

        <view class="comtext flexone">
          <view class="comleft"></view>
          <view class="comright">
            <view class="text">
              {{item.content}}
            </view>
          </view>
        </view>
      </view>

    </view>


  </view>

  <!-- 底部评论 -->
  <view class="commentbototm flextwo">
    <view class="commbotleft {{sendactive==true?'commentleftactive':''}}">
      <input placeholder="写点什么..." placeholder-class="enter" bindinput='enterword' bindblur='finish' />
    </view>
    <view class="combotright flexone" wx:if="{{sendactive==false}}">
      <view class="combotitem flexone itemleft" bindtap="praise" data-id="{{commentdetail.id}}">
        <view class="combotitemleft">
          <image src="/img/dazan.png" wx:if="{{ispraise==false}}"></image>
          <image src="/img/yizan.png" wx:else></image>
        </view>
        <view class="combotzannumber {{ispraise==true?'praiseactive':''}}">{{commentdetail.praise_num}}</view>
      </view>
      <view class="combotitem flexone" bindtap="collect" data-id="{{commentdetail.id}}">
        <view class="combotitemleft">
          <image src="/img/xin.png" wx:if="{{iscollect==false}}"></image>
          <image src="/img/yicollect.png" wx:else></image>
        </view>
        <view class="combotzannumber {{iscollect==true?'praiseactive':''}}">{{commentdetail.collect_num}}</view>
      </view>
    </view>

    <view class="send" bindtap="{{sendshow==false?'send':''}}" wx:else>
      <view class="sendimg">
        <image src="/img/yousend.png"></image>
      </view>

    </view>
  </view>
</view>