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
b48e41fe
Commit
b48e41fe
authored
Jul 27, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 【ID1001312】【小程序-首页-收藏的题】:点击已收藏按钮,当前的试题未消失且数量未变。
parent
b4a37247
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
answer.vue
src/pages/learn/answer.vue
+20
-15
No files found.
src/pages/learn/answer.vue
View file @
b48e41fe
...
...
@@ -197,9 +197,9 @@ export default {
computed
:
{
defaultImg
()
{
let
name
=
''
if
(
this
.
type
===
4
)
{
if
(
this
.
source
===
5
)
{
name
=
'no-error.png'
}
else
if
(
this
.
type
===
5
)
{
}
else
if
(
this
.
source
===
4
)
{
name
=
'no-collect.png'
}
return
process
.
uniEnv
.
qn_base_url
+
name
...
...
@@ -283,20 +283,22 @@ export default {
// 列表总长度,一定要在第一次请求列表数据前明确该值
// 否则无法知道下一页是否还有数据
let
total
=
parseInt
(
res
)
||
0
// 考试
if
(
this
.
type
===
2
)
{
this
.
pageSize
=
this
.
totalPoint
total
=
this
.
totalPoint
if
(
total
>
0
)
{
// 考试
if
(
this
.
type
===
2
)
{
this
.
pageSize
=
this
.
totalPoint
total
=
this
.
totalPoint
}
this
.
total
=
total
// 练习模式-初始化答题卡列表
if
(
this
.
source
===
1
)
Utils
.
initAnswerCardList
(
total
,
this
)
this
.
cachePageDataMap
=
new
Map
()
// 上次答到了第几题
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
this
.
refresh
(
index
)
}
this
.
total
=
total
// 练习模式-初始化答题卡列表
if
(
this
.
source
===
1
)
Utils
.
initAnswerCardList
(
total
,
this
)
this
.
cachePageDataMap
=
new
Map
()
// 上次答到了第几题
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
this
.
refresh
(
index
)
})
},
// 切换
...
...
@@ -538,6 +540,9 @@ export default {
if
(
res
)
{
const
msg
=
status
?
'取消收藏成功'
:
'收藏成功'
this
.
$u
.
toast
(
msg
)
if
(
status
&&
this
.
source
===
4
)
{
this
.
current
=
this
.
currentIndex
+
1
}
info
.
collectionFlag
=
!
status
if
(
this
.
source
===
1
)
{
//更新缓存数据
this
.
questionList
[
this
.
questionWarehouseId
][
this
.
currentIndex
]
=
info
...
...
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