Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-game
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8bf1e74c
authored
Feb 20, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
b4c6655a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
7 deletions
src/components/AnswerType/index.vue
src/components/KnowledgeSports/quiz.vue
src/components/Popups/index.vue
src/mixins/fill.js
src/views/KnowledgeSports/page.vue
src/components/AnswerType/index.vue
View file @
8bf1e74
...
...
@@ -316,12 +316,12 @@ export default {
width
:
192px
;
height
:
80px
;
background-size
:
100%
100%
;
margin
:
8
vh
auto
0px
;
margin
:
10
vh
auto
0px
;
font-size
:
20px
;
color
:
#2155a3
;
text-align
:
center
;
&.next-btn-a
{
margin
:
4
vh
auto
0px
;
margin
:
8
vh
auto
0px
;
}
.next-end
{
padding-top
:
6px
;
...
...
src/components/KnowledgeSports/quiz.vue
0 → 100644
View file @
8bf1e74
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-31 15:41:18
* @LastEditors: yangming qianduan01@didihu.com.cn
* @LastEditTime: 2023-02-20 15:18:36
* @FilePath: \h5Demo\src\components\KnowledgeSports\guessSong.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<Pop
name=
"知识问答"
:isEnd=
"isEnd"
:isFinish=
"isFinish"
:list=
"memberList"
:dataObject=
"answerData"
@
reStart=
"reStart"
>
<div
class=
"slot"
>
<div
class=
"tips"
>
{{
answerData
.
body
.
question
}}
</div>
<Answer
:answerData=
"answerData"
:selectIndex=
"selectIndex"
:selectResult=
"selectResult"
@
optionsHandle=
"optionsHandle"
></Answer>
</div>
</Pop>
</
template
>
<
script
>
import
Pop
from
"../Popups/index"
;
import
Answer
from
"../AnswerType/index"
;
import
mixin
from
"../../mixins/select.js"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
Pop
,
Answer
,
},
name
:
"quiz"
,
watch
:
{
dataObject
(
data
)
{
GPJSSDK
.
Game
.
knowAction
({
data
,
status
:
(
info
)
=>
{
if
(
info
.
gameStatus
==
0
&&
!
info
.
gameType
)
{
if
(
this
.
answerOption
&&
this
.
answerOption
.
length
>
0
)
{
this
.
timer
=
null
;
// this.answerData = {
// body: {
// size: null,
// currentSize: null,
// timeLimit: null,
// rightNum: null,
// question: null,
// choice: [],
// },
// };
}
}
},
});
},
},
props
:
{
dataObject
:
{
type
:
Object
,
},
popupState
:
{
type
:
Boolean
,
default
:
true
,
},
},
data
()
{
return
{
playState
:
false
,
};
},
};
</
script
>
<
style
lang=
"less"
scoped
>
/
deep
/
.slot
{
width
:
100%
;
.tips
{
width
:
80%
;
margin
:
0
auto
20px
;
font-size
:
16px
;
color
:
#1b233d
;
margin-top
:
16px
;
font-weight
:
400
;
text-align
:
center
;
}
}
</
style
>
src/components/Popups/index.vue
View file @
8bf1e74
...
...
@@ -231,7 +231,7 @@ export default {
position
:
relative
;
.prize-content
{
position
:
absolute
;
left
:
72
px
;
left
:
68
px
;
top
:
170px
;
.prize-title
{
font-weight
:
600
;
...
...
@@ -239,6 +239,11 @@ export default {
color
:
#eb5638
;
line-height
:
24px
;
width
:
132px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.prize-time
{
font-size
:
9px
;
...
...
@@ -253,7 +258,7 @@ export default {
text-align
:
center
;
.prize-num
{
font-weight
:
700
;
font-size
:
44
px
;
font-size
:
36
px
;
color
:
#8f1d1d
;
letter-spacing
:
0
;
line-height
:
55px
;
...
...
src/mixins/fill.js
View file @
8bf1e74
...
...
@@ -99,6 +99,7 @@ export default {
cursorEven
(
index
)
{
if
(
this
.
isSuccess
)
return
;
this
.
isSelectSeat
=
index
;
console
.
log
(
this
.
selectResult
[
index
]);
if
(
this
.
selectResult
[
index
])
{
let
val
=
this
.
selectResult
[
index
];
this
.
answerOption
.
forEach
((
choice
,
idx
)
=>
{
...
...
@@ -106,7 +107,7 @@ export default {
this
.
answerOption
[
idx
].
isSelect
=
false
;
}
});
this
.
selectResult
[
index
]
=
null
;
//
this.selectResult[index] = null;
}
},
// 选择答案
...
...
@@ -126,6 +127,9 @@ export default {
this
.
answerOption
[
index
].
isSelect
=
true
;
this
.
selectResult
[
this
.
isSelectSeat
]
=
item
.
val
;
}
if
(
this
.
selectResult
.
length
-
1
==
this
.
isSelectSeat
)
{
this
.
cursorEven
(
this
.
isSelectSeat
);
}
// 判断光标位置
if
(
this
.
isSelectSeat
<=
answerLength
--
)
{
this
.
selectResult
.
some
((
v
,
idx
)
=>
{
...
...
@@ -134,6 +138,7 @@ export default {
}
});
}
console
.
log
(
item
.
val
);
},
answerGame
()
{
// 发送答案
...
...
src/views/KnowledgeSports/page.vue
View file @
8bf1e74
...
...
@@ -38,6 +38,7 @@ export default {
3
:
"猜成语"
,
5
:
"猜谜语"
,
6
:
"猜电影"
,
7
:
"趣味抢答"
,
8
:
"猜王者"
,
},
};
...
...
@@ -74,8 +75,8 @@ export default {
case
"6"
:
sname
=
"guessMovie"
;
break
;
case
"
8
"
:
sname
=
"
guessKing
"
;
case
"
7
"
:
sname
=
"
quiz
"
;
break
;
}
return
sname
;
...
...
@@ -237,6 +238,10 @@ export default {
this
.
passConfig
=
gameConfigRopResponse
.
passConfig
;
resolve
();
}
// if (res.code == "21") {
// util.clearSessionId();
// location.reload();
// }
});
});
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment