Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
向伟
educationStu
Commits
500a4d8c
Commit
500a4d8c
authored
Jan 13, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
8a7ed781
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
10 deletions
+26
-10
choiceQuestion.vue
src/components/word/choiceQuestion.vue
+9
-1
fillInTheBlanks.vue
src/components/word/fillInTheBlanks.vue
+10
-2
index.vue
src/pages/index/index.vue
+3
-3
test.vue
src/pages/word/test.vue
+4
-4
No files found.
src/components/word/choiceQuestion.vue
View file @
500a4d8c
...
...
@@ -84,7 +84,7 @@
<view
class=
"choiceQuestion"
>
<view
class=
"box"
v-if=
"!isShowExplain"
>
<!--
<view
class=
"dc"
>
{{
item
.
Title
}}
</view>
-->
<view
class=
"dc2"
>
{{
item
.
Title
}}
</view>
<view
class=
"dc2"
>
<text
style=
"color:#4756EB;"
>
{{
num
}}
/
{{
total
}}
、
</text>
{{
item
.
Title
}}
</view>
<view
class=
"dclx"
>
{{
item
.
WordType
}}
</view>
<view
class=
"choicelist"
>
<view
class=
"choice-item"
:class=
"
{'correct':item.Answer==x.Name
&&
current==item.Answer,
...
...
@@ -124,6 +124,14 @@
Explain
},
props
:
{
num
:
{
type
:
Number
,
default
:
1
},
total
:
{
type
:
Number
,
default
:
1
},
current
:
{
type
:
String
,
default
:
''
...
...
src/components/word/fillInTheBlanks.vue
View file @
500a4d8c
...
...
@@ -72,7 +72,7 @@
<view
class=
"fillInTheBlanks"
>
<view
class=
"box"
v-if=
"!isShowExplain"
>
<view
class=
"dc "
>
<view
style=
"font-size:26rpx;width:100%;font-weight: 600;"
>
{{
item
.
Title
}}
</view>
<view
style=
"font-size:26rpx;width:100%;font-weight: 600;"
>
<text
style=
"color:#4756EB;"
>
{{
num
}}
/
{{
total
}}
、
</text>
{{
item
.
Title
}}
</view>
<mypone
:maxlength=
"getNum(item)"
v-model=
"test"
style=
"display: inline-block;"
@
input=
"input"
></mypone>
</view>
<view
class=
"dclx"
>
{{
item
.
WordType
}}
</view>
...
...
@@ -108,7 +108,15 @@
default
:()
=>
{
return
{}
}
}
},
num
:
{
type
:
Number
,
default
:
1
},
total
:
{
type
:
Number
,
default
:
1
},
},
setup
(
props
,{
attrs
,
slots
,
emit
})
{
let
data
=
reactive
({
...
...
src/pages/index/index.vue
View file @
500a4d8c
...
...
@@ -217,8 +217,8 @@
if
(
data
.
pageData
.
LearningGardenList
.
length
>
0
)
{
data
.
pageData
.
LearningGardenList
.
forEach
((
x
,
y
)
=>
{
if
(
x
.
List
.
length
>
0
)
{
x
.
List
.
forEach
((
item
,
index
)
=>
{
this
.
getColor
(
item
.
Img
,
index
,
y
).
then
(
v
=>
{
x
.
List
.
forEach
(
async
(
item
,
index
)
=>
{
await
this
.
getColor
(
item
.
Img
,
index
,
y
).
then
(
v
=>
{
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor
=
v
.
formatres
;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
...
...
@@ -235,7 +235,7 @@
},
async
getColor
(
src
,
index
,
y
)
{
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
+
index
,
src
)
console
.
log
(
index
,
res
)
//
console.log(index, res)
let
obj
=
{}
obj
.
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.01)`
obj
.
formatres1
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.6)`
...
...
src/pages/word/test.vue
View file @
500a4d8c
...
...
@@ -4,12 +4,12 @@
<van-empty
description=
"暂无数据"
v-if=
"nodata"
/>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
v-if=
"!loading&&!nodata"
>
<swiper-item
v-for=
"(item, index) in reviewGroupList"
:key=
"index"
class=
"swiper-item"
v-if=
"item"
>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
:num=
"index+1"
:total=
"reviewGroupList.length+prepGroupList.length"
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
:num=
"index+1"
:total=
"reviewGroupList.length+prepGroupList.length"
@
next=
"next($event, item)"
></FillIn>
</swiper-item>
<swiper-item
v-for=
"(item, index) in prepGroupList"
:key=
"index"
class=
"swiper-item"
v-if=
"item"
>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
:num=
"index+1+reviewGroupList.length"
:total=
"reviewGroupList.length+prepGroupList.length"
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
:num=
"index+1+reviewGroupList.length"
:total=
"reviewGroupList.length+prepGroupList.length"
@
next=
"next($event, item)"
></FillIn>
</swiper-item>
<swiper-item>
<van-popup
:show=
"true"
position=
"center"
custom-style=
"background-color: transparent;"
>
...
...
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