Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
Kindergarten
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Kindergarten
Commits
e1641e6d
Commit
e1641e6d
authored
Jan 11, 2019
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1b1d6f24
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
65 additions
and
28 deletions
+65
-28
teacher.js
api/teacher.js
+2
-2
index.js
pages/add_record/index.js
+15
-9
index.wxml
pages/add_record/index.wxml
+1
-1
index.json
pages/home/parents/index.json
+3
-1
index.json
pages/home/reviewer/index.json
+3
-1
index.wxml
pages/home/reviewer/index.wxml
+1
-1
index.js
pages/home/sign/index.js
+25
-4
index.json
pages/home/teacher/index.json
+3
-1
index.wxml
pages/home/teacher/index.wxml
+10
-6
index.json
pages/login/index.json
+1
-1
zhaopian.png
src/img/zhaopian.png
+0
-0
index.wxml
template/operate_btn/index.wxml
+1
-1
No files found.
api/teacher.js
View file @
e1641e6d
...
...
@@ -26,11 +26,11 @@ module.exports = {
return
request
.
get
(
'/wxsite/teacher/getAllStudent.do'
,
params
)
},
// 签到接口
signIn
(
teacherId
,
classId
,
s
tudentId
s
)
{
signIn
(
teacherId
,
classId
,
s
ignStudent
s
)
{
var
params
=
{
teacherId
:
teacherId
,
classId
:
classId
,
s
tudentIds
:
studentId
s
s
ignStudents
:
signStudent
s
}
return
request
.
post
(
'/wxsite/teacher/signin.do'
,
params
)
},
...
...
pages/add_record/index.js
View file @
e1641e6d
...
...
@@ -20,7 +20,7 @@ Page({
'selected'
:
false
},
{
'value'
:
'
WC
'
,
'value'
:
'
大小便
'
,
'code'
:
'wc'
,
'selected'
:
false
},
...
...
@@ -28,7 +28,7 @@ Page({
clazz
:
[],
studentIds
:
[],
controlIndex
:
0
,
categoryCode
:
[
'diet_morning'
,
'diet_
afternoon'
,
'diet_evening'
,
'diet_morning_more'
,
'diet_afternoon_more'
,
'diet_water'
,
'diet_milk'
],
categoryCode
:
[
'diet_morning'
,
'diet_
morning_more'
,
'diet_afternoon'
,
'diet_afternoon_more'
,
'diet_evening'
],
//, 'diet_water', 'diet_milk'
categorys
:
[],
typeIndex
:
0
,
inputModel
:
[
...
...
@@ -243,7 +243,7 @@ Page({
var
poo
=
'0'
var
diaper
=
'0'
item
.
cellType
=
'select'
item
.
cellOptions
=
[
'
pee'
,
'poo'
,
'diaper
'
]
item
.
cellOptions
=
[
'
小便'
,
'大便'
,
'尿不湿
'
]
for
(
var
j
=
0
;
j
<
item
.
recordItems
.
length
;
j
++
)
{
var
r
=
item
.
recordItems
[
j
]
if
(
r
.
recordType
==
'wc_pee'
)
{
...
...
@@ -255,7 +255,7 @@ Page({
}
console
.
log
(
'pee '
+
pee
+
' poo '
+
poo
+
' diaper '
+
diaper
)
}
let
wcString
=
'
pee '
+
pee
+
'次 poo '
+
poo
+
'次 diaper
'
+
diaper
+
'次'
let
wcString
=
'
小便 '
+
pee
+
'次 大便 '
+
poo
+
'次 尿不湿
'
+
diaper
+
'次'
item
.
wcString
=
wcString
}
...
...
@@ -272,16 +272,22 @@ Page({
let
optionIndex
=
e
.
currentTarget
.
dataset
.
optionindex
let
cellIndex
=
e
.
currentTarget
.
dataset
.
cellindex
let
records
=
this
.
getCurrentRecord
()
var
item
=
records
[
cellIndex
].
recordItems
[
0
]
let
selectIndex
=
e
.
currentTarget
.
dataset
.
optionindex
if
(
this
.
data
.
controlIndex
==
2
)
{
records
[
cellIndex
].
optionIndex
=
e
.
currentTarget
.
dataset
.
optionindex
if
(
records
[
cellIndex
].
optionIndex
==
selectIndex
)
{
records
[
cellIndex
].
optionIndex
=
null
}
else
{
records
[
cellIndex
].
optionIndex
=
selectIndex
}
}
else
{
item
.
optionIndex
=
e
.
currentTarget
.
dataset
.
optionindex
if
(
item
.
optionIndex
==
selectIndex
)
{
item
.
optionIndex
=
null
}
else
{
item
.
optionIndex
=
selectIndex
}
}
if
(
this
.
data
.
controlIndex
==
0
)
{
this
.
setData
({
eatRecord
:
records
...
...
pages/add_record/index.wxml
View file @
e1641e6d
...
...
@@ -43,7 +43,7 @@
<image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
</view>
</view>
<view wx:if="{{pictureUrl.length <
3
}}">
<view wx:if="{{pictureUrl.length <
2
}}">
<!-- 添加图片按钮 -->
<view class='add_picture_view' bindtap='addPicture'>
<image src='/src/img/take_photo.png' class='add_picture'></image>
...
...
pages/home/parents/index.json
View file @
e1641e6d
{}
\ No newline at end of file
{
"navigationBarTitleText"
:
"首页"
}
\ No newline at end of file
pages/home/reviewer/index.json
View file @
e1641e6d
{}
\ No newline at end of file
{
"navigationBarTitleText"
:
"首页"
}
\ No newline at end of file
pages/home/reviewer/index.wxml
View file @
e1641e6d
...
...
@@ -32,7 +32,7 @@
</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:'eat',text:item.eatCount
? item.eatCount : 0
}}"> </template>
<template is='imgTextView' data="{{img:'sleep',text:item.sleepTotal }}"> </template>
<template is='imgTextView' data="{{img:'wc',text:item.wcCount }}"> </template>
</view>
...
...
pages/home/sign/index.js
View file @
e1641e6d
...
...
@@ -20,9 +20,18 @@ Page({
let
classId
=
options
.
classId
req
.
getAllStudent
(
classId
).
then
(
res
=>
{
console
.
log
(
res
)
for
(
var
i
=
0
;
i
<
res
.
length
;
i
++
)
{
var
record
=
res
[
i
]
//存在签到id,说明已经签到过,自动打勾
if
(
record
.
signSummaryId
)
{
this
.
data
.
selectTags
[
i
]
=
true
}
}
this
.
setData
({
records
:
res
,
classId
:
classId
selectTags
:
this
.
data
.
selectTags
,
classId
:
classId
})
})
...
...
@@ -47,9 +56,15 @@ Page({
var
studentIds
=
[]
for
(
var
i
=
0
;
i
<
records
.
length
;
i
++
)
{
let
item
=
records
[
i
]
if
(
this
.
data
.
selectTags
[
i
])
{
studentIds
.
push
(
item
.
id
)
let
student
=
{
"studentId"
:
item
.
id
,
"signSummaryId"
:
item
.
signSummaryId
,
"signState"
:
this
.
data
.
selectTags
[
i
]
?
0
:
1
//签到状态:0:签到 1:取消签到
}
studentIds
.
push
(
student
)
}
console
.
log
(
studentIds
)
...
...
@@ -63,7 +78,13 @@ Page({
delta
:
1
})
},
1500
)
})
}).
catch
(
function
(
err
)
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
2000
});
});
},
/**
...
...
pages/home/teacher/index.json
View file @
e1641e6d
{}
\ No newline at end of file
{
"navigationBarTitleText"
:
"首页"
}
\ No newline at end of file
pages/home/teacher/index.wxml
View file @
e1641e6d
...
...
@@ -15,16 +15,20 @@
<view wx:for="{{records}}">
<view class='home-student-info' bindtap='tapCell' data-index='{{index}}'>
<!-- 名字 -->
<view class='home-student-name'>
<view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
<template is="sex" data="{{sex:item.signStudentSex == '0' ? 'male' : 'female'}}"></template>
<view class='kg-flex-row' style='margin-right:30rpx;'>
<view class='home-student-name'>
<view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
<template is="sex" data="{{sex:item.signStudentSex == '0' ? 'male' : 'female'}}"></template>
</view>
<template is='imgTextView' data="{{img:'zhaopian',text:item.arrIds.length}}"></template>
</view>
<!-- 图片 -->
<view class='home-student-picture-item'>
<
!-- <
view class='home-student-picture-item'>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex">
<image src='{{picItem}}' class='home-student-picture'
catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
</view>
-->
<!-- 行为 -->
<view class='home-student-name' style='justify-content: space-between;margin:0rpx 30rpx;'>
<template is='imgTextView' data="{{img:'eat',text:(item.eatCount ? item.eatCount : '0')}}"> </template>
...
...
pages/login/index.json
View file @
e1641e6d
{
"navigationBarTitleText"
:
"
手机号登录
"
"navigationBarTitleText"
:
"
比来时光
"
}
\ No newline at end of file
src/img/zhaopian.png
0 → 100644
View file @
e1641e6d
1.35 KB
template/operate_btn/index.wxml
View file @
e1641e6d
...
...
@@ -87,6 +87,6 @@ sex:性别 f/m (女性/男性)
<template name='imgTextView'>
<view class='kg-flex-row' style='justify-content: flex-start;height:60rpx;'>
<image src='/src/img/{{img}}.png' style='width: 50rpx;height: 40rpx;'></image>
<text class='kg-text-normal-dark' style='margin-left:10rpx'>{{text ? text : ""}}</text>
<text class='kg-text-normal-dark' style='margin-left:10rpx'>{{text
!= null
? text : ""}}</text>
</view>
</template>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment