<!--pages/my/my.wxml-->
<view class="head-box">
    <view wx:if="{{isLogin}}"  >
        <view class="head" bindtap='uploadImg'>
            <!--背景图-->
            <image class='banner_img' wx:if="{{images !== ''}}" src='{{images}}' mode="aspectFill"></image>
            <image class='banner_img' wx:else="" src="{{user.bg_pic}}" mode="aspectFill"></image>
        </view>
        <!--<view class="margin">-->
        <image src="{{user.pic}}" class="user-img"></image>
        <!--type  :1注册用户,2后台用户金v-->
        <!--<text class="iconfont icon-vip" wx:if="{{user.type === 2}}"></text>-->
        <!--<image src="{{user.sex === 1?'../../images/man.png':'../../images/women.png'}}" class="sex-icon"></image>-->
        <block wx:if="{{user.userType ===1}}"><!--userType  1注册用户,2后台用户(金v)-->
            <image src="{{user.sex === 1?'../../images/man.png':'../../images/women.png'}}"
                   class="sex-icon"></image>
        </block>
        <block wx:if="{{user.userType ===2}}">
            <text class="iconfont icon-vip sex-icon"></text>
        </block>
        <view class="left">
                <view class="class-box">
                    <image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
                    <image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
                    <image src="../../images/mu@2x.png" wx:if="{{user.level === 3}}"></image>
                    <text wx:if="{{user.level === 1}}">金火柴</text>
                    <text wx:if="{{user.level === 2}}" class="{{user.level === 2?'change-yin':''}}">银火柴</text>
                    <text wx:if="{{user.level === 3}}" class="{{user.level === 3?'change-mu':''}}">木火柴</text>
                </view>
            </view>
            <view class="right">
                <view class="name">{{user.name}}</view>
                <view class="area">
                    <view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
                    <text>{{user.city || '定位'}}</text>
                </view>
                <view class="qian">{{user.introduce || '个人简介'}}</view>
            </view>
        <!--</view>-->
        <view class="iconfont icon-shezhi" bindtap="EditUserInfo"></view>
        <!--<image src="../../images/user-img@2x.png" class="user-img"></image>-->
    </view>
    <view wx:if="{{!isLogin}}" class="login-box">
        <button class="btn" open-type="getUserInfo" bindgetuserinfo="login">登录</button>
    </view>
</view>


<view class="menu-box">
    <view class="btn-box" bindtap="goMyCollect">
        <image src="../../images/collect@2x.png" class="icon-money"></image>
        <view class="right">
            <view class="text">我的收藏</view>
            <image src="../../images/arrow@2x.png" class="arrow"></image>
        </view>
    </view>
    <view class="btn-box" bindtap="goMyWallet">
        <image src="../../images/mywallet@2x.png"  class="icon-safety"></image>
        <view class="right">
            <view class="text">我的钱包</view>
            <image src="../../images/arrow@2x.png" class="arrow"></image>
        </view>
    </view>
    <view class="btn-box" bindtap="goSuggest">
        <image src="../../images/sugest@2x.png"  class="icon-authentication"></image>
        <view class="right">
            <view class="text">意见反馈</view>
            <image src="../../images/arrow@2x.png" class="arrow"></image>
        </view>
    </view>
    <view class="btn-box" bindtap="goAbout">
        <image src="../../images/about@2x.png"  class="icon-address"></image>
        <view class="right">
            <view class="text">关于火柴西路</view>
            <image src="../../images/arrow@2x.png" class="arrow"></image>
        </view>
    </view>
    <button class="btn-box button" open-type="contact" bindcontact="handleContact">
        <image src="../../images/concat@2x.png"  class="icon-customer"></image>
        <view class="right">
            <view class="text">联系客服</view>
            <image src="../../images/arrow@2x.png" class="arrow"></image>
        </view>
    </button>
</view>
<!--底部tab-->
<import src="/templates/templates.wxml" />
<template is="tabBar" data='{{...tabcurrent}}' />
<!--去答题弹框-->
<view class="input-box"  wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
    <image class="sorry-img" src="../../images/sorry@2x.png"></image>
    <view class="title">目前只对</view>
    <view class="title">首批会员开放发布功能</view>
    <view class="tips">答题后可能获得第一批次入场卷</view>
    <view class="answer-btn" catchtap="goAnswer">答题</view>
</view>
<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--去完善个人信息弹框-->
<view class="input-box"  wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
    <image class="sorry-img" src="../../images/user_info@2x.png"></image>
    <view class="title">为了更好的体验</view>
    <view class="title">请先完善个人信息</view>
    <view class="answer-btn" bindtap="goUserInfo">完成</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--发布-->
<view class="release-btn-box" wx:if="{{is_showRelease}}">
    <view class="left-btn"  bindtap="releaseMeal">
        <image src="../../images/pincan@2x.png"></image>
        <view class="text">发布拼餐</view>
    </view>
    <view class="right-btn" bindtap="releaseActivity">
        <image src="../../images/pinhuodong@2x.png"></image>
        <view class="text">发布拼活动</view>
    </view>
</view>
<view class="modal_box" wx:if="{{is_showRelease}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>

<!--分数>=80弹框-->
<view class="input-box score-box"  wx:if="{{show_gold_modal}}" catchtouchmove="disableScroll">
    <image class="sorry-img gold-img" src="../../images/gold@2x.png"></image>
    <view class="title text">恭喜您</view>
    <view class="title text">获得首批入场卷</view>
    <view class="tips text">并得到一枚金火柴等级勋章</view>
    <view class="tips share-text">将喜悦分享给好友</view>
    <view class="share-box">
        <view class="answer-btn close" catchtap="close">完成</view>
        <button class="answer-btn share" open-type="share">去分享</button>
    </view>
</view>
<view class="modal_box" wx:if="{{show_gold_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>

<!--分数<80弹框-->
<view class="input-box score-box normal-box"  wx:if="{{show_normal_modal}}" catchtouchmove="disableScroll">
    <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image>
    <view class="title text margin">恭喜您获得入场卷</view>
    <view class="title text margin">等待开放权限</view>
    <view class="answer-btn close close-btn" catchtap="close">随便看看</view>
</view>
<view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>

<!--答完题点击发布按钮弹框-->
<view class="input-box score-box normal-box" wx:if="{{is_showResult}}" catchtouchmove="disableScroll">
    <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image>
    <view class="title text margin">已通过测试</view>
    <view class="title text margin">等待开放权限</view>
    <view class="answer-btn close close-btn" catchtap="close">随便看看</view>
</view>
<view class="modal_box" wx:if="{{is_showResult}}" bindtap="handleBackground"
      catchtouchmove="disableScroll"></view>