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
98c50a1b
Commit
98c50a1b
authored
6 years ago
by
jie zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
87860bc5
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
index.js
pages/home/parents/index.js
+10
-2
index.js
pages/home/teacher/index.js
+12
-2
No files found.
pages/home/parents/index.js
View file @
98c50a1b
...
@@ -51,8 +51,6 @@ Page({
...
@@ -51,8 +51,6 @@ Page({
this
.
data
.
page
=
0
this
.
data
.
page
=
0
this
.
httpRequest
()
this
.
httpRequest
()
this
.
getSchedule
()
this
.
getRecipe
()
},
},
...
@@ -66,6 +64,16 @@ Page({
...
@@ -66,6 +64,16 @@ Page({
this
.
setData
({
this
.
setData
({
selectedIndex
:
e
.
currentTarget
.
dataset
.
index
selectedIndex
:
e
.
currentTarget
.
dataset
.
index
})
})
if
(
this
.
data
.
selectedIndex
==
0
)
{
this
.
data
.
page
=
0
this
.
httpRequest
()
}
else
if
(
this
.
data
.
selectedIndex
==
1
){
this
.
getSchedule
()
}
else
if
(
this
.
data
.
selectedIndex
==
2
)
{
this
.
getRecipe
()
}
},
},
...
...
This diff is collapsed.
Click to expand it.
pages/home/teacher/index.js
View file @
98c50a1b
...
@@ -11,8 +11,8 @@ Page({
...
@@ -11,8 +11,8 @@ Page({
signIcon
:
"/src/img/signin.png"
,
signIcon
:
"/src/img/signin.png"
,
userIcon
:
""
,
userIcon
:
""
,
records
:
[],
records
:
[],
userName
:
''
,
userName
:
''
,
subTitle
:
'共0人'
subTitle
:
'共0人'
},
},
...
@@ -41,6 +41,16 @@ Page({
...
@@ -41,6 +41,16 @@ Page({
for
(
var
i
=
0
;
i
<
this
.
data
.
records
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
data
.
records
.
length
;
i
++
)
{
studentIds
.
push
(
this
.
data
.
records
[
i
].
id
)
studentIds
.
push
(
this
.
data
.
records
[
i
].
id
)
}
}
if
(
studentIds
.
length
==
0
)
{
wx
.
showToast
({
title
:
'请先点名或联系管理员~'
,
icon
:
'none'
})
return
}
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/add_record/index?studentIds='
+
JSON
.
stringify
(
studentIds
),
url
:
'/pages/add_record/index?studentIds='
+
JSON
.
stringify
(
studentIds
),
})
})
...
...
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