index.wxml 6.38 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
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
张杰's avatar
张杰 committed
6
  <template is='userInfo' data="{{userImg:userIcon,title:student.name,subTitle:student.className,sex:sex}}"></template>
张杰's avatar
张杰 committed
7
  <view class='kg-flex-column' style='align-items:flex-end;'>
张杰's avatar
张杰 committed
8
    <!-- <image class='top_logo' src='/src/img/parent_logo.png'></image> -->
张杰's avatar
张杰 committed
9 10
    <view class='home-header-roll-call' bindtap='changePwdTap'>
      <image class='roll-call-image' src='{{rightIcon}}'></image>
张杰's avatar
张杰 committed
11
      <view class='roll-call-title'> </view>
张杰's avatar
张杰 committed
12
    </view>
张杰's avatar
张杰 committed
13
  </view>
张杰's avatar
张杰 committed
14

张杰's avatar
张杰 committed
15
</view>
张杰's avatar
张杰 committed
16 17
<view class='kg-separater'></view>

18 19
<!-- 首页 -->
<scroll-view hidden="{{selectedIndex != '0'}}" style='height:calc(100vh - 200rpx - 100rpx)' scroll-y='true' bindscrolltolower='scrollToLower' bindscrolltoupper='scrollToUpper'>
张杰's avatar
张杰 committed
20 21

  <!-- <view class='kg-text-light-gray more-text' hidden='{{hideTopMore}}'>下拉加载中…</view> -->
张杰's avatar
张杰 committed
22
  <view wx:for="{{records}}" wx:key="item">
23 24 25 26 27 28
    <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'>
张杰's avatar
张杰 committed
29
        <view class='kg-flex-row'>
30
          <text class='kg-text-title'>{{item.recordDate}}</text>
张杰's avatar
张杰 committed
31
          <text class='kg-text-light-gray'> </text>
32
        </view>
张杰's avatar
张杰 committed
33

张杰's avatar
张杰 committed
34 35
        <!-- 照片 -->
        <template is='imgTextView' data="{{img:'today',text:'照片'}}"> </template>
张杰's avatar
张杰 committed
36 37 38 39 40
        <view class='home-student-picture-item' style='margin-left:40rpx;'>
          <view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex" wx:key="picItem">
            <image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
          </view>
        </view>
41
        <text class='kg-text-light-gray' style='margin-left:60rpx;margin-right:35rpx;'>{{item.pictureRemark ? item.pictureRemark : ''}}</text>
张杰's avatar
张杰 committed
42 43 44

        <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>

45 46

        <!-- 饮食 -->
张杰's avatar
张杰 committed
47
        <view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="dietItem.id">
48 49 50 51
          <view wx:if="{{dietIndex == 0}}">
            <template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
          </view>
          <view class='kg-flex-row timeline-content-detail'>
52 53
            <text class='kg-text-normal-gray'>{{dietItem.z_recordType}}</text>
            <text class='kg-text-normal-gray'>{{dietItem.z_eatState}}</text>
54 55
          </view>
        </view>
张杰's avatar
张杰 committed
56

57 58

        <!-- 睡觉 -->
张杰's avatar
张杰 committed
59
        <view wx:for="{{item.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex" wx:key="sleepItem.id">
60
          <view wx:if="{{sleepIndex == 0}}">
张杰's avatar
张杰 committed
61
            <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
张杰's avatar
张杰 committed
62
            <template is='imgTextView' data="{{img:'sleep',text:'睡眠'}}"> </template>
63 64
          </view>
          <view class='kg-flex-row timeline-content-detail'>
65 66
            <text class='kg-text-normal-gray'>午睡</text>
            <text class='kg-text-normal-gray'>{{sleepItem.value ? sleepItem.value : '0'}}分钟</text>
67 68 69 70 71
          </view>
        </view>


        <!-- wc -->
张杰's avatar
张杰 committed
72
        <view wx:for="{{item.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex" wx:key="wcItem.id">
73
          <view wx:if="{{wcIndex == 0}}">
张杰's avatar
张杰 committed
74
            <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
张杰's avatar
张杰 committed
75
            <template is='imgTextView' data="{{img:'wc',text:'大小便'}}"> </template>
76 77
          </view>
          <view class='kg-flex-row timeline-content-detail'>
78 79
            <text class='kg-text-normal-gray'>{{wcItem.z_recordType}}</text>
            <text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : '0'}}次</text>
80 81
          </view>
        </view>
82
        <text class='kg-text-light-gray' style='margin-left:60rpx;margin-right:35rpx;'>{{item.remark ? item.remark : ''}}</text>
张杰's avatar
张杰 committed
83 84
      </view>
    </view>
85 86 87 88 89 90
  </view>
  <image hidden="{{records.length != 0}}" src='/src/img/empty_data.png' class='empty-data'></image>
</scroll-view>

<!-- 食谱 -->
<view hidden="{{selectedIndex != '1'}}">
张杰's avatar
张杰 committed
91
  <image class='recipe-image' hidden="{{isRecipeNull == true}}" src='{{recipeImage}}' mode='widthFix'  bindtap='tapRecipe'></image>
92 93

  <image hidden="{{isRecipeNull != true}}" src='/src/img/empty_data.png' class='empty-data'></image>
张杰's avatar
张杰 committed
94
  <view style='height:100rpx;width:auto;'></view>
95 96 97
</view>


98

99 100
<!-- 课表 -->
<view hidden="{{selectedIndex != '2'}}">
张杰's avatar
张杰 committed
101
    <image hidden='{{attachment == null}}' class='scheduleImage' src='{{scheduleImage}}' mode='widthFix' bindtap='tapSchedule'></image>
102 103 104 105 106 107
    <view hidden='{{musicUrl == null}}' class='kg-home-header kg-flex-row music-board' style='width:100vw;height:120rpx;'>
      <view class='kg-flex-row'>
        <image src='{{btnImage}}' style='width:120rpx;height:120rpx;' bindtap='tapPlayButton'></image>
        <text style='font-size: 26rpx;margin-left:32rpx;color:#4f4f4f;'>{{current.name}}</text>
      </view>
    </view>
108

109
  <image hidden="{{attachment != null && musicUrl != null}}" src='/src/img/empty_data.png' class='empty-data'></image>
张杰's avatar
张杰 committed
110
  <view style='height:100rpx;width:auto;'></view>
111
</view>
112

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
<view style='position:fixed;bottom: 0rpx;height:100rpx;background-color:white;width:100vw;'>
  <view class='kg-separater' style='height:4rpx;'></view>
  <view class='kg-flex-row tab-bg'>
    <view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='0'>
      <image class='tab-image' src="{{selectedIndex=='0' ? '/src/img/home_select.png' : '/src/img/home_unselect.png'}} "></image>
      <view style='text-align:center;font-size: 24rpx;'>首页</view>
    </view>
    <view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='1'>
      <image class='tab-image' src="{{selectedIndex=='1' ? '/src/img/recipe_select.png' : '/src/img/recipe_unselect.png'}} "></image>
      <view style='text-align:center;font-size: 24rpx;'>食谱</view>
    </view>
    <view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='2'>
      <image class='tab-image' src="{{selectedIndex=='2' ? '/src/img/schedule_select.png' : '/src/img/schedule_unselect.png'}} "></image>
      <view style='text-align:center;font-size: 24rpx;'>课表</view>
    </view>
张杰's avatar
张杰 committed
128
  </view>
129
</view>