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
8a7ed781
Commit
8a7ed781
authored
Jan 12, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
d84e18eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
18 deletions
+40
-18
index.vue
src/pages/index/index.vue
+18
-13
test.vue
src/pages/word/test.vue
+12
-3
word.vue
src/pages/word/word.vue
+10
-2
No files found.
src/pages/index/index.vue
View file @
8a7ed781
...
...
@@ -29,7 +29,7 @@
</view>
</navbar>
<view
class=
"activeContent"
v-if=
"ActivityList.length >
=
0"
>
<view
class=
"activeContent"
v-if=
"ActivityList.length > 0"
>
<swiper
class=
"swiper"
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
indicator-color=
"#CCCCCC"
indicator-active-color=
"#000000"
:vertical=
"true"
circular
>
<swiper-item
v-for=
"(item, index) in ActivityList"
:key=
"index"
@
click=
"goActiveDetail(item.Id)"
>
...
...
@@ -67,10 +67,6 @@
@
click=
"jumpPage(`/pages/word/word?CourseId=$
{pageData.Words.CourseId}
&&
ChapterId=${pageData.Words.NextCourseNo}
&&
ReviewChapterId=${pageData.Words.ReviewCourseNo}
&&
ClassId=${pageData.Words.ClassId}`)">
开始学习
</view>
<view
class=
"wordBtn"
@
click=
"jumpPage(`/pages/word/test?CourseId=$
{pageData.Words.CourseId}
&&
ChapterId=${pageData.Words.NextCourseNo}
&&
ReviewChapterId=${pageData.Words.ReviewCourseNo}
&&
ClassId=${pageData.Words.ClassId}`)">
开始ces
</view>
</view>
<view
class=
"courseBox"
>
<view
class=
"courseInnerBox"
@
click=
"jumpTimetable"
>
...
...
@@ -103,18 +99,24 @@
下节课
</view>
</view>
<view
class=
"learningGarden"
>
<view
class=
"learningGarden"
v-if=
"pageData.LearningGardenList.length>0"
>
<view
class=
"learningGardenSbutitle"
>
扩展学习
</view>
<view
v-for=
"(item,index) in pageData.LearningGardenList"
:key=
"index"
v-if=
"item.List.length>0"
>
<view
class=
"learningGardenTitle"
>
<text>
{{
item
.
Name
}}
</text>
<text
style=
"font-size: 24rpx;
<view
style=
"
height: 60rpx;
line-height: 59rpx;
font-size: 24rpx;
font-weight: 500;
color: #4C50E7;"
@
click=
"jumpGarden(item.Id)"
>
查看更多
</text>
color: #4C50E7;display: flex;"
@
click=
"jumpGarden(item.Id)"
>
查看更多
<van-icon
name=
"arrow"
/>
</view>
</view>
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
@
click=
"jumpPage(`/pages/learningGarden/learningGardenDetails?Id=$
{item1.Id}`)">
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
@
click=
"jumpPage(`/pages/learningGarden/learningGardenDetails?Id=$
{item1.Id}`)">
<image
:src=
"item1.Img"
mode=
"aspectFill"
:id=
"'img'+index1"
style=
"width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"
></image>
<view
class=
"gardenTextBox"
...
...
@@ -130,7 +132,7 @@
</view>
</view>
<bottom></bottom>
<canvas
canvas-id=
"myCanvas"
class=
"canvas"
style=
"position:absolute;left: -1000px;"
></canvas>
<canvas
canvas-id=
"myCanvas"
class=
"canvas"
style=
"position:absolute;left: -1000px;"
></canvas>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
...
...
@@ -175,7 +177,9 @@
SelectIsEnd
:
0
,
},
ActivityList
:
[],
pageData
:
{},
pageData
:
{
LearningGardenList
:[]
},
userData
:
{}
});
...
...
@@ -259,8 +263,7 @@
};
onMounted
(()
=>
{
methods
.
getIndexData
();
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
});
return
{
...
toRefs
(
data
),
...
...
@@ -269,6 +272,8 @@
},
onShow
()
{
this
.
getActivityData
();
this
.
getIndexData
();
this
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
},
onShareAppMessage
()
{
return
{
...
...
src/pages/word/test.vue
View file @
8a7ed781
<
template
>
<view
class=
"wordTest"
>
<van-skeleton
title
row=
"10"
v-if=
"reviewGroupList.length===0&&prepGroupList.length===0"
/>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
v-else
>
<van-skeleton
title
row=
"10"
v-if=
"loading"
/>
<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>
...
...
@@ -12,7 +13,8 @@
</swiper-item>
<swiper-item>
<van-popup
:show=
"true"
position=
"center"
custom-style=
"background-color: transparent;"
>
<van-loading
size=
"50rpx"
type=
"spinner"
color=
"#ffffff"
>
<text
style=
"color:#ffffff"
>
交卷中...
</text></van-loading>
<van-loading
size=
"50rpx"
type=
"spinner"
color=
"#ffffff"
>
<text
style=
"color:#ffffff"
>
交卷中...
</text>
</van-loading>
</van-popup>
</swiper-item>
</swiper>
...
...
@@ -51,14 +53,21 @@
curTest
:
0
,
reviewGroupList
:
[],
prepGroupList
:
[],
loading
:
false
,
nodata
:
false
,
});
let
methods
=
{
getList
()
{
data
.
loading
=
true
proxy
.
$request
(
"/AppletWords/CreateCourseExam"
,
data
.
msg
)
.
then
((
res
)
=>
{
data
.
loading
=
false
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
;
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
;
if
(
data
.
reviewGroupList
.
length
===
0
&&
data
.
reviewGroupList
.
length
==
0
)
{
data
.
nodata
=
true
}
});
},
changeSwiper
(
val
)
{
...
...
src/pages/word/word.vue
View file @
8a7ed781
<
template
>
<view
class=
"word"
>
<van-skeleton
title
row=
"10"
v-if=
"StudyList.length===0&&ReviewList.length===0"
/>
<swiper
class=
"swiper"
next-margin=
"60rpx"
@
change=
"swiperChange"
:current=
"current"
v-else
>
<van-skeleton
title
row=
"10"
v-if=
"loading"
/>
<van-empty
description=
"暂无数据"
v-if=
"nodata"
/>
<swiper
class=
"swiper"
next-margin=
"60rpx"
@
change=
"swiperChange"
:current=
"current"
v-if=
"!loading&&!nodata"
>
<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>
...
...
@@ -51,11 +52,15 @@
StudyNum
:
0
,
//学习总单词数量
StudyType
:
1
,
//1-预习,2-复习
},
loading
:
false
,
nodata
:
false
,
})
let
methods
=
{
getData
()
{
data
.
loading
=
true
proxy
.
$request
(
'/AppletWords/GetStudyWords'
,
data
.
msg
).
then
(
res
=>
{
data
.
loading
=
false
data
.
StudyList
=
res
.
Data
.
StudyList
data
.
ReviewList
=
res
.
Data
.
ReviewList
;
const
total
=
data
.
StudyList
.
length
+
data
.
ReviewList
.
length
;
...
...
@@ -67,6 +72,9 @@
data
.
current
=
total
-
1
}
}
if
(
data
.
StudyList
.
length
===
0
&&
data
.
ReviewList
.
length
==
0
)
{
data
.
nodata
=
true
}
})
},
swiperChange
(
val
)
{
...
...
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