<view class="mkt-container" a:if="{{componentData && canIUse}}">
  <view class="mkt-location" a:if="{{!mktCode && !cityCode}}" style="{{
        componentData.componentExtInfo.backgroundUrl ? 
        `backgroundImage: url(${ componentData.componentExtInfo.backgroundUrl.length == 32 ? imgSrcPrefix + componentData.componentExtInfo.backgroundUrl : componentData.componentExtInfo.backgroundUrl})` :
        ''}}" onTap="getLbs"> </view>
  <!-- 用户未登陆，设定的权限需要用户登陆时--> 
  <view a:elif="{{+componentData.componentExtInfo.isLogin === 1 && !userInfo.isLogin}}">
    <form onSubmit="onSubmit" report-submit="{{true}}">
        <button 
          a:if="{{scopes === 'auth_user'}}"
          class="mkt-isLogin clear-button" 
          onTap="onGetAuthorize" 
          formType="submit"
          hover-class="none"
        />
        <button 
          a:else
          class="mkt-isLogin clear-button" 
          open-type="getAuthorize" 
          onGetAuthorize="onGetAuthorize" 
          onError="onAuthError" 
          formType="submit"
          hover-class="none"
          scope="{{scopes}}"></button>
      </form>
  </view>
  <!-- 用户不是会员，设定的权限需要用户是会员时, 点击开卡--> 
  <view a:elif="{{+componentData.componentExtInfo.isLogin === 2 && memberInfo && !memberInfo.flag && !memberInfo.err}}">
    <view class="join-member" 
    style="{{
        componentData.componentExtInfo.backgroundUrl ? 
        `backgroundImage: url(${ componentData.componentExtInfo.backgroundUrl.length == 32 ? imgSrcPrefix + componentData.componentExtInfo.backgroundUrl : componentData.componentExtInfo.backgroundUrl})` :
        ''}}"
    onTap="joinMember"></view>
  </view>
  <!-- 显示mkt组件，显示可用券 --> 
  <view a:else>
    <mkt
      mode="AUTOMATIC"
      boothCode="MERCHANT_SELF_TINYAPP"
      version="{{componentData.componentExtInfo.mktVersion || 2}}"
      className="mkt-item"
      onRender="onRender"
      title="{{componentData.componentTitle || ''}}"
      collapseLimit="{{componentData.componentExtInfo && +componentData.componentExtInfo.collapseLimit || 4}}"
      cityCode="{{mktCode || cityCode}}"
      onApplySuccess="onApplySuccess"
      onApplyFail="onApplyFail"
      onError="onError"
    />
    <view a:if="{{!hasMktData}}" class="no-mkt"></view>
  </view>
</view>