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
134d02db
Commit
134d02db
authored
Jan 10, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
b0510cf0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
185 additions
and
46 deletions
+185
-46
Pronunciation.vue
src/components/word/Pronunciation.vue
+123
-17
pages.json
src/pages.json
+5
-1
index.vue
src/pages/index/index.vue
+21
-19
word.vue
src/pages/word/word.vue
+36
-9
No files found.
src/components/word/Pronunciation.vue
View file @
134d02db
<
template
>
<view
class=
"wordPronItem"
>
<view
class=
"num"
>
1/26
{{
cur
}}
/
{{
total
}}
<text
style=
"margin-left: 6rpx;"
>
{{
type
==
0
?
''
:
"复习"
}}
</text>
</view>
<view
class=
"meaning"
>
{{
item
.
ChineseMean
}}
</view>
<view
class=
"Japanese"
>
{{
item
.
WordWrite
}}
</view>
<view
class=
"desc"
>
<view
class=
"attr"
>
{{
item
.
WordType
}}
</view>
<view
class=
"hiragana"
>
{{
item
.
WordContent
}}
</view>
</view>
<view
class=
"listen"
@
click=
"play"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/laba2x.png"
mode=
"aspectFit"
class=
"listenIcon"
></image>
</view>
<view
class=
"listenText"
>
播放读音
</view>
</view>
</
template
>
...
...
@@ -18,27 +39,40 @@
onMounted
,
provide
,
}
from
"vue"
;
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
false
;
export
default
{
components
:
{
},
props
:{
item
:{
type
:
Object
,
default
:()
=>
{
return
{}}
props
:
{
type
:{
type
:
Number
,
default
:
0
},
cur
:
{
type
:
Number
,
default
:
0
},
total
:
{
type
:
Number
,
default
:
0
},
item
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
setup
(){
let
data
=
reactive
({
})
let
methods
=
{
setup
(
props
)
{
const
url
=
ref
(
'./cesi.mp3'
)
const
methods
=
{
play
(){
// innerAudioContext.src=props.item.FileUrl
innerAudioContext
.
src
=
url
innerAudioContext
.
play
()
}
}
return
{
...
toRefs
(
data
),
...
methods
,
...
methods
};
}
}
...
...
@@ -48,12 +82,84 @@
.wordPronItem
{
width
:
640
rpx
;
height
:
990
rpx
;
box-shadow
:
0
rpx
15
rpx
80
rpx
0
rpx
#E9E9E9
;
border-radius
:
24
rpx
;
margin
:
100
rpx
auto
0
;
}
.wordPronItem
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
700
;
color
:
#999999
;
padding
:
50
rpx
0
110
rpx
0
;
text-align
:
center
;
}
.meaning
{
font-size
:
28
rpx
;
font-weight
:
500
;
color
:
#111111
;
margin-bottom
:
80
rpx
;
text-align
:
center
;
}
.Japanese
{
font-size
:
60
rpx
;
font-weight
:
bold
;
color
:
#111111
;
text-align
:
center
;
margin-bottom
:
60
rpx
;
}
.wordPronItem
.desc
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-bottom
:
200
rpx
;
}
.wordPronItem
.attr
{
background-color
:
#E8E9EA
;
border-radius
:
6
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
padding
:
5
rpx
10
rpx
;
line-height
:
30
rpx
;
margin-right
:
15
rpx
;
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#666666
;
}
.wordPronItem
.hiragana
{
font-size
:
28
rpx
;
font-weight
:
500
;
color
:
#999999
;
}
.listen
{
width
:
170
rpx
;
height
:
170
rpx
;
background-color
:
#E4E5FB
;
border-radius
:
50%
;
margin
:
0
auto
30
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.listenIcon
{
width
:
55
rpx
;
height
:
55
rpx
;
}
.listenText
{
font-size
:
22
rpx
;
font-weight
:
500
;
color
:
#B8B8B8
;
text-align
:
center
;
}
</
style
>
src/pages.json
View file @
134d02db
...
...
@@ -102,7 +102,11 @@
{
"root"
:
"pages/word"
,
//单词分包
"pages"
:
[{
"path"
:
"word"
//
"path"
:
"word"
,
//
"style"
:{
"backgroundColor"
:
"#f5f5f5"
,
"navigationBarBackgroundColor"
:
"#f5f5f5"
}
}]
}
],
...
...
src/pages/index/index.vue
View file @
134d02db
<
template
>
<view
class=
"indexpage"
>
<van-sticky
>
<van-sticky>
<navbar
class=
"navbarSticky"
>
<view
class=
"navbarCon"
>
<view
class=
"pagetitle"
@
click=
"jumpPage('/pages/login/login')"
>
...
...
@@ -14,10 +14,10 @@
mode=
"aspectFit"
class=
"loginIcon"
id=
"loadImg"
></image>
登录
</view>
</indexassembly>
</indexassembly>
</view>
<view
class=
"scanBox"
@
click=
"jumpPage('/pages/word/word')"
>
<view
class=
"scanBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
mode=
"aspectFit"
class=
"scanIcon"
></image>
...
...
@@ -51,18 +51,19 @@
<view
class=
"flex_around_center "
>
<view
class=
"wordItem"
>
<text
class=
"wordItemTitle"
>
今日新词
</text>
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
NextWord
}}
<text
class=
"wordItemTextUnit"
>
词
</text></text>
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
NextWord
||
0
}}
<text
class=
"wordItemTextUnit"
>
词
</text></text>
</view>
<view
class=
"wordItem"
>
<text
class=
"wordItemTitle"
>
复习词语
</text>
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
ReviewWord
}}
<text
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
ReviewWord
||
0
}}
<text
class=
"wordItemTextUnit"
>
词
</text></text>
</view>
</view>
<view
class=
"wordDuration"
>
预计用时10分钟
</view>
<view
class=
"wordBtn"
>
<view
class=
"wordBtn"
@
click=
"jumpPage(`/pages/word/word?CourseId=$
{pageData.Words.CourseId}
&&
ChapterId=${pageData.Words.NextCourseNo}
&&
PrevChapterId=${pageData.Words.ReviewCourseNo}`)">
开始学习
</view>
</view>
...
...
@@ -82,10 +83,10 @@
</view>
<view
class=
"flex"
>
<view
class=
"courseNameBox"
>
<view
class=
"className"
>
<view
class=
"className
one_line
"
>
{{
pageData
.
ClassNext
.
ClassName
||
'暂无'
}}
</view>
<view
class=
"courseName"
>
<view
class=
"courseName
one_line
"
>
{{
pageData
.
ClassNext
.
CourseName
||
'暂无'
}}
</view>
</view>
...
...
@@ -193,10 +194,10 @@
console
.
log
(
168
,
formatres
)
return
formatres
},
againdata
(){
data
.
pageData
=
uni
.
getStorageSync
(
"userInfo"
);
methods
.
getIndexData
();
methods
.
getActivityData
();
againdata
()
{
data
.
pageData
=
uni
.
getStorageSync
(
"userInfo"
);
methods
.
getIndexData
();
methods
.
getActivityData
();
}
};
...
...
@@ -240,11 +241,13 @@
box-sizing
:
border-box
;
padding-bottom
:
40
rpx
;
}
.navbarSticky
{
.navbarSticky
{
display
:
sticky
;
top
:
0
;
z-index
:
9
;
}
.navbarCon
{
height
:
100%
;
box-sizing
:
border-box
;
...
...
@@ -404,6 +407,8 @@
.wordBtn
{
width
:
130
rpx
;
height
:
50
rpx
;
text-align
:
center
;
line-height
:
50
rpx
;
background-color
:
#4C50E7
;
border-radius
:
25
rpx
;
margin
:
10
rpx
auto
;
...
...
@@ -411,9 +416,6 @@
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#FEFEFF
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.courseBox
{
...
...
@@ -489,14 +491,14 @@
.courseName
{
width
:
355
rrpx
;
height
:
75
rpx
;
line-height
:
73
rpx
;
background-color
:
#F5F5F5
;
border-radius
:
35
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
42
rpx
;
font-weight
:
bold
;
color
:
#111111
;
padding
:
0
10
rpx
;
box-sizing
:
border-box
;
}
.learningGarden
{
...
...
src/pages/word/word.vue
View file @
134d02db
<
template
>
<view
class=
"word"
>
<swiper
class=
"swiper"
>
<swiper-item
v-for=
"(item,index) in test"
:key=
"index"
>
<view
class=
"swiper-item uni-bg-green"
>
index
</view>
<Pronunciation></Pronunciation>
<swiper
class=
"swiper"
next-margin=
"60rpx"
>
<swiper-item
v-for=
"(item,index) in StudyList"
:key=
"index"
class=
"swiper-item"
>
<Pronunciation
:item=
"item"
:cur=
"index+1"
:total=
"StudyList.length"
></Pronunciation>
</swiper-item>
<swiper-item
v-for=
"(item,index) in ReviewList"
:key=
"index"
class=
"swiper-item"
>
<Pronunciation
:item=
"item"
:cur=
"index+1"
:total=
"ReviewList.length"
:type=
"1"
></Pronunciation>
</swiper-item>
</swiper>
</view>
...
...
@@ -27,12 +29,24 @@
Pronunciation
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
test
:
[
1
,
2
,
3
]
test
:
[
1
,
2
,
3
],
msg
:{
ChapterId
:
0
,
CourseId
:
0
,
PrevChapterId
:
0
,
},
StudyList
:[],
ReviewList
:[],
})
let
methods
=
{
getData
(){
proxy
.
$request
(
'/AppletWords/GetStudyWords'
,
data
.
msg
).
then
(
res
=>
{
data
.
StudyList
=
res
.
Data
.
StudyList
data
.
ReviewList
=
res
.
Data
.
ReviewList
})
}
}
onMounted
(()
=>
{
...
...
@@ -43,10 +57,14 @@
...
methods
,
};
},
onLoad
(
option
)
{
onLoad
(
option
s
)
{
uni
.
setNavigationBarTitle
({
title
:
'新的标题'
});
this
.
msg
.
ChapterId
=
options
.
ChapterId
this
.
msg
.
CourseId
=
options
.
CourseId
this
.
msg
.
PrevChapterId
=
options
.
PrevChapterId
this
.
getData
()
},
}
</
script
>
...
...
@@ -56,4 +74,13 @@
min-height
:
100vh
;
background-color
:
#F5F5F5
;
}
</
style
>
.word
.swiper
{
min-height
:
100vh
;
background-color
:
#F5F5F5
;
}
.word
.swiper-item
{
min-height
:
100vh
;
background-color
:
#F5F5F5
;
/* padding-left: 55rpx; */
}
</
style
>
\ No newline at end of file
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