Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_MATH01
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
JM_MATH01
Commits
2d850903
Commit
2d850903
authored
Nov 25, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 传图才出现选项
parent
c2c41863
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
play.component.ts
src/app/play/play.component.ts
+16
-2
No files found.
src/app/play/play.component.ts
View file @
2d850903
...
@@ -2369,6 +2369,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2369,6 +2369,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
formula
&&
isRight
)
{
if
(
formula
&&
isRight
)
{
this
.
changeAnswerBg
(
'
rightPic
'
);
this
.
changeAnswerBg
(
'
rightPic
'
);
this
.
gameEnd
();
}
else
{
}
else
{
...
@@ -2378,6 +2379,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2378,6 +2379,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
!
this
.
isFirstQues
)
{
if
(
!
this
.
isFirstQues
)
{
this
.
gameEnd
();
return
;
return
;
}
}
this
.
isFirstQues
=
false
;
this
.
isFirstQues
=
false
;
...
@@ -2536,6 +2538,16 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2536,6 +2538,16 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
}
}
gameEnd
()
{
const
c
=
window
[
'
courseware
'
];
if
(
!
c
)
{
return
;
}
c
.
nextPage
();
}
optionRight
(
opItem
)
{
optionRight
(
opItem
)
{
this
.
changeOpItemBg
(
opItem
,
'
rightPic
'
);
this
.
changeOpItemBg
(
opItem
,
'
rightPic
'
);
...
@@ -2550,6 +2562,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2550,6 +2562,7 @@ export class PlayComponent implements OnInit, OnDestroy {
},
2000
);
},
2000
);
}
}
this
.
gameEnd
();
}
}
...
@@ -2559,6 +2572,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2559,6 +2572,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
canTouch
=
false
;
this
.
canTouch
=
false
;
if
(
this
.
quesNum
>=
3
)
{
if
(
this
.
quesNum
>=
3
)
{
this
.
gameEnd
();
return
;
return
;
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -4013,7 +4027,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -4013,7 +4027,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
baseY
=
subH
*
2.5
;
const
baseY
=
subH
*
2.5
;
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
if
(
optionArr
[
i
])
{
if
(
optionArr
[
i
]
&&
optionArr
[
i
].
pic_url
)
{
const
opItem
=
this
.
getOneOpItem
(
optionArr
[
i
]);
const
opItem
=
this
.
getOneOpItem
(
optionArr
[
i
]);
const
sx
=
w
/
opItem
.
width
;
const
sx
=
w
/
opItem
.
width
;
const
sy
=
subH
/
opItem
.
height
;
const
sy
=
subH
/
opItem
.
height
;
...
@@ -4168,7 +4182,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -4168,7 +4182,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
baseY
=
subH
*
2.5
;
const
baseY
=
subH
*
2.5
;
for
(
let
i
=
0
;
i
<
optionArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
optionArr
.
length
;
i
++
)
{
if
(
optionArr
[
i
])
{
if
(
optionArr
[
i
]
&&
optionArr
[
i
].
pic_url
)
{
const
opItem
=
this
.
getOneOpItem
(
optionArr
[
i
]);
const
opItem
=
this
.
getOneOpItem
(
optionArr
[
i
]);
const
sx
=
w
/
opItem
.
width
;
const
sx
=
w
/
opItem
.
width
;
const
sy
=
subH
/
opItem
.
height
;
const
sy
=
subH
/
opItem
.
height
;
...
...
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