index.wxml 2.8 KB
<!--index.wxml-->
<view class="container">
  <!--蒙层-->
  <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>

  <!--轮播图-->
  <view class="wrap">
    <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true" bindchange="swiperChange">
      <block wx:for="{{imgUrls}}" wx:key="index">
        <swiper-item>
          <navigator url="{{item.url}}" hover-class="navigator-hover">
            <view class="index_top">
              <image src="{{item.url}}" class="slide-image" mode="aspectFill" />
            </view>
          </navigator>
        </swiper-item>
      </block>
    </swiper>
    <view class="dots">
      <block wx:for="{{ imgUrls}}" wx:key>
        <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
      </block>
    </view>
  </view>

  <!--购买-->
  <view class="btn-box" bindtap="goBuyCard">
    <view class="buy-btn">
      <text>点击图片可跳转到购买页</text>
    </view>
  </view>

  <!--实验列表-->
    <!--<import src="/templates/templates.wxml" />-->
    <!--<view class="past_template">-->
    <!--<template is="experiment" data="{{...this_week_test_info}}"></template>-->
    <!--<template is="experiment" data="{{...past_test_info}}"></template>-->
    <!--</view>-->
  <!-- <import src="/templates/templates.wxml" /> -->
  <view class="past_template">
    <!-- <template is="experiment" data="{{...this_week_test_info}}"></template>
    <template is="experiment" data="{{...past_test_info}}"></template> -->
    <view class='experiment_box'>
      <view class="title_box">
        <view class="line"></view>
        <text>本周实验</text>
        <!-- <text>往期实验</text> -->
      </view>
      <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{true}}'>
        <view class="test_box">
          <view class="time">{{item.time}}</view>
          <view class="img_box">
            <image src="{{item.url}}"></image>
          </view>
        </view>
        <view class="order_box">
          <text catchtap="goAppointment" data-index="{{index}}">前往预约</text>
        </view>
      </view>
    </view>


    <view class='experiment_box'>
      <view class="title_box" bindtap="goTestDetail" data-is_the_week='{{false}}'>
        <view class="line"></view>
        <text>往期实验</text>
      </view>
      <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{false}}'>
        <view class="test_box">
          <view class="time">{{item.time}}</view>
          <view class="img_box">
            <image src="{{item.url}}"></image>
          </view>
        </view>
        <view class="order_box">
          <text>查看</text>
        </view>
      </view>
    </view>
  </view>
</view>