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
0cb93d80
Commit
0cb93d80
authored
Dec 23, 2020
by
晏成浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20201222_show_student_answer' into 'master'
feat: 直播答题页面 See merge request
!2
parents
3db23f41
3ad121da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
index.vue
src/views/paint-screen/components/answer-dialog/index.vue
+0
-1
index.vue
src/views/paint-screen/index.vue
+29
-15
No files found.
src/views/paint-screen/components/answer-dialog/index.vue
View file @
0cb93d80
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-if=
"imgSrc"
class=
"img-pre-box"
@
click=
"handleImgClick"
>
<div
v-if=
"imgSrc"
class=
"img-pre-box"
@
click=
"handleImgClick"
>
<img
:src=
"imgSrc"
alt=
""
>
<img
:src=
"imgSrc"
alt=
""
>
...
...
src/views/paint-screen/index.vue
View file @
0cb93d80
...
@@ -109,16 +109,28 @@ const paintTypes = [
...
@@ -109,16 +109,28 @@ const paintTypes = [
const
streamTypes
=
[
const
streamTypes
=
[
]
]
// const imgs = [
// one,
// two,
// thr,
// four,
// five,
// six,
// siven,
// eight,
// nine
// ]
const
imgs
=
[
const
imgs
=
[
one
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/1.png'
,
two
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/2.png'
,
thr
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/3.png'
,
four
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/4.png'
,
five
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/5.png'
,
six
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/6.png'
,
siven
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/7.png'
,
eight
,
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/8.png'
,
nine
'//test-static-1257124244.cos.ap-chengdu.myqcloud.com/gk-online-static/courseware/demo/9.png'
,
]
]
Vue
.
use
(
GeekDrawBoard
)
Vue
.
use
(
GeekDrawBoard
)
...
@@ -172,7 +184,7 @@ export default {
...
@@ -172,7 +184,7 @@ export default {
this
.
$refs
.
pain_main
&&
this
.
$refs
.
pain_main
.
requestFullscreen
();
this
.
$refs
.
pain_main
&&
this
.
$refs
.
pain_main
.
requestFullscreen
();
}
}
if
(
title
===
'question-stop'
)
{
if
(
title
===
'question-stop'
)
{
this
.
eventId
=
`
${
new
Date
().
getTime
()}
`
//
this.eventId = `${new Date().getTime()}`
socket
.
sendGroupMsg
({
socket
.
sendGroupMsg
({
type
:
'question-stop'
,
type
:
'question-stop'
,
payload
:
{
payload
:
{
...
@@ -208,11 +220,13 @@ export default {
...
@@ -208,11 +220,13 @@ export default {
payload
:
{
payload
:
{
type
,
type
,
title
,
title
,
eventId
:
this
.
eventId
eventId
:
this
.
eventId
,
img
:
this
.
currentImg
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
'teacher send success: '
,
res
);
console
.
log
(
'teacher send success: '
,
res
);
// 暂时填入三个默认数据
// 暂时填入三个默认数据
this
.
showAnsModal
=
true
// 弹出答题
this
.
replyList
=
[
this
.
replyList
=
[
{
username
:
'阿槑'
,},
{
username
:
'阿槑'
,},
{
username
:
'懒惰怪'
,},
{
username
:
'懒惰怪'
,},
...
@@ -239,12 +253,12 @@ export default {
...
@@ -239,12 +253,12 @@ export default {
// // 处理假数据
// // 处理假数据
const
newAnswerList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
replyList
))
const
newAnswerList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
replyList
))
// 保证 只赋值一次
// 保证 只赋值一次
let
flag
=
true
//
let flag = true
newAnswerList
.
forEach
((
item
)
=>
{
newAnswerList
.
forEach
((
item
)
=>
{
if
(
flag
&&
!
item
.
answer
)
{
if
(
!
item
.
answer
&&
item
.
username
===
username
)
{
item
.
type
=
payload
.
type
item
.
type
=
payload
.
type
item
.
answer
=
payload
.
answer
item
.
answer
=
payload
.
answer
flag
=
false
//
flag = false
}
}
})
})
// 更新视图
// 更新视图
...
@@ -288,7 +302,7 @@ export default {
...
@@ -288,7 +302,7 @@ export default {
this
.
$el
.
addEventListener
(
'click'
,
()
=>
{
this
.
$el
.
addEventListener
(
'click'
,
()
=>
{
this
.
ansModal
=
false
this
.
ansModal
=
false
this
.
showAnsModal
=
false
this
.
showAnsModal
=
false
},
tru
e
)
},
fals
e
)
}
}
}
}
</
script
>
</
script
>
...
...
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