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

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

    <!--购买-->
    <view class="btn-box" bindtap="goBuyCard">
        <view class="buy-btn">
            <!--<text>点击图片可跳转到购买页</text>-->
            <!--<image src="../../images/taimiao@2x.png" mode="aspectFill"></image>-->
            <image src="{{buy_card}}" mode="aspectFill"></image>
        </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 bindtap="goTestDetail"
                  data-is_the_week='{{true}}' data-id="{{this_week_test_info.id}}">
                <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}}"  mode="aspectFill"></image>
                        <!--<image src="../../images/test_img.jpg"  mode="aspectFill"></image>-->
                    </view>
                </view>
                <view class="order_box">
                    <text catchtap="goAppointment" data-index="{{index}}" data-id="{{this_week_test_info.id}}">前往预约</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="{{past_test_info}}" wx:key="index" data-index="{{index}}" data-id="{{item.id}}" bindtap="goTestDetail"
                  data-is_the_week='{{false}}'>
                <view class="test_box">
                    <view class="time">{{item.start_time}} - {{item.end_time}}</view>
                    <view class="img_box">
                        <image src="{{item.thumb}}"  mode="aspectFill"></image>
                        <!--<image src="../../images/test_img.jpg"  mode="aspectFill"></image>-->
                    </view>
                </view>
                <view class="order_box">
                    <text>查看</text>
                </view>
            </view>
        </view>
    </view>
</view>