templates.wxml 3.1 KB
<template name="this-experiment">
  <view class='experiment_box' bindtap="goDetail">
      <view class="title_box">
          <view class="line"></view>
          <text>本周实验</text>
      </view>

      <view>
          <view class="test_box">
              <view class="time">{{this_week_test_info.start_time}} - {{this_week_test_info.end_time}}</view>
              <view class="img_box">
                  <image src="{{this_week_test_info.thumb}}"></image>
              </view>
          </view>

          <view class="order_box">
              <text catchtap="goAppointment" data-index="{{index}}">前往预约</text>
              <!--<text wx:if="{{is_past}}">查看</text>-->
          </view>
      </view>
  </view>
</template>
<template name="past-experiment">
    <view class='experiment_box' bindtap="goPastDetail">
        <view class="title_box">
            <view class="line"></view>
            <text>往期实验</text>
        </view>

        <view wx:for="{{list}}" wx:key="index" data-id="{{item.id}}">
            <view class="test_box">
                <view class="time">{{item.start_time}} - {{item.end_time}}</view>
                <view class="img_box">
                    <image src="{{item.thumb}}"></image>
                </view>
            </view>

            <view class="order_box">
                <!--<text wx:if="{{!ordered}}" catchtap="goAppointment" data-index="{{index}}">前往预约</text>-->
                <text>查看</text>
            </view>
        </view>
    </view>
</template>

<template name="modal">
    <!--是否购买畅玩卡弹窗-->
    <view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll">
        <view class="background"
              bindtap="handleBackground"
              wx:if="{{is_showModal}}"
              catchtouchmove="disableScroll">
        </view>
        <view class="modalBackground  Augly-bouncein">
            <view class="modal">
                <view class="tips-word">{{title}}</view>
                <view class="yes-no-btn">
                    <text bindtap="chooseNo" data-index="{{0}}">{{tab_left}}</text>
                    <text bindtap="chooseYes" data-index="{{1}}" class="yes">{{tab_right}}</text>
                </view>
            </view>
        </view>
    </view>
</template>

<template name="state-modal">
    <!--预约成功/失败弹窗-->
    <view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll">
        <view class="background"
              bindtap="handleBackground"
              wx:if="{{is_showSuccessModal}}"
              catchtouchmove="disableScroll">
        </view>
        <view class="modalBackground  Augly-bouncein">
            <view class="success-modal">
                <image src="{{icon}}"></image>
                <view class="congratulations {{title==='提示'?'change-red':''}}">{{title}}</view>
                <view class="appointment-success">{{content}}</view>
                <view class="confirm-btn {{title==='提示'?'change-bg-red':''}}" bindtap="modalConfirm">确定</view>
            </view>
        </view>
    </view>
</template>