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
3ba8c41e
Commit
3ba8c41e
authored
6 years ago
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下拉刷新上拉加载
parent
67139e99
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
14 deletions
+97
-14
parrent.js
api/parrent.js
+8
-0
index.js
pages/home/parents/index.js
+60
-8
index.wxml
pages/home/parents/index.wxml
+3
-2
index.wxss
pages/home/parents/index.wxss
+6
-0
index.js
pages/home/reviewer/index.js
+1
-1
index.wxml
pages/home/sign/index.wxml
+1
-1
index.js
pages/review_student/index.js
+17
-1
index.wxml
pages/review_student/index.wxml
+1
-1
defaut_teacher_icon.png
src/img/defaut_teacher_icon.png
+0
-0
No files found.
api/parrent.js
View file @
3ba8c41e
...
@@ -21,5 +21,13 @@ module.exports = {
...
@@ -21,5 +21,13 @@ module.exports = {
}
}
return
request
.
post
(
'/wxsite/wxa/user/changePassword.do'
,
param
)
return
request
.
post
(
'/wxsite/wxa/user/changePassword.do'
,
param
)
},
updateStudentPicture
(
studentId
,
pictureId
)
{
var
param
=
{
studentId
:
studentId
,
pictureId
:
pictureId
}
return
request
.
post
(
'/wxsite/parents/updateStudentPicture.do'
,
param
)
}
}
}
}
This diff is collapsed.
Click to expand it.
pages/home/parents/index.js
View file @
3ba8c41e
...
@@ -20,7 +20,28 @@ Page({
...
@@ -20,7 +20,28 @@ Page({
rightIcon
:
'/src/img/xiugaimima.png'
,
rightIcon
:
'/src/img/xiugaimima.png'
,
pictureId
:
""
,
pictureId
:
""
,
userIcon
:
""
,
userIcon
:
""
,
selectPic
:[]
selectPic
:
[],
student
:
{},
//顶部加载提示信息
hideTopMore
:
true
,
// 底部加载提示信息
hideBottomMore
:
true
},
scrollToUpper
:
function
(
e
)
{
console
.
log
(
"滚动到顶部"
)
this
.
setData
({
hideTopMore
:
false
})
this
.
data
.
page
=
0
this
.
httpRequest
()
},
scrollToLower
:
function
(
e
)
{
this
.
data
.
page
++
this
.
httpRequest
()
},
},
tapUserInfoImg
:
function
(
e
)
{
tapUserInfoImg
:
function
(
e
)
{
...
@@ -28,7 +49,7 @@ Page({
...
@@ -28,7 +49,7 @@ Page({
// 选择图片
// 选择图片
wx
.
chooseImage
({
wx
.
chooseImage
({
count
:
1
,
count
:
1
,
sizeType
:
[
'
original'
,
'
compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sizeType
:
[
'compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
success
:
function
(
res
)
{
success
:
function
(
res
)
{
//选中的图片路径
//选中的图片路径
...
@@ -55,6 +76,8 @@ Page({
...
@@ -55,6 +76,8 @@ Page({
pictureId
:
that
.
data
.
pictureId
,
pictureId
:
that
.
data
.
pictureId
,
userIcon
:
that
.
data
.
userIcon
userIcon
:
that
.
data
.
userIcon
})
})
that
.
updateStudentPicture
()
}
else
{
}
else
{
throw
new
Error
({
throw
new
Error
({
msg
:
'图片上传失败'
msg
:
'图片上传失败'
...
@@ -73,6 +96,22 @@ Page({
...
@@ -73,6 +96,22 @@ Page({
})
})
},
},
updateStudentPicture
:
function
()
{
request
.
updateStudentPicture
(
this
.
data
.
student
.
id
,
this
.
data
.
pictureId
).
then
(
res
=>
{
wx
.
showToast
({
title
:
"上传成功"
});
}).
catch
(
function
(
err
)
{
that
.
getAllStudent
(
that
.
data
.
classId
)
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
2000
});
});
},
changePwdTap
:
function
(
e
)
{
changePwdTap
:
function
(
e
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/reset_psw/index'
,
url
:
'/pages/reset_psw/index'
,
...
@@ -92,9 +131,13 @@ Page({
...
@@ -92,9 +131,13 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
const
that
=
this
this
.
fillStudent
()
this
.
httpRequest
()
},
fillStudent
:
function
()
{
const
that
=
this
if
(
app
.
globalData
.
login
.
students
.
length
==
0
)
{
if
(
app
.
globalData
.
login
.
students
.
length
==
0
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'无学生信息, 请联系管理员'
,
title
:
'无学生信息, 请联系管理员'
,
...
@@ -104,19 +147,30 @@ Page({
...
@@ -104,19 +147,30 @@ Page({
}
}
let
student
=
app
.
globalData
.
login
.
students
[
0
]
let
student
=
app
.
globalData
.
login
.
students
[
0
]
var
studentId
=
student
.
id
var
studentId
=
student
.
id
let
pic
=
utils
.
handleImgShow
(
student
.
picture
)
console
.
log
(
pic
)
this
.
setData
({
this
.
setData
({
student
:
student
,
student
:
student
,
userIcon
:
app
.
globalData
.
login
.
wxaUser
.
avatarUrl
,
userIcon
:
pic
,
sex
:
student
.
sex
sex
:
student
.
sex
})
})
request
.
queryStudentRecord
(
that
.
data
.
page
,
that
.
data
.
pageSize
,
studentId
).
then
(
res
=>
{
},
httpRequest
:
function
()
{
const
that
=
this
request
.
queryStudentRecord
(
that
.
data
.
page
,
that
.
data
.
pageSize
,
that
.
data
.
student
.
id
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
let
resData
=
res
let
resData
=
res
var
record
=
resData
[
'records'
]
var
record
=
resData
[
'records'
]
var
templist
=
this
.
data
.
records
var
templist
=
this
.
data
.
records
if
(
that
.
data
.
page
==
0
)
{
templist
=
[]
this
.
setData
({
hideTopMore
:
true
})
}
for
(
var
i
=
0
;
i
<
record
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
record
.
length
;
i
++
)
{
var
item
=
record
[
i
]
var
item
=
record
[
i
]
...
@@ -180,9 +234,7 @@ Page({
...
@@ -180,9 +234,7 @@ Page({
records
:
templist
,
records
:
templist
,
page
:
resData
[
'paging'
][
'page'
]
page
:
resData
[
'paging'
][
'page'
]
})
})
})
})
},
},
/**
/**
...
...
This diff is collapsed.
Click to expand it.
pages/home/parents/index.wxml
View file @
3ba8c41e
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
</view>
</view>
<view class='kg-separater'></view>
<view class='kg-separater'></view>
<scroll-view style='height:calc(100vh - 200rpx)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 200rpx)' scroll-y='true' bindscrolltolower='scrollToLower' bindscrolltoupper='scrollToUpper'>
<view class='kg-text-light-gray more-text' hidden='{{hideTopMore}}'>下拉加载中…</view>
<view wx:for="{{records}}" wx:key="item">
<view wx:for="{{records}}" wx:key="item">
<view class='timeline-cell'>
<view class='timeline-cell'>
<view class='timeline-line-container'>
<view class='timeline-line-container'>
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
<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>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>
【禾其狗狗喝水器挂式水壶猫咪自动饮水杯用品狗笼喂水器宠物饮水器】https://m.tb.cn/h.3HA5uKq?sm=8a2196 点击链接,再选择浏览器咑閞;或復·制这段描述¥502VbroYaCP¥后到👉淘♂寳♀👈
</text>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>
{{item.pictureRemark ? item.pictureRemark : ''}}
</text>
</view>
</view>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
pages/home/parents/index.wxss
View file @
3ba8c41e
...
@@ -61,3 +61,9 @@
...
@@ -61,3 +61,9 @@
margin-right:60rpx;
margin-right:60rpx;
margin-bottom:10rpx;
margin-bottom:10rpx;
}
}
.more-text {
text-align: center;
height: 40rpx;
line-height: 40rpx;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pages/home/reviewer/index.js
View file @
3ba8c41e
...
@@ -33,7 +33,7 @@ Page({
...
@@ -33,7 +33,7 @@ Page({
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/review_student/index?signSummaryId='
+
student
.
id
+
'&pictureIds='
+
JSON
.
stringify
(
student
.
arrIds
)
+
'&remark='
+
(
student
.
remark
?
student
.
remark
:
''
)
+
'&picRemark='
+
(
student
.
pictureRemark
?
student
.
pictureRemark
:
''
)
+
'&studentName='
+
student
.
signStudentName
+
'&sex='
+
student
.
signStudentSex
url
:
'/pages/review_student/index?signSummaryId='
+
student
.
id
+
'&pictureIds='
+
JSON
.
stringify
(
student
.
arrIds
)
+
'&remark='
+
(
student
.
remark
?
student
.
remark
:
''
)
+
'&picRemark='
+
(
student
.
pictureRemark
?
student
.
pictureRemark
:
''
)
+
'&studentName='
+
student
.
signStudentName
+
'&sex='
+
student
.
signStudentSex
+
'&studentPicture='
+
student
.
studentPicture
})
})
},
},
...
...
This diff is collapsed.
Click to expand it.
pages/home/sign/index.wxml
View file @
3ba8c41e
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<scroll-view style='height:calc(100vh - 120rpx - 140rpx)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 120rpx - 140rpx)' scroll-y='true'>
<view style='margin:20rpx'>
<view style='margin:20rpx'>
<view wx:for="{{records}}">
<view wx:for="{{records}}"
wx:key="item"
>
<view class='kg-quantity-cell'>
<view class='kg-quantity-cell'>
<template is='quantity_cell' data="{{title:item.name,type:'check',unit:'毫升', cellIndex:index, checked:selectTags[index]}}"></template>
<template is='quantity_cell' data="{{title:item.name,type:'check',unit:'毫升', cellIndex:index, checked:selectTags[index]}}"></template>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
pages/review_student/index.js
View file @
3ba8c41e
...
@@ -26,7 +26,8 @@ Page({
...
@@ -26,7 +26,8 @@ Page({
studentName
:
''
,
studentName
:
''
,
kindergarten
:
''
,
kindergarten
:
''
,
sex
:
''
,
sex
:
''
,
pictureIds
:
[]
pictureIds
:
[],
studentPicture
:
'/src/img/defaut_teacher_icon.png'
},
},
//加载详情
//加载详情
...
@@ -82,6 +83,15 @@ Page({
...
@@ -82,6 +83,15 @@ Page({
auditSignSummary
:
function
(
signSummaryId
)
{
auditSignSummary
:
function
(
signSummaryId
)
{
console
.
log
(
signSummaryId
)
console
.
log
(
signSummaryId
)
let
record
=
this
.
data
.
recordDetail
if
(
record
.
dietRecord
.
length
==
0
&&
record
.
sleepRecord
.
length
==
0
&&
record
.
wcRecord
.
length
==
0
)
{
wx
.
showToast
({
title
:
'没有记录,无法审批'
,
icon
:
'none'
,
})
return
}
request
.
auditSignSummary
(
signSummaryId
).
then
(
res
=>
{
request
.
auditSignSummary
(
signSummaryId
).
then
(
res
=>
{
this
.
setData
({
this
.
setData
({
showAuditBtn
:
false
showAuditBtn
:
false
...
@@ -132,6 +142,12 @@ Page({
...
@@ -132,6 +142,12 @@ Page({
this
.
data
.
signSummaryId
=
options
.
signSummaryId
;
this
.
data
.
signSummaryId
=
options
.
signSummaryId
;
let
remark
=
options
.
remark
let
remark
=
options
.
remark
let
picRemark
=
options
.
picRemark
let
picRemark
=
options
.
picRemark
let
studentPicture
=
options
.
studentPicture
if
(
studentPicture
!=
'null'
)
{
this
.
setData
({
studentPicture
:
utils
.
handleImgShow
(
studentPicture
)
})
}
this
.
setData
({
this
.
setData
({
remark
:
remark
,
remark
:
remark
,
picRemark
:
picRemark
,
picRemark
:
picRemark
,
...
...
This diff is collapsed.
Click to expand it.
pages/review_student/index.wxml
View file @
3ba8c41e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:
'/src/img/defaut_teacher_icon.png'
,title:studentName,subTitle:'',sex:sex}}"></template>
<template is='userInfo' data="{{userImg:
studentPicture
,title:studentName,subTitle:'',sex:sex}}"></template>
<view></view>
<view></view>
</view>
</view>
<view class='kg-separater'></view>
<view class='kg-separater'></view>
...
...
This diff is collapsed.
Click to expand it.
src/img/defaut_teacher_icon.png
View replaced file @
67139e99
View file @
3ba8c41e
26.8 KB
|
W:
0px
|
H:
0px
6.32 KB
|
W:
0px
|
H:
0px
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
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