card.wxml 3.51 KB
<!--components/2.0/pinglun/card.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="view flex align-center justify-center margin-bottom {{cla}}">
    <view class="cu-avatar round lg" style="background-image: url('{{post.isnoshow==1 ? 'http://nosqn.colorcun.com/noshow.jpg' : post.author_image}}');width: 72rpx;height: 72rpx;border-radius: 50%;" ></view>
    <view class="flex-treble flex flex-direction margin-left-sm">
        <view class="txt-24-h text-bold margin-bottom-sm" style="margin-bottom: 10rpx;">{{post.isnoshow==1 ? '匿名用户' : post.author}}</view>
        <stat wx:if="{{post.grade}}" value="{{post.grade}}" cla="card" disabled></stat>
    </view>
    <view class="text-gray txt-24-h {{hasStatus?'hasStatus status-'+post.status:''}}">{{util.unixtoTime(post.create_time,'YYYY-MM-DD')}}</view>
</view>
<view class="view flex align-start justify-center">
    <view class="cu-avatar round lg" style="background-color: rgba(0,0,0,0);"></view>
    <view class="flex-treble flex flex-direction margin-left-sm">
        <view class="text-df margin-bottom-xs" wx:if="{{post.text}}" style="word-break:break-all;">{{post.text}}</view>
        <view wx:if="{{post.eval_label}}" class="text-df margin-bottom-xs text-blue">#{{post.eval_label}}</view>
        <view class="grid col-3 grid-square" wx:if="{{enclosure.length>0}}">
            <block wx:for="{{enclosure}}" wx:key="enclosure">
                <view wx:if="{{!item.avinfo}}" class="bg-image" style="background-image: url('{{item.url}}')" catchtap="displayImage" data-index="{{index}}">
                </view>
                <view wx:else class="bg-image" catchtap="displayImage" data-index="{{index}}">
                    <video 
                        class="videoBox" 
                        src="{{item.url}}"
                        controls='{{false}}'
                        show-center-play-btn='{{false}}'	
                        enable-progress-gesture='{{false}}'
                    />
                    <view class="bg-image-video view" wx:if="{{item.avinfo}}"></view>
                </view>
            </block>
        </view>
        <navigator url="/pages/reserve/shopHome?id={{post.sid}}" catchtap="catchtap"
                   hover-class="navigator-hover" wx:if="{{hasSeller && post.sellerinfo}}">
            <view class="view padding-sm flex align-center radius10 margin-bottom-sm" style="background-color: #F8F8F8;">
                <view class="cu-avatar lg radius10 margin-right-sm"
                      style="background-image: url('{{post.sellerinfo.seller_image}}')"></view>
                <view class="flex-treble flex flex-direction">
                    <view class="txt-26-h text-bold" style="margin-bottom: 6rpx;">{{post.sellerinfo.sellername}}</view>
                    <view class="flex txt-24-h text-gray">
                        <view>{{post.sellerinfo.name}}</view>
                        <view>{{post.sellerinfo.c_info}}</view>
                        <view wx:if="{{post.sellerinfo.average>0}}">¥{{post.sellerinfo.average}}/人</view>
                    </view>
                </view>
                <view class="more"></view>
            </view>
        </navigator>
        <view class="view padding-sm flex align-start flex-direction radius10" wx:if="{{post.reply}}"
              style="background-color: #F8F8F8;">
            <view class="text-bold txt-26-h margin-bottom-xs">商家回复</view>
            <view class="text-26" style="color:#666666;word-break:break-all;">{{post.reply.text}}</view>
        </view>
    </view>
</view>