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
4b21073b
Commit
4b21073b
authored
Jul 22, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
32f278e3
53d4c5f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
35 deletions
+64
-35
answer.vue
src/pages/learn/answer.vue
+64
-35
No files found.
src/pages/learn/answer.vue
View file @
4b21073b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
title-bold
title-bold
></u-navbar>
></u-navbar>
<view
class=
"u-flex contents"
v-if=
"total > 0"
>
<view
class=
"u-flex contents"
v-if=
"total > 0"
>
<view
class=
"head"
v-if=
"!daily"
>
<view
class=
"head"
v-if=
"!daily
.status
"
>
<view
class=
"u-flex tab"
v-if=
"type !== 2"
>
<view
class=
"u-flex tab"
v-if=
"type !== 2"
>
<view
<view
:class=
"['tab-list',
{ active: model === 1 }]"
:class=
"['tab-list',
{ active: model === 1 }]"
...
@@ -88,15 +88,30 @@
...
@@ -88,15 +88,30 @@
</view>
</view>
</view>
</view>
<!-- 提示 -->
<answer-operation-tips
:show
.
sync=
"show"
/>
<answer-operation-tips
:show
.
sync=
"show"
/>
<!-- 考试成绩 -->
<answer-complete-pop
<answer-complete-pop
:numberList=
"result"
:numberList=
"
complete.
result"
:type=
"complete
T
ype"
:type=
"complete
.t
ype"
:visible
.
sync=
"visible"
:visible
.
sync=
"
complete.
visible"
@
cancel=
"cancel"
@
cancel=
"cancel"
@
submit=
"submit"
@
submit=
"submit"
>
>
</answer-complete-pop>
</answer-complete-pop>
<!-- 每日一练 -->
<view
class=
"daily"
>
<dailyPop
:count=
"daily.count"
:visible
.
sync=
"daily.visible"
@
cancel=
"dailyCancel"
@
submit=
"dailySubmit"
>
</dailyPop>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -104,6 +119,8 @@
...
@@ -104,6 +119,8 @@
import
swiperLimitedLoad
from
'@/components/swiper-limited-load/index.vue'
import
swiperLimitedLoad
from
'@/components/swiper-limited-load/index.vue'
import
answerOperationTips
from
'@/components/answer-operation-tips/index.vue'
import
answerOperationTips
from
'@/components/answer-operation-tips/index.vue'
import
answerCompletePop
from
'@/components/answer-complete-pop/index.vue'
import
answerCompletePop
from
'@/components/answer-complete-pop/index.vue'
import
dailyPop
from
'@/components/daily-pop/index.vue'
import
Utils
from
'./utils.js'
import
Utils
from
'./utils.js'
const
NO_PREV_PAGE
=
-
1
const
NO_PREV_PAGE
=
-
1
...
@@ -114,18 +131,27 @@ export default {
...
@@ -114,18 +131,27 @@ export default {
swiperLimitedLoad
,
swiperLimitedLoad
,
answerOperationTips
,
answerOperationTips
,
answerCompletePop
,
answerCompletePop
,
dailyPop
},
},
data
()
{
data
()
{
return
{
return
{
visible
:
false
,
show
:
false
,
show
:
false
,
// 1 练习 or 每日一练 2 考试 3 收藏记录 4 错题记录
// 1 练习 or 每日一练 2 考试 3 收藏记录 4 错题记录
type
:
1
,
type
:
1
,
// 1 答题模式 2 学习模式
// 1 答题模式 2 学习模式
model
:
1
,
model
:
1
,
// 每日一练
// 每日一练
daily
:
false
,
daily
:
{
dailyCount
:
0
,
status
:
false
,
count
:
0
,
visible
:
false
},
// 考试成绩弹框
complete
:
{
type
:
'pass'
,
result
:
[],
visible
:
false
,
},
timestamp
:
60
*
60
,
timestamp
:
60
*
60
,
list
:
[],
list
:
[],
// key为currentPage,value为此页list数据
// key为currentPage,value为此页list数据
...
@@ -135,8 +161,6 @@ export default {
...
@@ -135,8 +161,6 @@ export default {
// 仅仅记录swiper的位置
// 仅仅记录swiper的位置
currentIndex
:
0
,
currentIndex
:
0
,
swiperDuration
:
'0'
,
swiperDuration
:
'0'
,
result
:
[],
completeType
:
'pass'
,
// 分页数据
// 分页数据
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -346,11 +370,11 @@ export default {
...
@@ -346,11 +370,11 @@ export default {
this
.
$u
.
vuex
(
'lastIndex'
,
this
.
currentIndex
)
this
.
$u
.
vuex
(
'lastIndex'
,
this
.
currentIndex
)
// 每日一练数量统计
// 每日一练数量统计
if
(
this
.
type
===
1
&&
this
.
daily
)
{
if
(
this
.
type
===
1
&&
this
.
daily
.
status
)
{
if
(
this
.
daily
Count
<
9
)
this
.
dailyC
ount
++
if
(
this
.
daily
.
count
<
9
)
this
.
daily
.
c
ount
++
if
(
this
.
daily
C
ount
===
9
)
{
if
(
this
.
daily
.
c
ount
===
9
)
{
this
.
completeType
=
'daily'
this
.
daily
.
visible
=
true
this
.
visible
=
tru
e
this
.
daily
.
status
=
fals
e
return
return
}
}
}
}
...
@@ -370,30 +394,28 @@ export default {
...
@@ -370,30 +394,28 @@ export default {
const
fail
=
this
.
list
.
filter
((
v
)
=>
v
.
result
===
'fail'
).
length
// 错题数
const
fail
=
this
.
list
.
filter
((
v
)
=>
v
.
result
===
'fail'
).
length
// 错题数
const
noStart
=
this
.
list
.
filter
((
v
)
=>
!
v
.
result
).
length
// 未做题数
const
noStart
=
this
.
list
.
filter
((
v
)
=>
!
v
.
result
).
length
// 未做题数
const
fraction
=
0
// 分数
const
fraction
=
0
// 分数
this
.
result
=
[
fail
,
noStart
,
fraction
]
this
.
complete
.
result
=
[
fail
,
noStart
,
fraction
]
this
.
complete
T
ype
=
'pass'
this
.
complete
.
t
ype
=
'pass'
this
.
visible
=
true
this
.
complete
.
visible
=
true
},
},
// 弹框确认
//
考试成绩
弹框确认
submit
()
{
submit
()
{
if
(
this
.
completeType
===
'daily'
)
{
// 提前交卷
this
.
daily
=
false
this
.
$u
.
route
({
this
.
visible
=
false
url
:
'/pages/learn/score'
,
}
else
{
})
// 提前交卷
this
.
$u
.
route
({
url
:
'pages/learn/source'
,
})
}
},
},
//
弹框取消
// 考试成绩
弹框取消
cancel
()
{
cancel
()
{
if
(
this
.
completeType
===
'daily'
)
{
this
.
complete
.
visible
=
false
// 查看记录
},
// this.$u.route('/pages/index/index')
// 每日一练弹框确认
}
else
{
dailySubmit
()
{
this
.
visible
=
false
this
.
daily
.
visible
=
false
}
},
// 每日一练弹框取消
dailyCancel
()
{
this
.
$u
.
route
(
'/pages/learn/record'
)
},
},
// 收藏
// 收藏
collection
()
{
collection
()
{
...
@@ -500,6 +522,14 @@ export default {
...
@@ -500,6 +522,14 @@ export default {
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
.daily
{
.u-mode-center-box
{
background-color
:
transparent
!
important
;
padding-top
:
40rpx
;
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.answer
{
.answer
{
height
:
100vh
;
height
:
100vh
;
...
@@ -514,7 +544,6 @@ export default {
...
@@ -514,7 +544,6 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
.head
{
.head
{
width
:
100%
;
width
:
100%
;
height
:
90rpx
;
.tab
{
.tab
{
margin
:
10rpx
auto
;
margin
:
10rpx
auto
;
border
:
2rpx
solid
#2953ff
;
border
:
2rpx
solid
#2953ff
;
...
...
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