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
72610769
Commit
72610769
authored
Jan 13, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
95d22c35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
287 additions
and
200 deletions
+287
-200
choiceQuestion.vue
src/components/word/choiceQuestion.vue
+9
-0
fillInTheBlanks.vue
src/components/word/fillInTheBlanks.vue
+8
-0
index.vue
src/pages/index/index.vue
+2
-1
index.vue
src/pages/study/index.vue
+268
-199
No files found.
src/components/word/choiceQuestion.vue
View file @
72610769
...
@@ -119,6 +119,8 @@
...
@@ -119,6 +119,8 @@
provide
provide
}
from
"vue"
;
}
from
"vue"
;
import
Explain
from
'./explain.vue'
import
Explain
from
'./explain.vue'
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
false
;
export
default
{
export
default
{
components
:
{
components
:
{
Explain
Explain
...
@@ -151,15 +153,18 @@
...
@@ -151,15 +153,18 @@
let
data
=
reactive
({
let
data
=
reactive
({
current
:
''
,
//用户选择
current
:
''
,
//用户选择
isShowExplain
:
false
,
isShowExplain
:
false
,
})
})
let
methods
=
{
let
methods
=
{
choice
(
x
)
{
choice
(
x
)
{
data
.
current
=
x
.
Name
;
data
.
current
=
x
.
Name
;
if
(
data
.
current
!==
props
.
item
.
Answer
)
{
if
(
data
.
current
!==
props
.
item
.
Answer
)
{
methods
.
play
(
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/false.mp3'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
data
.
isShowExplain
=
true
data
.
isShowExplain
=
true
},
800
)
},
800
)
}
else
{
}
else
{
methods
.
play
(
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/true.mp3'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
emit
(
'next'
,
1
)
emit
(
'next'
,
1
)
},
500
)
},
500
)
...
@@ -168,6 +173,10 @@
...
@@ -168,6 +173,10 @@
todo
()
{
todo
()
{
emit
(
'next'
)
emit
(
'next'
)
data
.
isShowExplain
=
false
data
.
isShowExplain
=
false
},
play
(
url
)
{
innerAudioContext
.
src
=
url
innerAudioContext
.
play
()
}
}
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/components/word/fillInTheBlanks.vue
View file @
72610769
...
@@ -99,6 +99,8 @@
...
@@ -99,6 +99,8 @@
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
}
from
"vue"
;
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
}
from
"vue"
;
import
mypone
from
'./myp-one.vue'
import
mypone
from
'./myp-one.vue'
import
Explain
from
'./explain.vue'
import
Explain
from
'./explain.vue'
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
false
;
export
default
{
export
default
{
components
:
{
components
:
{
mypone
,
mypone
,
...
@@ -146,11 +148,13 @@
...
@@ -146,11 +148,13 @@
}
}
if
(
data
.
test
==
props
.
item
.
Answer
||
props
.
item
.
Answer
.
indexOf
(
data
.
test
)
>-
1
){
if
(
data
.
test
==
props
.
item
.
Answer
||
props
.
item
.
Answer
.
indexOf
(
data
.
test
)
>-
1
){
data
.
type
=
1
data
.
type
=
1
methods
.
play
(
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/true.mp3'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
emit
(
'next'
,
1
)
emit
(
'next'
,
1
)
},
500
)
},
500
)
}
else
{
}
else
{
data
.
type
=
2
data
.
type
=
2
methods
.
play
(
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/false.mp3'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
data
.
isShowExplain
=
true
data
.
isShowExplain
=
true
},
500
)
},
500
)
...
@@ -162,6 +166,10 @@
...
@@ -162,6 +166,10 @@
todo
(){
todo
(){
emit
(
'next'
)
emit
(
'next'
)
data
.
isShowExplain
=
false
data
.
isShowExplain
=
false
},
play
(
url
)
{
innerAudioContext
.
src
=
url
innerAudioContext
.
play
()
}
}
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/pages/index/index.vue
View file @
72610769
...
@@ -63,7 +63,8 @@
...
@@ -63,7 +63,8 @@
<view
class=
"wordDuration"
style=
"visibility: hidden;"
>
<view
class=
"wordDuration"
style=
"visibility: hidden;"
>
预计用时10分钟
预计用时10分钟
</view>
</view>
<view
class=
"wordBtn"
<view
class=
"wordBtn"
v-if=
"(pageData.Words.NextWord==0||!pageData.Words.NextWord)&&(pageData.Words.ReviewWord==0||!pageData.Words.ReviewWord)"
>
暂无新词
</view>
<view
class=
"wordBtn"
v-else
@
click=
"jumpPage(`/pages/word/word?CourseId=$
{pageData.Words.CourseId||0}
&&
ChapterId=${pageData.Words.NextCourseNo||0}
&&
ReviewChapterId=${pageData.Words.ReviewCourseNo||0}
&&
ClassId=${pageData.Words.ClassId||0}`)">
@
click=
"jumpPage(`/pages/word/word?CourseId=$
{pageData.Words.CourseId||0}
&&
ChapterId=${pageData.Words.NextCourseNo||0}
&&
ReviewChapterId=${pageData.Words.ReviewCourseNo||0}
&&
ClassId=${pageData.Words.ClassId||0}`)">
开始学习
开始学习
</view>
</view>
...
...
src/pages/study/index.vue
View file @
72610769
This diff is collapsed.
Click to expand it.
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