Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-program
Overview
Overview
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
陈玉桐
wx-program
Commits
46e43ef5
Commit
46e43ef5
authored
Nov 12, 2019
by
陈玉桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新计划教材版本change
parent
b03f2263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
0 deletions
+99
-0
updatePlan.js
pages/updatePlan/updatePlan.js
+99
-0
No files found.
pages/updatePlan/updatePlan.js
View file @
46e43ef5
...
...
@@ -582,14 +582,113 @@ Page({
// 教材选择
teachChange
(
e
)
{
console
.
log
(
'教材:'
+
e
.
detail
.
value
+
this
.
data
.
teachArray
[
e
.
detail
.
value
])
// 请求前加Loading
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
if
(
this
.
data
.
wordType
==
'first'
){
this
.
setData
({
teachIndex
:
e
.
detail
.
value
})
let
me
=
this
wx
.
request
({
url
:
app
.
globalData
.
apiUrl
+
'Trainings/book'
,
method
:
'POST'
,
data
:
{
token
:
wx
.
getStorageSync
(
'token'
),
publisherId
:
this
.
data
.
teachArray
[
e
.
detail
.
value
].
id
},
success
:
function
(
res
)
{
// 请求成功后关闭Loading
// wx.hideLoading();
if
(
res
.
data
.
errno
==
200
){
me
.
setData
({
bookArray
:
res
.
data
.
data
.
data
,
})
wx
.
request
({
url
:
app
.
globalData
.
apiUrl
+
'Trainings/chapter'
,
method
:
'POST'
,
data
:
{
token
:
wx
.
getStorageSync
(
'token'
),
bookId
:
res
.
data
.
data
.
data
[
0
].
id
},
success
:
function
(
res
)
{
// 请求成功后关闭Loading
wx
.
hideLoading
();
if
(
res
.
data
.
errno
==
200
){
me
.
setData
({
unitArray
:
res
.
data
.
data
.
data
,
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
showCancel
:
false
,
content
:
res
.
data
.
msg
})
}
}
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
showCancel
:
false
,
content
:
res
.
data
.
msg
})
}
}
})
}
else
{
this
.
setData
({
teachIndexSecond
:
e
.
detail
.
value
})
let
me
=
this
wx
.
request
({
url
:
app
.
globalData
.
apiUrl
+
'Trainings/book'
,
method
:
'POST'
,
data
:
{
token
:
wx
.
getStorageSync
(
'token'
),
publisherId
:
this
.
data
.
teachArray
[
e
.
detail
.
value
].
id
},
success
:
function
(
res
)
{
// 请求成功后关闭Loading
// wx.hideLoading();
if
(
res
.
data
.
errno
==
200
){
me
.
setData
({
bookArray
:
res
.
data
.
data
.
data
,
})
wx
.
request
({
url
:
app
.
globalData
.
apiUrl
+
'Trainings/chapter'
,
method
:
'POST'
,
data
:
{
token
:
wx
.
getStorageSync
(
'token'
),
bookId
:
res
.
data
.
data
.
data
[
0
].
id
},
success
:
function
(
res
)
{
// 请求成功后关闭Loading
wx
.
hideLoading
();
if
(
res
.
data
.
errno
==
200
){
me
.
setData
({
unitArraySecond
:
res
.
data
.
data
.
data
,
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
showCancel
:
false
,
content
:
res
.
data
.
msg
})
}
}
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
showCancel
:
false
,
content
:
res
.
data
.
msg
})
}
}
})
}
},
// 课本选择
...
...
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