Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gk-online-teacher
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
huanglu
gk-online-teacher
Commits
90c0d518
Commit
90c0d518
authored
Dec 24, 2020
by
晏成浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 抢答题
parent
84fe608b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
index.vue
src/views/paint-screen/components/answer-dialog/index.vue
+6
-4
index.vue
src/views/paint-screen/index.vue
+2
-3
No files found.
src/views/paint-screen/components/answer-dialog/index.vue
View file @
90c0d518
...
...
@@ -16,7 +16,7 @@
<div
class=
"info-box"
>
<p>
学生:
{{
quickResponse
.
username
}}
</p>
<div
class=
"answer-box"
>
<span>
{{
quickResponse
.
answer
}}
</span>
<span>
{{
`抢答成功`
}}
</span>
</div>
</div>
</div>
...
...
@@ -35,7 +35,7 @@
</div>
</div>
</div>
<div
v-if=
"imgSrc"
class=
"img-pre-box"
@
click=
"handleImgClick"
ref=
"imgBox"
>
<div
v-if=
"imgSrc"
class=
"img-pre-box"
@
click=
"handleImgClick"
ref=
"imgBox"
:style=
"
{backgroundImage: `url(${questionImg?questionImg:'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/1.png'})`}"
>
<img
:src=
"imgSrc"
class=
"as-img"
alt=
""
>
<img
:src=
"require('@/assets/images/icon-close.png')"
@
click=
"imgSrc = ''"
class=
"close-img"
alt=
""
>
</div>
...
...
@@ -49,7 +49,8 @@ export default {
name
:
'answer-dialog'
,
props
:
{
replyList
:
{
required
:
true
,
default
:
()
=>
[]},
quickResponse
:
{}
quickResponse
:
{},
questionImg
:
{}
},
data
()
{
return
{
...
...
@@ -61,6 +62,7 @@ export default {
},
mounted
()
{
console
.
log
(
'answerList'
,
this
.
replyList
)
console
.
log
([
this
.
$refs
.
imgBox
])
},
watch
:
{
quickResponse
:
{
...
...
@@ -213,7 +215,7 @@ export default {
width
:
100vw
;
//background: rgba(0, 0, 0, .3);
background-size
:
100%
100%
;
background-image
:
url("//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/1.png")
;
//
background-image: url("//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/1.png");
position
:
fixed
;
left
:
0
;
top
:
0
;
...
...
src/views/paint-screen/index.vue
View file @
90c0d518
...
...
@@ -64,7 +64,7 @@
<!-- </template>-->
<!-- </div>-->
<!-- </div>-->
<answer-dialog
v-if=
"showAnsModal"
:quick-response=
"quickResponseData"
@
question-exit=
"handleQuestionExit"
:reply-list=
"replyList"
/>
<answer-dialog
v-if=
"showAnsModal"
:qu
estion-img=
"currentImg"
:qu
ick-response=
"quickResponseData"
@
question-exit=
"handleQuestionExit"
:reply-list=
"replyList"
/>
</div>
</template>
...
...
@@ -253,7 +253,6 @@ export default {
if
(
type
===
'answer'
&&
this
.
eventId
===
payload
.
eventId
)
{
// 抢答题
if
(
`
${
payload
.
type
}
`
===
'2'
&&
!
this
.
quickResponseData
)
{
console
.
log
(
'asdfffff'
)
this
.
quickResponseData
=
payload
newAnswerList
.
forEach
((
item
)
=>
{
if
(
!
item
.
answer
&&
item
.
username
===
username
)
{
...
...
@@ -336,7 +335,7 @@ export default {
},
{
passive
:
false
});
this
.
$el
.
addEventListener
(
'click'
,
()
=>
{
this
.
ansModal
=
false
this
.
showAnsModal
=
false
//
this.showAnsModal = false
},
false
)
}
}
...
...
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