index.wxml 3.39 KB
Newer Older
张杰's avatar
张杰 committed
1
<!--pages/home/parents/index.wxml-->
张杰's avatar
张杰 committed
2
<import src='/template/operate_btn/index.wxml'></import>
张杰's avatar
张杰 committed
3

张杰's avatar
张杰 committed
4 5 6 7
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
  <template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:'张小华',subTitle:'向日葵小班',sex:'m'}}"></template>
  <view></view>
张杰's avatar
张杰 committed
8
</view>
张杰's avatar
张杰 committed
9 10 11
<view class='kg-separater'></view>

<scroll-view style='height:calc(100vh - 200rpx)' scroll-y='true'>
12 13 14 15 16 17 18 19 20
  <view wx:for="{{records}}">
    <view class='timeline-cell'>
      <view class='timeline-line-container'>
        <view class='timeline-line'></view>
        <image class='timeline-cycle' src='/src/img/timeline-cycle.jpeg'></image>
      </view>
      <view class='kg-quantity-cell timeline-content'>
        <view class='kg-flex-row' style='margin-bottom:20rpx;'>
          <text class='kg-text-title'>{{item.recordDate}}</text>
张杰's avatar
张杰 committed
21
          <text class='kg-text-normal-gray'>{{item.teacher ? item.teacher : ""}}记录</text>
22
        </view>
张杰's avatar
张杰 committed
23

24 25 26 27 28 29 30 31

        <!-- 饮食 -->
        <view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex">
          <view wx:if="{{dietIndex == 0}}">
            <template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
          </view>
          <view class='kg-flex-row timeline-content-detail'>
            <text class='kg-text-normal-gray'>{{dietItem.z_recordType}}</text>
张杰's avatar
张杰 committed
32
            <text class='kg-text-normal-gray'>{{dietItem.z_eatState}}</text>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
          </view>
        </view>
        

        <!-- 睡觉 -->
        <view wx:for="{{item.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex">
          <view wx:if="{{sleepIndex == 0}}">
          <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
            <template is='imgTextView' data="{{img:'sleep',text:'睡觉'}}"> </template>
          </view>
          <view class='kg-flex-row timeline-content-detail'>
            <text class='kg-text-normal-gray'>{{sleepItem.z_recordType}}</text>
            <text class='kg-text-normal-gray'>{{sleepItem.value}}分钟</text>
          </view>
        </view>


        <!-- wc -->
        <view wx:for="{{item.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex">
          <view wx:if="{{wcIndex == 0}}">
          <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
            <template is='imgTextView' data="{{img:'wc',text:'WC'}}"> </template>
          </view>
          <view class='kg-flex-row timeline-content-detail'>
            <text class='kg-text-normal-gray'>{{wcItem.z_recordType}}</text>
            <text class='kg-text-normal-gray'>{{wcItem.value}}次</text>
          </view>
        </view>
        
张杰's avatar
张杰 committed
62
        <!-- <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view> -->
63
        <!-- 今日照片 -->
张杰's avatar
张杰 committed
64
        <!-- <template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
65 66 67 68
        <view class='home-student-picture-item' style='margin-left:40rpx;'>
          <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>
张杰's avatar
张杰 committed
69
        </view> -->
张杰's avatar
张杰 committed
70 71
      </view>
    </view>
72 73 74



张杰's avatar
张杰 committed
75 76
  </view>
</scroll-view>