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
61126524
Commit
61126524
authored
Jan 12, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/educationstu
into master
# Conflicts: # src/pages/word/test.vue
parents
8b0a53f0
6c4dc420
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
89 deletions
+118
-89
test.vue
src/pages/word/test.vue
+118
-89
No files found.
src/pages/word/test.vue
View file @
61126524
<
template
>
<view
class=
"wordTest"
>
<button
class=
""
>
交卷
</button>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
<swiper-item
v-for=
"(item,index) in reviewGroupList"
:key=
"index"
class=
"swiper-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>
</swiper-item>
<swiper-item
v-for=
"(item,index) in prepGroupList"
:key=
"index"
class=
"swiper-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>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
<view
class=
"wordTest"
>
<button
class=
""
@
click=
"submitWordsTest"
>
交卷
</button>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
<swiper-item
v-for=
"(item, index) in reviewGroupList"
:key=
"index"
class=
"swiper-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>
</swiper-item>
<swiper-item
v-for=
"(item, index) in prepGroupList"
:key=
"index"
class=
"swiper-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>
</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
FillIn
from
'../../components/word/fillInTheBlanks.vue'
export
default
{
components
:
{
Choice
,
FillIn
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
msg
:
{
CourseId
:
0
,
ChapterId
:
0
,
NextChapterId
:
0
},
curTest
:
0
,
reviewGroupList
:
[],
prepGroupList
:
[],
})
let
methods
=
{
getList
()
{
proxy
.
$request
(
'/AppletWords/CreateCourseExam'
,
data
.
msg
).
then
(
res
=>
{
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
})
},
changeSwiper
(
val
){
data
.
curTest
=
val
.
detail
.
current
},
next
(
val
,
item
){
if
(
val
){
item
.
IsTrue
=
val
}
data
.
curTest
+=
1
}
}
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
()
},
}
import
{
ref
,
reactive
,
toRefs
,
getCurrentInstance
,
onMounted
}
from
"vue"
;
import
Choice
from
"../../components/word/choiceQuestion.vue"
;
import
FillIn
from
"../../components/word/fillInTheBlanks.vue"
;
export
default
{
components
:
{
Choice
,
FillIn
,
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
msg
:
{
CourseId
:
0
,
ChapterId
:
0
,
NextChapterId
:
0
,
},
curTest
:
0
,
reviewGroupList
:
[],
prepGroupList
:
[],
});
let
methods
=
{
getList
()
{
proxy
.
$request
(
"/AppletWords/CreateCourseExam"
,
data
.
msg
)
.
then
((
res
)
=>
{
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
;
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
;
});
},
changeSwiper
(
val
)
{
data
.
curTest
=
val
.
detail
.
current
;
},
next
(
val
,
item
)
{
if
(
val
)
{
item
.
IsTrue
=
val
;
}
data
.
curTest
+=
1
;
},
//提交单词测试
submitWordsTest
()
{
var
postMsg
=
{
ClassId
:
1
,
CourseId
:
1
,
ChapterId
:
1
,
ExamStartTime
:
"2021-01-12 10:00:00"
,
Details
:
data
.
reviewGroupList
,
};
proxy
.
$request
(
"/AppletWords/SubmitWordsExam"
,
postMsg
).
then
((
res
)
=>
{
console
.
log
(
"SubmitWordsExam"
,
res
);
});
},
};
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
:
#F5F5F
5
;
}
.wordTest
{
min-height
:
100vh
;
background-color
:
#f5f5f
5
;
}
.wordTest
.swiper
{
min-height
:
100vh
;
background-color
:
#F5F5F
5
;
}
.wordTest
.swiper
{
min-height
:
100vh
;
background-color
:
#f5f5f
5
;
}
</
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