Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
train_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
train
train_vue
Commits
22ab5288
Commit
22ab5288
authored
Feb 15, 2022
by
不吃草的咩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印code
parent
1147dfc1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
4 deletions
+45
-4
pages/document/coursedetails/coursedetails.js
pages/document/coursedetails/coursedetails.js
+14
-3
pages/document/subsign/subsign.js
pages/document/subsign/subsign.js
+30
-1
pages/my/home.js
pages/my/home.js
+1
-0
No files found.
pages/document/coursedetails/coursedetails.js
View file @
22ab5288
...
...
@@ -19,9 +19,20 @@ Page({
})
},
toSign
(){
wx
.
navigateTo
({
url
:
`/pages/document/subsign/subsign?price=
${
this
.
data
.
course
.
price
}
&name=
${
this
.
data
.
course
.
name
}
`
,
})
let
token
=
wx
.
getStorageSync
(
'
token
'
);
if
(
token
==
''
){
Toast
(
'
您还未登录,请先去登录
'
);
setTimeout
(()
=>
{
wx
.
switchTab
({
url
:
'
/pages/my/home
'
,
})
},
2000
)
}
else
{
wx
.
navigateTo
({
url
:
`/pages/document/subsign/subsign?price=
${
this
.
data
.
course
.
price
}
&name=
${
this
.
data
.
course
.
name
}
`
,
})
}
},
/**
* 生命周期函数--监听页面加载
...
...
pages/document/subsign/subsign.js
View file @
22ab5288
...
...
@@ -116,7 +116,24 @@ Page({
onConfirmHomework
(
event
){
const
{
picker
,
value
,
index
}
=
event
.
detail
;
this
.
setData
({[
"
fromDate.homework
"
]:
value
,[
"
popup.homeworkText
"
]:
value
,
isShowHomework
:
false
})
//根据选中状态,请求下面列表,动态生成列表项
app
.
colorUISdk
.
request
({
url
:
'
wxcourse/list
'
,
method
:
'
GET
'
,
data
:
{
a
:
'
xx
'
}
}).
then
(
res
=>
{
this
.
setData
({
courseData
:
res
.
data
.
records
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
this
.
setData
({
[
"
fromDate.homework
"
]:
value
,[
"
popup.homeworkText
"
]:
value
,
isShowHomework
:
false
,
}
)
},
onConfirmPeixun
(
event
){
const
{
picker
,
value
,
index
}
=
event
.
detail
;
...
...
@@ -207,6 +224,18 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
//获取作业类别列表
app
.
colorUISdk
.
request
({
url
:
'
wxcourse/list
'
,
method
:
'
GET
'
,
data
:
{
a
:
'
xx
'
}
}).
then
(
res
=>
{
this
.
setData
({
courseData
:
res
.
data
.
records
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
/**
...
...
pages/my/home.js
View file @
22ab5288
...
...
@@ -31,6 +31,7 @@ Page({
getPhoneNumber
(
e
)
{
//如果返回成功手机号,就随机生成一串字符串存进去
if
(
e
.
detail
.
code
!==
undefined
){
console
.
log
(
e
.
detail
);
// let random = Math.random().toString(36).substr(2);
let
random
=
this
.
randomWord
(
false
,
43
);
try
{
...
...
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