<!-- 初始模板 -->
<view>
  <navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar>
  <!-- style="padding-top:{{navigationBarHeight}}" -->
  <view class="container">
    <view style="height:{{navigationBarHeight}} "></view>
    <!-- 会员信息 -->
    <view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}">
      <!-- 所属集团 -->
      <view class="underling" bindtap="goSquareList" wx:if="{{squareName}}">
        <image class="underlingImg" mode="widthFix" src="https://formall.oss-accelerate.aliyuncs.com/cimg/dingwei.png"></image>
        <view class="underlingName">{{squareName}} ↓</view>
      </view>
      <view class='userinfo' wx:if="{{ifStoreApp!=1}}">
        <!-- 头像 -->
        <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}">
          <view class="user-avatar">
            <!-- <open-data class="open" type="userAvatarUrl"></open-data> -->
            <image wx:if="{{userAvatarUrl.length>1}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image>
            <image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image>
          </view>
          <!-- 成长值 -->
          <view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}">
            <view class='nameBox'>
              <!-- <open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> -->
              <p class="userName">{{userName}}</p>
              <view class='chengzhangBox' style='background:{{chengzhangBox}}'>
                <text class='chengzhang'>{{levelName}}</text>
              </view>
            </view>
            <view class="view">
              <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" />
              <view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级</view>
            </view>
          </view>
        </view>

        <!-- 二维码 -->
        <view class='qrcode fr' bindtap='qrcode' style="{{typeLsit.sy_qrc.styleClass}}">
          <image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image>
        </view>
      </view>
      <!-- banner -->
      <c-banner wx:key="unique" list="{{list}}" />
      <!-- 频道 -->
      <view class="channelBox" wx:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}">
        <view class='kjBox' bindtap='goPage' data-obj="{{item}}" wx:for="{{moduleList}}" wx:key="index">
          <image class="img" src='{{item.icon}}' mode='aspectFill'></image>
          <view class="text">{{item.name}}</view>
        </view>
      </view>
      <view class='channelBox' wx:if="{{ifStoreApp==1}}" style="width:525rpx;">
        <view class='kjBox' bindtap='gotoBargain'>
          <image class="img" src='{{kanjia}}' mode='aspectFill'></image>
          <text>砍价</text>
        </view>
        <view class='kjBox' bindtap='gotoSpellGroup'>
          <image class="img" src='{{pintuan}}' mode='aspectFill'></image>
          <text>拼团</text>
        </view>
        <view class='kjBox' bindtap='gotoRushBuy'>
          <image class="img" src='{{xiaofeika}}' mode='aspectFill'></image>
          <text>限时抢购</text>
        </view>
      </view>
    </view>
    <view class='toutiao1' wx:if="{{showQg&&ifStoreApp!=1}}">
      <view class='xianshi' bindtap='gotoRushBuy'>
        <text>限时专区</text>
        <text>限时惊爆价 轻松拎回家</text>
      </view>
      <view class='xsCon'>
        <view wx:for="{{xslist}}" wx:key="index">
          <view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap='gotodetail'>
            <image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image>
            <view class='imTit'>{{xslist[index].title}}</view>
          </view>
        </view>
        <view>
          <view class='igBox' bindtap='gotoRushBuy'>
            <image src='{{more}}' mode='widthFix' class='more'></image>
            <view class='imTit'>更多...</view>
          </view>
        </view>
      </view>
    </view>

    <!-- 爆款专区 -->
    <c-hot id="hot" />
    <view class='product' wx:if="{{showTopic}}" bindtap='gotoTopic'>
      <image src='{{cover}}' mode='widthFix'></image>
    </view>


    <c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" />
    <!-- 游戏蒙层 -->
    <g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" />
    <!-- 广告蒙层 -->
    <c-advertisement id="advertisement" wx:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" />
  </view>
  <!-- 顶部签到成长值 -->
  <view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}">
    <!-- <open-data class="open" type="userAvatarUrl"></open-data> -->
    <image class="userAvatarUrl" src="{{userAvatarUrl}}"></image>
    <text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text>
  </view>
  <view class="integralBox" wx:if="{{businessSwitch}}">
    <!--是未授权微信且未授权手机号  -->
    <navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==1}}">
      <image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image>
    </navigator>
    <!-- 授权了微信 没授权手机号 -->
    <navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==2}}">
      <image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image>
    </navigator>
    <!-- 微信和手机号都授权了 跳转到商圈-->
    <navigator url="{{goUrl}}" wx:if="{{accreditFlag==3}}">
      <image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image>
    </navigator>
  </view>
</view>