Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
79488961
Commit
79488961
authored
Jul 20, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缺题记录 && 收藏记录缺省页
parent
aa911f30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
71 deletions
+107
-71
answer.vue
src/pages/learn/answer.vue
+107
-71
No files found.
src/pages/learn/answer.vue
View file @
79488961
...
...
@@ -8,48 +8,59 @@
title=
"答题"
title-bold
></u-navbar>
<view
class=
"head"
v-if=
"type !== 3"
>
<view
class=
"u-flex tab"
v-if=
"type === 1"
>
<view
:class=
"['tab-list',
{'active': model === 1}]" @click="changeModel(1)">答题模式
</view>
<view
:class=
"['tab-list',
{'active': model === 2}]" @click="changeModel(2)">学习模式
</view>
</view>
<view
class=
"u-flex count-down"
v-if=
"type === 2"
>
<view>
倒计时:
<u-count-down
:timestamp=
"timestamp"
bg-color=
""
:show-hours=
"false"
></u-count-down></view>
</view>
</view>
<view
class=
"swiper"
>
<swiper-limited-load
ref=
"swiper"
:swiperHeight=
"500"
:swiperDuration=
"swiperDuration"
:list=
"list"
:current=
"current"
:type=
"type"
:model=
"model"
@
answerChange=
"answerChange"
@
change=
"swiperChange"
>
</swiper-limited-load>
</view>
<view
class=
"u-flex u-row-around bottom"
>
<view
class=
"u-flex"
>
<view
class=
"c-list"
>
<u-icon
name=
"grid"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
1/2887
</text>
<view
class=
"u-flex contents"
v-if=
"list.length > 0 && ![4, 5].includes(type)"
>
<view
class=
"head"
v-if=
"type !== 3"
>
<view
class=
"u-flex tab"
v-if=
"type === 1"
>
<view
:class=
"['tab-list',
{'active': model === 1}]" @click="changeModel(1)">答题模式
</view>
<view
:class=
"['tab-list',
{'active': model === 2}]" @click="changeModel(2)">学习模式
</view>
</view>
<view
class=
"u-flex count-down"
v-if=
"type === 2"
>
<view>
倒计时:
<u-count-down
:timestamp=
"timestamp"
bg-color=
""
:show-hours=
"false"
></u-count-down></view>
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"c-list"
v-if=
"type === 1 || type === 3"
@
click=
"collection"
>
<u-icon
name=
"star"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
收藏
</text>
<view
class=
"swiper"
>
<swiper-limited-load
ref=
"swiper"
:swiperHeight=
"500"
:swiperDuration=
"swiperDuration"
:list=
"list"
:current=
"current"
:type=
"type"
:model=
"model"
@
answerChange=
"answerChange"
@
change=
"swiperChange"
>
</swiper-limited-load>
</view>
<view
class=
"u-flex u-row-around bottom"
>
<view
class=
"u-flex"
>
<view
class=
"c-list"
>
<u-icon
name=
"grid"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
1/2887
</text>
</view>
</view>
<view
class=
"c-list"
v-if=
"type === 2"
@
click=
"handPapers"
>
<u-icon
name=
"file-text"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
交卷
</text>
<view
class=
"u-flex"
>
<view
class=
"c-list"
v-if=
"type === 1 || type === 3"
@
click=
"collection"
>
<u-icon
name=
"star"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
收藏
</text>
</view>
<view
class=
"c-list"
v-if=
"type === 2"
@
click=
"handPapers"
>
<u-icon
name=
"file-text"
color=
"#5A6073"
size=
"40"
></u-icon>
<text>
交卷
</text>
</view>
</view>
</view>
</view>
<view
class=
"u-flex default"
v-if=
"list.length === 0 && [4, 5].includes(type)"
>
<view>
<image
:src=
"defaultImg"
/>
</view>
<view
class=
"no-result"
>
{{
type
===
4
?
'当前暂无错题记录'
:
'当前暂无收藏题目'
}}
</view>
</view>
<answer-operation-tips
:show
.
sync=
"show"
/>
<answer-complete-pop
:numberList=
"result"
...
...
@@ -92,7 +103,17 @@ export default {
result
:
[
1
,
2
,
3
]
}
},
computed
:
{},
computed
:
{
defaultImg
()
{
let
name
=
''
if
(
this
.
type
===
4
)
{
name
=
'no-error.png'
}
else
if
(
this
.
type
===
5
)
{
name
=
'no-collect.png'
}
return
process
.
uniEnv
.
qn_base_url
+
name
},
},
created
()
{
const
lists
=
[
{
...
...
@@ -259,48 +280,63 @@ export default {
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-size
:
100%
520rpx
;
background-repeat
:
no-repeat
;
.
head
{
.
contents
{
width
:
100%
;
height
:
90rpx
;
.tab
{
margin
:
10rpx
auto
;
border
:
2rpx
solid
#2953FF
;
border-radius
:
10rpx
;
width
:
300rpx
;
.tab-list
{
flex
:
1
;
padding
:
10rpx
25rpx
;
font-size
:
24rpx
;
color
:
#191C27
;
flex
:
1
;
flex-direction
:
column
;
.head
{
width
:
100%
;
height
:
90rpx
;
.tab
{
margin
:
10rpx
auto
;
border
:
2rpx
solid
#2953FF
;
border-radius
:
10rpx
;
width
:
300rpx
;
.tab-list
{
flex
:
1
;
padding
:
10rpx
25rpx
;
font-size
:
24rpx
;
color
:
#191C27
;
}
.active
{
background
:
#2953FF
;
color
:
#fff
;
}
}
.active
{
background
:
#2953FF
;
color
:
#fff
;
.count-down
{
color
:
#5A6073
;
font-size
:
32rpx
;
margin
:
10rpx
auto
;
width
:
230rpx
;
}
}
.count-down
{
color
:
#5A6073
;
font-size
:
32rpx
;
margin
:
10rpx
auto
;
width
:
230rpx
;
.swiper
{
width
:
100%
;
flex
:
1
;
}
}
.swiper
{
width
:
100%
;
flex
:
1
;
}
.bottom
{
width
:
100%
;
height
:
150rpx
;
border-top
:
2rpx
solid
#ccc
;
color
:
#5a6073
;
font-size
:
28rpx
;
.c-list
{
display
:
flex
;
text
{
padding-left
:
10rpx
;
.bottom
{
width
:
100%
;
height
:
150rpx
;
border-top
:
2rpx
solid
#ccc
;
color
:
#5a6073
;
font-size
:
28rpx
;
.c-list
{
display
:
flex
;
text
{
padding-left
:
10rpx
;
}
}
}
}
.default
{
flex-flow
:
column
;
flex
:
1
;
justify-content
:
center
;
.no-result
{
color
:
#9EA5BB
;
font-size
:
28rpx
;
}
}
}
</
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