index.wxml 1.88 KB
<!--pages/home/teacher/index.wxml-->
<import src='/template/operate_btn/index.wxml'></import>
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
  <template is='userInfo' data="{{userImg:userIcon,title:'向日葵小班-张老师',subTitle:'共19人',sex:''}}"></template>
  <view class='home-header-roll-call' bindtap='signTap'>
    <image class='roll-call-image' src='{{signIcon}}'></image>
    <view class='roll-call-title'>点名</view>
  </view>
</view>
<view class='kg-separater'></view>
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 200rpx - 140rpx)' scroll-y='true'>
  <template is="section_header" data="{{title:dateStr}}"></template>
  <view wx:for="{{records}}">
    <view class='home-student-info'>
      <!-- 名字 -->
      <view class='home-student-name'>
        <view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
        <template is="sex" data="{{sex:item.signStudentSex == '0' ? 'm' : 'f'}}"></template>
      </view>
      <!-- 图片 -->
      <view class='home-student-picture-item'>
        <image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
        <image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
        <image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
      </view>
      <!-- 行为 -->
      <view class='home-student-name' style='justify-content: space-between;margin:0rpx 30rpx;'>
        <template is='imgTextView' data="{{img:'eat',text:item.eatCount }}"> </template>
        <template is='imgTextView' data="{{img:'sleep',text:item.sleepTotal }}"> </template>
        <template is='imgTextView' data="{{img:'wc',text:item.wcCount }}"> </template>
      </view>
    </view>
  </view>
</scroll-view>
<template is="operate_btn" data="{{title:'记录一笔'}}"></template>