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
9a07b125
Commit
9a07b125
authored
Jan 11, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
dbe2402e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
17 deletions
+128
-17
fillInTheBlanks.vue
src/components/word/fillInTheBlanks.vue
+35
-17
studyComplete.vue
src/pages/word/studyComplete.vue
+6
-0
test.vue
src/pages/word/test.vue
+87
-0
No files found.
src/components/word/fillInTheBlanks.vue
View file @
9a07b125
...
...
@@ -8,32 +8,32 @@
.box
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
0
20
px
;
padding
:
0
40
r
px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.dc
{
font-size
:
26
px
;
font-size
:
60
r
px
;
color
:
#111111
;
font-weight
:
bold
;
margin-top
:
160
rpx
;
}
.dclx
{
padding
:
4
px
6
px
;
border-radius
:
3px
;
padding
:
4
rpx
6
r
px
;
border-radius
:
3
r
px
;
background
:
#E8E9EA
;
font-size
:
14
px
;
font-size
:
28
r
px
;
color
:
#666666
;
margin-top
:
18
px
;
margin-top
:
36
r
px
;
word-wrap
:
break-word
;
}
.dclx2
{
font-size
:
16
px
;
font-size
:
32
r
px
;
font-weight
:
500
;
color
:
#111111
;
margin-top
:
30
px
;
margin-top
:
60
r
px
;
}
.btn
{
width
:
100%
;
...
...
@@ -42,7 +42,7 @@
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
16
px
;
font-size
:
32
r
px
;
color
:
#4C50E7
;
margin-top
:
160
rpx
;
background
:
#E4E5FB
;
...
...
@@ -56,7 +56,7 @@
}
.sign
{
position
:
absolute
;
right
:
33
px
;
right
:
66
r
px
;
top
:
36
rpx
;
}
.error
{
...
...
@@ -65,6 +65,7 @@
}
.row
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-wrap
:
wrap
;
}
...
...
@@ -72,13 +73,13 @@
<
template
>
<view
class=
"fillInTheBlanks"
>
<view
class=
"box"
>
<view
class=
"dc row"
>
<text>
火曜日
</text>
<mypone
maxlength=
"2"
v-model=
"test"
style=
"display: inline-block;"
></mypone>
<text>
日sa
</text>
<view
style=
"font-size:26rpx;width:100%"
>
{{
item
.
Title
}}
</view>
<mypone
:maxlength=
"getNum(item)"
v-model=
"test"
style=
"display: inline-block;"
></mypone>
</view>
<view
class=
"dclx"
>
名词
</view>
<view
class=
"dclx2"
>
今天是星期二
</view>
<view
class=
"dclx"
>
{{
item
.
WordType
}}
</view>
<view
class=
"dclx2"
>
{{
item
.
ChineseMean
}}
</view>
<view
class=
"btn"
v-if=
"type==0"
@
click=
"getjieguo"
>
确定
</view>
<view
class=
"btn correct"
v-if=
"type==1"
>
正确
<view
class=
"sign"
>
...
...
@@ -104,13 +105,31 @@
components
:
{
mypone
},
props
:{
item
:{
type
:
Object
,
default
:()
=>
{
return
{}
}
}
},
setup
(
props
,{
attrs
,
slots
,
emit
})
{
let
data
=
reactive
({
test
:
''
,
type
:
0
,
//1是正确 2是错误
})
let
methods
=
{
getNum
(
item
){
const
answer
=
item
.
Answer
const
index
=
answer
.
indexOf
(
"("
)
if
(
index
>-
1
){
return
index
+
1
}
else
{
return
answer
.
length
}
},
getjieguo
(){
console
.
log
(
130
,
data
.
test
)
if
(
data
.
test
==
''
){
uni
.
showToast
({
title
:
'请输入'
,
...
...
@@ -126,8 +145,7 @@
}
}
onMounted
(()
=>
{
console
.
log
(
137
,
props
.
item
)
})
let
that
=
methods
;
return
{
...
...
src/pages/word/studyComplete.vue
View file @
9a07b125
...
...
@@ -89,6 +89,8 @@
color
:
#fff
;
background-color
:
#4C50E7
;
margin
:
auto
;
font-size
:
28
rpx
;
font-weight
:
500
;
}
.study_GoLearn
{
...
...
@@ -100,11 +102,15 @@
color
:
#4C50E7
;
background-color
:
#E4E5FB
;
margin
:
36
rpx
auto
;
font-size
:
28
rpx
;
font-weight
:
500
;
}
.studyBack
{
color
:
#BBBCCE
;
margin-top
:
60
rpx
;
font-size
:
28
rpx
;
font-weight
:
500
;
}
.study_Piao
{
...
...
src/pages/word/test.vue
0 → 100644
View file @
9a07b125
<
template
>
<view
class=
"wordTest"
>
<swiper
class=
"swiper"
>
<swiper-item
v-for=
"(item,index) in reviewGroupList"
:key=
"index"
class=
"swiper-item"
>
<Choice
v-if=
"item.QuestionTypeId==1"
></Choice>
<!--
<Explain
v-if=
"item.QuestionTypeId==3"
></Explain>
-->
<FillIn
v-if=
"item.QuestionTypeId==3"
:item=
"item"
></FillIn>
</swiper-item>
<swiper-item
v-for=
"(item,index) in prepGroupList"
:key=
"index"
class=
"swiper-item"
>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
getCurrentInstance
,
onMounted
,
}
from
"vue"
;
import
Choice
from
'../../components/word/choiceQuestion.vue'
import
Explain
from
'../../components/word/explain.vue'
import
FillIn
from
'../../components/word/fillInTheBlanks.vue'
export
default
{
components
:
{
Choice
,
Explain
,
FillIn
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
msg
:
{
CourseId
:
0
,
ChapterId
:
0
,
NextChapterId
:
0
},
reviewGroupList
:
[],
prepGroupList
:
[],
})
let
methods
=
{
getList
()
{
proxy
.
$request
(
'/AppletWords/CreateCourseExam'
,
data
.
msg
).
then
(
res
=>
{
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
})
}
}
onMounted
(()
=>
{
})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
(
options
)
{
uni
.
setNavigationBarTitle
({
title
:
'单词测试'
});
const
userInfo
=
uni
.
getStorageSync
(
'userinfo'
);
this
.
msg
.
CourseId
=
options
.
CourseId
this
.
msg
.
ChapterId
=
options
.
ChapterId
this
.
msg
.
NextChapterId
=
options
.
NextChapterId
this
.
getList
()
},
}
</
script
>
<
style
scoped
>
.wordTest
{
min-height
:
100vh
;
background-color
:
#F5F5F5
;
}
.wordTest
.swiper
{
min-height
:
100vh
;
background-color
:
#F5F5F5
;
}
</
style
>
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