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
d99a445b
Commit
d99a445b
authored
Jul 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 首页清空数据
parent
e2e85b81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
index.vue
src/pages/index/index.vue
+22
-7
record.vue
src/pages/learn/record.vue
+10
-4
No files found.
src/pages/index/index.vue
View file @
d99a445b
...
@@ -148,7 +148,7 @@ export default {
...
@@ -148,7 +148,7 @@ export default {
},
},
finishCount
()
{
finishCount
()
{
return
this
.
questionList
.
reduce
((
accumulator
,
currentValue
)
=>
{
return
this
.
questionList
.
reduce
((
accumulator
,
currentValue
)
=>
{
if
(
currentValue
.
id
)
accumulator
++
if
(
currentValue
.
submitStatus
)
accumulator
++
return
accumulator
return
accumulator
},
0
)
},
0
)
},
},
...
@@ -238,9 +238,14 @@ export default {
...
@@ -238,9 +238,14 @@ export default {
]
]
},
},
},
},
watch
:
{
vuex_token
(
val
,
oldVal
)
{
// 监听token变化,如果更新则重新加载页面数据
val
&&
!
oldVal
&&
this
.
initData
()
},
},
onLoad
()
{
onLoad
()
{
this
.
getProvinceList
()
this
.
initData
()
this
.
queryMyQuestionWarehouseDetail
(
'1414854649273384960'
)
},
},
onShow
()
{
onShow
()
{
let
pages
=
getCurrentPages
()
let
pages
=
getCurrentPages
()
...
@@ -259,6 +264,10 @@ export default {
...
@@ -259,6 +264,10 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
initData
()
{
this
.
getProvinceList
()
this
.
queryMyQuestionWarehouseDetail
(
'0'
)
},
// 题库详情
// 题库详情
queryQuestionWarehouseById
(
id
)
{
queryQuestionWarehouseById
(
id
)
{
this
.
$u
.
api
this
.
$u
.
api
...
@@ -446,10 +455,16 @@ export default {
...
@@ -446,10 +455,16 @@ export default {
})
})
}
}
},
},
async
getProvinceList
()
{
getProvinceList
()
{
let
res
=
await
this
.
$u
.
api
.
getProvinceList
()
this
.
$u
.
api
console
.
log
(
res
)
.
getProvinceList
()
this
.
provinceList
=
res
.
then
((
res
)
=>
{
console
.
log
(
'------------getProvinceList----------'
,
res
)
this
.
provinceList
=
res
||
[]
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
},
setPageInfo
(
info
)
{
setPageInfo
(
info
)
{
var
pages
=
getCurrentPages
()
var
pages
=
getCurrentPages
()
...
...
src/pages/learn/record.vue
View file @
d99a445b
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
</view>
</view>
<view
class=
"body-view"
>
<view
class=
"body-view"
>
<view
class=
"date-view"
>
<view
class=
"date-view"
>
<view
class=
"content-title"
>
每日一练
</view>
<view
class=
"content-title"
id=
"part-days"
>
每日一练
</view>
<view
class=
"date-content"
></view>
<view
class=
"date-content"
></view>
</view>
</view>
<view
class=
"charts-view"
>
<view
class=
"charts-view"
>
<view
class=
"content-title"
>
练习分析
</view>
<view
class=
"content-title"
id=
"part-total"
>
练习分析
</view>
<view
class=
"range-view"
>
<view
class=
"range-view"
>
<view
class=
"range-title"
>
日期范围
</view>
<view
class=
"range-title"
>
日期范围
</view>
<view
<view
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<view
class=
"charts-content"
>
</view>
<view
class=
"charts-content"
>
</view>
</view>
</view>
<view
class=
"list-view"
>
<view
class=
"list-view"
>
<view
class=
"content-title"
>
模考成绩
</view>
<view
class=
"content-title"
id=
"part-today"
>
模考成绩
</view>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<RecordCell
<RecordCell
v-for=
"(item, index) in showedList"
v-for=
"(item, index) in showedList"
...
@@ -87,6 +87,7 @@ export default {
...
@@ -87,6 +87,7 @@ export default {
lists
:
[],
lists
:
[],
showSelect
:
false
,
showSelect
:
false
,
showAll
:
false
,
showAll
:
false
,
scrollId
:
null
,
items
:
[
items
:
[
{
{
title
:
'近7天'
,
title
:
'近7天'
,
...
@@ -122,7 +123,12 @@ export default {
...
@@ -122,7 +123,12 @@ export default {
return
this
.
showAll
?
this
.
lists
:
this
.
lists
.
slice
(
0
,
2
)
return
this
.
showAll
?
this
.
lists
:
this
.
lists
.
slice
(
0
,
2
)
},
},
},
},
onLoad
()
{
onLoad
(
e
)
{
if
(
e
&&
e
.
key
)
{
this
.
$nextTick
(()
=>
{
this
.
scrollId
=
'part-'
+
e
.
key
})
}
this
.
lists
=
[
this
.
lists
=
[
{
time
:
36
,
score
:
80
,
date
:
new
Date
().
getTime
},
{
time
:
36
,
score
:
80
,
date
:
new
Date
().
getTime
},
{
time
:
100
,
score
:
40
,
date
:
new
Date
().
getTime
},
{
time
:
100
,
score
:
40
,
date
:
new
Date
().
getTime
},
...
...
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