Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_Parent_Child
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
template admin
JJ_Game_Parent_Child
Commits
f33de8b0
Commit
f33de8b0
authored
Mar 31, 2025
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
01c7e034
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
23 deletions
+12
-23
form.component.ts
form/src/app/form/form.component.ts
+12
-23
No files found.
form/src/app/form/form.component.ts
View file @
f33de8b0
...
...
@@ -53,7 +53,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
curBookWords
=
[];
selectedWord
:
any
;
courseId
;
bookTextList
=
[]
;
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
,
...
...
@@ -64,10 +64,8 @@ courseId;
ngOnInit
()
{
this
.
courseId
=
this
.
getCourseIdFromUrl
();
if
(
this
.
courseId
)
{
console
.
log
(
'
courseId:
'
,
this
.
courseId
);
}
this
.
getBookTextLis
();
this
.
item
=
{};
...
...
@@ -633,25 +631,16 @@ getUnusedWord(ques: any): any {
},
1
);
}
/**
* 从URL中获取course_id参数
* @returns course_id的值,如果不存在则返回null
*/
getCourseIdFromUrl
():
string
|
null
{
const
queryString
=
window
.
location
.
search
;
if
(
!
queryString
)
{
return
null
;
}
getBookTextLis
()
{
// 移除开头的 '?' 并分割参数
const
params
=
queryString
.
substring
(
1
).
split
(
'
&
'
);
// 查找course_id参数
for
(
const
param
of
params
)
{
const
[
key
,
value
]
=
param
.
split
(
'
=
'
);
if
(
key
===
'
course_id
'
)
{
return
decodeURIComponent
(
value
);
}
if
((
<
any
>
window
).
courseware
.
getPictureBookTextList
)
{
(
<
any
>
window
).
courseware
.
getPictureBookTextList
((
data
)
=>
{
console
.
log
(
'
getPictureBookTextList data:
'
,
data
);
});
}
else
{
console
.
log
(
'
not find getPictureBookTextList
'
);
}
return
null
;
...
...
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