detail.wxml 12.9 KB
<!--pages/activity/detail/detail.wxml-->
<view class="content">
    <!--swiper-->
    <view class="head">
        <view class="position {{hidden_top?'hidden-active':'visible-active'}}">
            <view class="left">
                <!--<image src="../../../images/avatar@2x.png" class="user-avatar"></image>-->
                <image src="{{detail.userPic}}" class="user-avatar"></image>
                <block wx:if="{{detail.userType ===1}}"><!--userType  1注册用户,2后台用户(金v)-->
                    <image src="{{detail.sex === 1?'../../../images/man.png':'../../../images/women.png'}}"
                           class="sex-icon"></image>
                </block>
                <block wx:if="{{detail.userType ===2}}">
                    <text class="iconfont icon-vip sex-icon"></text>
                </block>
                <text>{{detail.userName}}</text>
            </view>
            <view class="right">
                <view class="collect" bindtap="collect">
                    <view class="iconfont icon-shoucang" wx:if="{{!is_collect}}"></view>
                    <view class="iconfont icon-shoucang2" wx:if="{{is_collect}}"></view>
                    <text>收藏</text>
                </view>
                <!--&lt;!&ndash;未收藏&ndash;&gt;-->
                <!--<view class='collect_box' catchtap='sethits_yes' data-index='{{index}}' wx:if='{{items.is_hits==0}}'>-->
                <!--<text class='iconfont icon-shoucang1 '></text>-->
                <!--<text class="collect_word">收藏</text>-->
                <!--</view>-->
                <!--&lt;!&ndash;已收藏&ndash;&gt;-->
                <!--<view class='collect_box active' catchtap='sethits_no' data-index='{{index}}' wx:else>-->
                <!--<text class='iconfont icon-shoucang0 star2'></text>-->
                <!--<text class="collect_word">收藏</text>-->
                <!--</view>-->
                <view class="share" bindtap="share">
                    <view class="iconfont icon-fenxiang2"></view>
                    <text>分享</text>
                </view>
            </view>
        </view>
        <view class='wrap_note canvas-mask' wx:if="{{show_canvas}}" bindtap='hideCanvasMask'>
            <view class="shadow">
                <canvas class='canvas-poster' canvas-id='canvas'></canvas>
                <view class="button-box">
                    <text bindtap="saveToPhone" class="save-to-phone">保存图片</text>
                    <button class="share-btn"  open-type="share">分享给好友</button>
                </view>
            </view>
            <view class="close-btn" bindtap="closeCanvas"><text class="iconfont icon-guanbi"></text></view>
        </view>
        <swiper indicator-dots="{{false}}" current="{{current}}" bindchange="swiperChange"
                style="height:{{img_heights[current_swiper]}}rpx;"
                autoplay="{{true}}" interval="3000" duration="1000">
            <block wx:for="{{detail.banner}}" wx:key="index">
                <navigator url="{{item}}" hover-class="navigator-hover">
                    <swiper-item>
                        <image src="{{item}}" data-id='{{index}}' class="slide-image" mode="widthFix"
                               bindload="imageLoad"/>
                        <!--<image src="http://pk86rwhci.bkt.clouddn.com/banner.png" class="slide-image"></image>-->
                    </swiper-item>
                </navigator>
            </block>
        </swiper>
        <view class="dots">
            <block wx:for="{{detail.banner}}" wx:key="index" wx:for-index="idx">
                <view class="dot{{idx == current_swiper ? ' active' : ''}}"></view>
            </block>
        </view>
    </view>

    <!--地点-->
    <view class="area-box">
        <view class="title-box">
            <view class="title">{{detail.title}}</view>
            <view class="over-time">
                <text class='' wx:if="{{detail.time[0].day !== '00'}}">{{detail.time[0].day}}天{{detail.time[0].hou}}:{{detail.time[0].min}}:{{detail.time[0].sec}}</text>
                <text class='' wx:else="">{{detail.time[0].hou}}:{{detail.time[0].min}}:{{detail.time[0].sec}}</text>
                <text class="text">后结束</text>
            </view>
            <!--<view>-->
            <!--<text class=''>{{detail.time[0].hou}}</text>-->
            <!--<text>:</text>-->
            <!--<text class=''>{{detail.time[0].min}}</text>-->
            <!--<text>:</text>-->
            <!--<text class=' '>{{detail.time[0].sec}}</text>-->
            <!--</view>-->
        </view>
        <view class="area-content">
            <text>{{detail.content}}</text>
            <!--云峰山风景区坐落于密云水库北不老屯镇,燕落村北三公里,处于-->
            <!--密云区东西两大风景区之间,东靠密云古北口 ──司马台长城──-->
            <!--雾灵山风景区。-->
        </view>
    </view>

    <!--详细时间-->
    <view class="detail-box">
        <text>时间:{{end_time}}</text>
        <text>餐厅:{{detail.name}}</text><!--餐厅-->
        <view class="position" bindtap="getNavigate">
            <text class="address">地址:{{detail.address}}</text><!--地址:-->
            <!--侨福芳草地B2 OPERA BOMBANA-->
            <text class="iconfont icon-location"></text>
        </view>
        <text>菜系:{{detail.selectName}}</text>
        <!--意大利菜-->
    </view>

    <!--已加入人员-->
    <view class="join-num">已加入人员</view>
    <view class="people-list" wx:if="{{join_people.length>0}}">
        <view class="people" wx:for="{{join_people}}" wx:key="index">
            <view class="bg">
                <image src="{{item.pic}}" class="people-img"></image>
                <block wx:if="{{item.userType ===1}}"><!--userType  1注册用户,2后台用户(金v)-->
                    <image src="{{item.sex === 1?'../../../images/man.png':'../../../images/women.png'}}"
                           class="sex-icon"></image>
                </block>
                <block wx:if="{{item.userType ===2}}">
                    <text class="iconfont icon-vip sex-icon"></text>
                </block>
            </view>
            <view class="people-num">
                <view class="name">{{item.name}}</view>
                <view class="num">{{item.number}}人</view>
            </view>
        </view>
    </view>

    <!--留言板 问一问-->
    <view class="comment-box">
        <view class="title-box">
            <text class="comment-num">留言板 ({{count}})</text>
            <view class="ask-btn" bindtap="ask">
                <text class="iconfont icon-bianji"></text>
                <text>问一问</text>
                <!--<input type="text" class="ask-input" bindinput="ask" focus="{{focus}}"/>-->
            </view>
        </view>

        <!--评论框-->
        <view wx:if="{{display}}" class="comment {{display?'t-active':''}}">
            <form bindsubmit="clickComment" bindreset="formReset" report-submit="true">
                <view class="common-box">
                    <input

                            auto-focus="{{display}}"
                            focus="{{display}}"
                            value="{{content}}"
                            cursor-spacing="50"
                            maxlength="300"
                            bindblur="blur"
                            bindinput="inputComment"
                            bindconfirm="confirm"
                            show-confirm-bar="{{false}}"
                            placeholder="{{placeholder}}"/>
                    <button class="send-box" form-type="submit">
                        <text class="send">发送</text>
                    </button>
                </view>
            </form>
        </view>

        <!--评论-->
        <view class="comment-list-box">
            <view class="comment-item" wx:for="{{commentList}}" wx:key="index" wx:for-item="comment">
                <view class="top-content">
                    <view class="top-left">
                        <!--<image src="../../../images/avatar@2x.png" class="release-img"></image>-->
                        <image src="{{comment.userPic}}" class="release-img"></image>
                        <block wx:if="{{comment.userType ===1}}"><!--userType  1注册用户,2后台用户(金v)-->
                            <image src="{{comment.sex === 1?'../../../images/man.png':'../../../images/women.png'}}"
                                   class="sex-icon"></image>
                        </block>
                        <block wx:if="{{comment.userType ===2}}">
                            <text class="iconfont icon-vip sex-icon"></text>
                        </block>
                        <text>{{comment.userName}} {{comment.create_time}}</text>
                    </view>
                    <view class="top-right" bindtap="clickZan" data-id="{{comment.id}}" data-index="{{index}}">
                        <text>{{comment.prefect}}</text>
                        <text class="iconfont icon-zan" wx:if="{{!comment.is_prefect}}"></text>
                        <text class="iconfont icon-z-likeFill" wx:if="{{comment.is_prefect}}"></text>
                    </view>
                </view>
                <view class="comment-detail">
                    <view class="user-release">
                        <view class="release-comment">{{comment.content}}</view>
                        <text class="reply-btn" bindtap="reply" data-id="{{comment.id}}">回复</text>
                    </view>
                    <view class="user-reply" wx:if="{{comment.son.length>0}}">
                        <view class='triangle'></view>
                        <block wx:for="{{comment.son}}" wx:key="index">
                            <!--<view class="comment">-->
                            <!--<text class="reply-name">蚂蚁: </text>-->
                            <!--<text>{{item.content}}第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>-->
                            <!--</view>-->
                            <view class="reply">
                                <text class="reply-name">{{detail.userName}}</text>
                                <text>回复</text>
                                <text class="reply-name">{{comment.userName}}:</text>
                                <text>{{item.content}}</text>
                            </view>
                        </block>
                    </view>
                </view>
            </view>
        </view>
    </view>

    <!--底部btn-->
    <view class="bottom-btn" wx:if="{{!display}}">
        <view class="add-btn">
            <view class="input_box">
                <view class="iconfont icon-jian {{num==1?'disable':''}}" bindtap='minusCount'></view>
                <view class='item_cart_num'>{{num}}</view>
                <view class='iconfont icon-jia1' bindtap='addCount'></view>
            </view>
        </view>
        <form bindsubmit="confirmJoin" bindreset="formReset" report-submit="true">
            <!--(0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
            <button class="confirm-join-btn {{(is_send === 2 && detail.status === 8) || (is_send === 2 && detail.status === 2)?'black':''}}" form-type="submit">
                <text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
                <text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
                <text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼餐</text>
                <text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼餐</text>
                <text wx:if="{{detail.status === 3}}">未拼成</text>
                <text wx:if="{{detail.status === 4}}">待完成</text>
                <text wx:if="{{detail.status === 5 || detail.status === 10}}">已取消</text>
                <text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text>
                <!--<text wx:if="{{detail.status === 8}}">已拼成</text>-->
                <text wx:if="{{detail.status === 9}}">已删除</text>
                <text wx:if="{{detail.status === 11}}">已过期</text>
            </button>
        </form>
        <!--<view class="confirm-join-btn" bindtap="confirmJoin">-->
        <!--<text>确认拼餐</text>-->
        <!--</view>-->
    </view>

    <!--发布成功弹框-->
    <view class="modal" wx:if="{{is_showRelease_modal}}" catchtouchmove="disableScroll">
        <image class="sorry-img" src="../../../images/success@2x.png"></image>
        <view class="title">恭喜您拼餐成功</view>
        <view class="view-btn" catchtap="goMyRelease">查看我的订单</view>
        <view class="complete-btn" catchtap="goBack">再逛逛</view>
    </view>
    <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
          catchtouchmove="disableScroll"></view>
</view>