index.wxml 3.19 KB
<view class="navigation-bar">
  <navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="活动">
    <view class="bar-text">门店助手</view>
  </navigation-bar>
</view>
<block wx:if="{{navHeight}}">
	<view class="layout" style="top:{{navHeight}}px;height: calc(100vh - {{navHeight*2}}rpx);">
		<!-- 背景图 -->
		<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
			<view class="bg">
				<image webp src="{{IMGURL}}index_bg.webp?v={{img_version}}"></image>
			</view>
		</view>
		<!-- tab切换 -->
    <view class="tab-box" style="top: {{navHeight}}px">
      <block wx:for="{{tab}}" wx:key="index">
        <view class="tab {{index == tabIndex? 'active' : '' }}" bindtap="click" data-index="{{index}}">
          <view class="text">{{item.name}} ({{index == 0 ? activeTotal : total}})</view>
          <view class="line"></view>
        </view>
      </block>
    </view>
      <!-- 活动中 -->
      <scroll-view scroll-y class="content" style="{{!activeList.length ? 'padding-top: 16rpx;' : ''}}" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" 	bindscroll="scrollIng" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
        <block wx:if="{{activeList.length}}">
          <active-box bind:showAuth="toShowAuth" activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}"></active-box>
        </block>
        <block wx:else>
          <nothing-data></nothing-data>
        </block>
      </scroll-view>
      <!-- 活动诊断 -->
      <scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" data-type="{{2}}" refresher-triggered="{{activeTrigger}}" bindscroll="scrollIng" hidden="{{tabIndex != 1}}">
        <block wx:if="{{activityEndList.length}}">
          <activity-diagnosis activityList="{{activityEndList}}" nothing="{{nothing}}"></activity-diagnosis>
        </block>
        <block wx:else>
          <nothing-data></nothing-data>
        </block>
      </scroll-view>
    <!-- 申请活动 -->
    <!-- <view class="add-activity" style="transform: translateX({{tabIndex == 0 ? activeTranslateValue : activityEndTranslateValue}}rpx);transition: all {{tabIndex == 0 ? (activeTranslateValue >= 130 ? 0.3 : 0) : (activityEndTranslateValue >= 130 ? 0.3 : 0)}}s;" bind:tap="applyActivity">
      <image webp src="{{IMGURL}}application_activity.png"></image>
    </view> -->
    <!-- 预约安装弹窗 -->
    <install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
    <!-- 分享活动弹窗 -->
    <share-popup bind:showAuth="toShowAuth" data="{{sharePopupData}}"></share-popup>
    <!-- <van-popup show="{{ showSharePopup }}" round bind:close="onClose">
      <image style="width: 352rpx; height: 352rpx;" src="{{imagePath}}"></image>
    </van-popup> -->
	</view>
</block>
<block wx:if="{{showAuth}}">
  <authorize title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?" scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize>
</block>