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
a63eea3b
Commit
a63eea3b
authored
Jul 23, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 移除错题
parent
a6a47e79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
learn.js
src/api/learn.js
+5
-1
answer.vue
src/pages/learn/answer.vue
+13
-3
No files found.
src/api/learn.js
View file @
a63eea3b
...
@@ -29,6 +29,9 @@ let learnApiFun = function(vm) {
...
@@ -29,6 +29,9 @@ let learnApiFun = function(vm) {
let
removeCollection
=
async
(
params
=
{})
=>
let
removeCollection
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/remove/collection/'
+
params
.
questionId
,
params
)
await
vm
.
$u
.
get
(
'/rest/question/remove/collection/'
+
params
.
questionId
,
params
)
let
removeError
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/remove/error/'
+
params
.
questionId
,
params
)
const
learnApi
=
{
const
learnApi
=
{
getQuestion
,
getQuestion
,
getQuestionTotal
,
getQuestionTotal
,
...
@@ -37,7 +40,8 @@ let learnApiFun = function(vm) {
...
@@ -37,7 +40,8 @@ let learnApiFun = function(vm) {
getQuestionWarehouse
,
getQuestionWarehouse
,
getProvinceList
,
getProvinceList
,
joinCollection
,
joinCollection
,
removeCollection
removeCollection
,
removeError
}
}
return
learnApi
return
learnApi
}
}
...
...
src/pages/learn/answer.vue
View file @
a63eea3b
...
@@ -70,7 +70,12 @@
...
@@ -70,7 +70,12 @@
<text>
交卷
</text>
<text>
交卷
</text>
</view>
</view>
<view
class=
"c-list"
v-if=
"type === 4"
@
click=
"remove"
>
<view
class=
"c-list"
v-if=
"type === 4"
@
click=
"remove"
>
<u-icon
name=
"order"
color=
"#5A6073"
size=
"40"
></u-icon>
<u-image
:src=
"removeImg"
width=
"36"
height=
"40"
:lazy-load=
"false"
/>
<text>
移出
</text>
<text>
移出
</text>
</view>
</view>
</view>
</view>
...
@@ -192,6 +197,9 @@ export default {
...
@@ -192,6 +197,9 @@ export default {
}
}
return
process
.
uniEnv
.
qn_base_url
+
name
return
process
.
uniEnv
.
qn_base_url
+
name
},
},
removeImg
()
{
return
process
.
uniEnv
.
qn_base_url
+
'remove-error.png'
},
currentNumber
()
{
currentNumber
()
{
let
index
=
this
.
currentIndex
let
index
=
this
.
currentIndex
return
index
===
-
2
?
this
.
total
:
index
+
1
return
index
===
-
2
?
this
.
total
:
index
+
1
...
@@ -469,8 +477,10 @@ export default {
...
@@ -469,8 +477,10 @@ export default {
},
},
// 移除
// 移除
remove
()
{
remove
()
{
console
.
log
(
'this.list[this.currentIndex]'
,
this
.
list
[
this
.
currentIndex
])
const
info
=
this
.
list
.
find
(
v
=>
v
.
index
===
this
.
currentIndex
)
console
.
log
(
'移除'
)
this
.
$u
.
api
.
removeError
({
questionId
:
info
.
id
}).
then
(
res
=>
{
this
.
current
=
this
.
currentIndex
+
1
})
},
},
// 以下方法用于初始化数据
// 以下方法用于初始化数据
refresh
(
currentIndex
)
{
refresh
(
currentIndex
)
{
...
...
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