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
1b1d6f24
Commit
1b1d6f24
authored
Jan 09, 2019
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7a231989
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
97 additions
and
22 deletions
+97
-22
index.js
pages/add_record/index.js
+7
-2
index.wxml
pages/add_record/index.wxml
+1
-1
index.js
pages/home/parents/index.js
+25
-0
index.wxml
pages/home/parents/index.wxml
+6
-6
index.js
pages/home/reviewer/index.js
+29
-1
index.wxml
pages/home/reviewer/index.wxml
+4
-4
index.js
pages/home/teacher/index.js
+5
-1
index.wxml
pages/home/teacher/index.wxml
+1
-1
index.wxml
pages/login/index.wxml
+1
-1
index.js
pages/review_student/index.js
+13
-0
index.wxml
pages/review_student/index.wxml
+4
-4
index.wxml
template/operate_btn/index.wxml
+1
-1
No files found.
pages/add_record/index.js
View file @
1b1d6f24
...
...
@@ -405,7 +405,9 @@ Page({
duration
:
1500
})
setTimeout
(()
=>
{
this
.
getRecord
()
wx
.
navigateBack
({
})
},
1500
)
})
...
...
@@ -413,7 +415,10 @@ Page({
onLoad
:
function
(
options
)
{
this
.
data
.
studentIds
=
JSON
.
parse
(
options
.
studentIds
)
this
.
data
.
pictureIds
=
JSON
.
parse
(
options
.
pictureIds
)
if
(
options
.
pictureIds
!=
null
)
{
this
.
data
.
pictureIds
=
JSON
.
parse
(
options
.
pictureIds
)
}
for
(
var
i
=
0
;
i
<
this
.
data
.
pictureIds
.
length
;
i
++
)
{
this
.
data
.
pictureUrl
.
push
(
utils
.
handleImgShow
(
this
.
data
.
pictureIds
[
i
]))
}
...
...
pages/add_record/index.wxml
View file @
1b1d6f24
...
...
@@ -39,7 +39,7 @@
<!-- 选择的图片 -->
<view wx:for="{{pictureUrl}}">
<view class='add_picture_view'>
<image src='{{item}}' class='add_picture'
bind
tap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
<image src='{{item}}' class='add_picture'
catch
tap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
<image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
</view>
</view>
...
...
pages/home/parents/index.js
View file @
1b1d6f24
// pages/home/parents/index.js
const
request
=
require
(
'../../../api/parrent.js'
)
const
utils
=
require
(
'../../../utils/util.js'
)
const
app
=
getApp
()
...
...
@@ -18,6 +20,15 @@ Page({
},
previewPic
:
function
(
e
)
{
var
current
=
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
[
e
.
target
.
dataset
.
picIndex
]
wx
.
previewImage
({
current
:
current
,
urls
:
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
})
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -53,6 +64,20 @@ Page({
let
date
=
new
Date
(
dateStr
);
var
num
=
date
.
getDay
()
item
.
recordDate
=
dateStr
+
" "
+
show_day
[
date
.
getDay
()]
//图片
var
arrPic
=
[]
let
arrIds
=
[]
if
(
item
.
pictures
!=
null
&&
item
.
pictures
!=
''
)
{
arrIds
=
item
.
pictures
.
split
(
","
)
for
(
var
j
=
0
;
j
<
arrIds
.
length
;
j
++
)
{
let
id
=
arrIds
[
j
]
arrPic
.
push
(
utils
.
handleImgShow
(
id
))
}
}
console
.
log
(
arrPic
)
item
.
arrIds
=
arrIds
item
.
arrPic
=
arrPic
// 饮食
var
dietRecords
=
item
[
'dietRecord'
]
...
...
pages/home/parents/index.wxml
View file @
1b1d6f24
...
...
@@ -59,14 +59,14 @@
</view>
</view>
<
!-- <soview class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view> --
>
<
view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view
>
<!-- 今日照片 -->
<
!-- <
template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<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
>
</view>
-->
<
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>
<
/view
>
</view>
</view>
</view>
...
...
pages/home/reviewer/index.js
View file @
1b1d6f24
// pages/home/reviewer/index.js
const
request
=
require
(
'../../../api/teacher.js'
)
const
app
=
getApp
()
const
utils
=
require
(
'../../../utils/util.js'
)
Page
({
/**
...
...
@@ -25,17 +27,43 @@ Page({
},
tapStudent
:
function
(
e
)
{
let
student
=
this
.
data
.
records
[
e
.
currentTarget
.
dataset
.
index
]
wx
.
navigateTo
({
url
:
'/pages/review_student/index?signSummaryId='
+
e
.
currentTarget
.
id
url
:
'/pages/review_student/index?signSummaryId='
+
student
.
id
+
'&pictureIds='
+
JSON
.
stringify
(
student
.
arrIds
)
})
},
previewPic
:
function
(
e
)
{
var
current
=
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
[
e
.
target
.
dataset
.
picIndex
]
wx
.
previewImage
({
current
:
current
,
urls
:
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
})
},
querySignSummary
:
function
()
{
request
.
querySignSummaryByClass
(
this
.
data
.
classId
).
then
(
res
=>
{
console
.
log
(
res
)
for
(
var
i
=
0
;
i
<
res
.
length
;
i
++
)
{
var
item
=
res
[
i
]
item
.
signDate
=
item
.
signDate
.
substr
(
0
,
10
)
//图片
var
arrPic
=
[]
let
arrIds
=
[]
if
(
item
.
picture
!=
null
&&
item
.
picture
!=
''
)
{
arrIds
=
item
.
picture
.
split
(
","
)
for
(
var
j
=
0
;
j
<
arrIds
.
length
;
j
++
)
{
let
id
=
arrIds
[
j
]
arrPic
.
push
(
utils
.
handleImgShow
(
id
))
}
}
console
.
log
(
arrPic
)
item
.
arrIds
=
arrIds
item
.
arrPic
=
arrPic
}
this
.
setData
({
records
:
res
...
...
pages/home/reviewer/index.wxml
View file @
1b1d6f24
...
...
@@ -18,7 +18,7 @@
</view>
</view>
</view>
<view class='home-student-info' wx:for="{{records}}" wx:key="id" id="{{item.id}}" bindtap='tapStudent'>
<view class='home-student-info' wx:for="{{records}}"
data-index='{{index}}'
wx:key="id" id="{{item.id}}" bindtap='tapStudent'>
<!-- 名字 -->
<view class='home-student-name'>
<view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
...
...
@@ -26,9 +26,9 @@
</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 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>
</view
>
</view>
<!-- 行为 -->
<view class='home-student-name' style='justify-content: space-between;margin:0rpx 30rpx;'>
...
...
pages/home/teacher/index.js
View file @
1b1d6f24
...
...
@@ -12,7 +12,7 @@ Page({
userIcon
:
"/src/img/defaut_teacher_icon.png"
,
records
:
[],
userName
:
''
,
subTitle
:
'共
2
0人'
subTitle
:
'共0人'
},
...
...
@@ -96,6 +96,10 @@ Page({
return
}
var
signSummary
=
app
.
globalData
.
login
.
classes
[
0
].
id
var
studentCount
=
app
.
globalData
.
login
.
classes
[
0
].
studentCount
this
.
setData
({
subTitle
:
'共'
+
studentCount
+
'人'
})
// request.querySignSummary("4028048267a65d0f0167a69ae1910058", "4028048267a5969b0167a5b22f3807f8").then(res => {
request
.
querySignSummary
(
app
.
globalData
.
login
.
user
.
id
,
signSummary
).
then
(
res
=>
{
...
...
pages/home/teacher/index.wxml
View file @
1b1d6f24
...
...
@@ -22,7 +22,7 @@
<!-- 图片 -->
<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'
bind
tap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
<image src='{{picItem}}' class='home-student-picture'
catch
tap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<!-- 行为 -->
...
...
pages/login/index.wxml
View file @
1b1d6f24
...
...
@@ -6,5 +6,5 @@
<view class='kg-separater' style='height:2rpx;'></view>
</view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>登录</button>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'
open-type='getUserInfo'
>登录</button>
</view>
\ No newline at end of file
pages/review_student/index.js
View file @
1b1d6f24
// pages/review_student/index.js
const
request
=
require
(
'../../api/teacher.js'
)
const
utils
=
require
(
'../../utils/util.js'
)
Page
({
...
...
@@ -112,6 +113,18 @@ Page({
*/
onLoad
:
function
(
options
)
{
this
.
data
.
signSummaryId
=
options
.
signSummaryId
;
if
(
options
.
pictureIds
!=
null
)
{
this
.
data
.
pictureIds
=
JSON
.
parse
(
options
.
pictureIds
)
var
arrPic
=
[]
for
(
var
i
=
0
;
i
<
this
.
data
.
pictureIds
.
length
;
i
++
)
{
let
id
=
this
.
data
.
pictureIds
[
i
]
arrPic
.
push
(
utils
.
handleImgShow
(
id
))
}
this
.
setData
({
arrPic
:
arrPic
})
}
this
.
getRecordDetailForSignId
()
},
...
...
pages/review_student/index.wxml
View file @
1b1d6f24
...
...
@@ -33,7 +33,7 @@
<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'>
午睡
</text>
<text class='kg-text-normal-gray'>{{sleepItem.value}}分钟</text>
</view>
</view>
...
...
@@ -53,9 +53,9 @@
<!-- 今日照片 -->
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<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
>
<
view wx:for="{{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>
</view
>
</view>
</view>
</scroll-view>
...
...
template/operate_btn/index.wxml
View file @
1b1d6f24
...
...
@@ -24,7 +24,7 @@
<view wx:if="{{type == 'input'}}">
<!-- 输入型cell -->
<view class='kg-flex-row'>
<input class='kg-border' style='width:140rpx;margin-right:10rpx;' bindinput="bindKeyInput" data-cellIndex='{{cellIndex}}' value="{{inputValue}}"></input>
<input class='kg-border' style='width:140rpx;margin-right:10rpx;' bindinput="bindKeyInput" data-cellIndex='{{cellIndex}}' value="{{inputValue}}"
type='number'
></input>
<view class='kg-text-normal-gray'>{{unit}}</view>
</view>
</view>
...
...
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