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
69bdc8cc
Commit
69bdc8cc
authored
Jul 24, 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
7faaaa7a
169f88f2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
learn.js
src/api/learn.js
+7
-0
http.interceptor.js
src/common/http.interceptor.js
+1
-1
detail.vue
src/pages/search/detail.vue
+10
-0
No files found.
src/api/learn.js
View file @
69bdc8cc
...
@@ -81,6 +81,12 @@ let learnApiFun = function(vm) {
...
@@ -81,6 +81,12 @@ let learnApiFun = function(vm) {
let
bindCard
=
async
(
params
=
{})
=>
let
bindCard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/rest/card/bind'
,
params
)
await
vm
.
$u
.
post
(
'/rest/card/bind'
,
params
)
let
searchQuestion
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
`/rest/question/searchQuestion/
${
params
.
questionWarehouseId
}
`
,
params
)
const
learnApi
=
{
const
learnApi
=
{
getQuestion
,
getQuestion
,
getQuestionTotal
,
getQuestionTotal
,
...
@@ -101,6 +107,7 @@ let learnApiFun = function(vm) {
...
@@ -101,6 +107,7 @@ let learnApiFun = function(vm) {
queryExamRecordOne
,
queryExamRecordOne
,
getMyQuestionWarehouseList
,
getMyQuestionWarehouseList
,
bindCard
,
bindCard
,
searchQuestion
,
}
}
return
learnApi
return
learnApi
}
}
...
...
src/common/http.interceptor.js
View file @
69bdc8cc
...
@@ -55,7 +55,7 @@ const install = (Vue, vm) => {
...
@@ -55,7 +55,7 @@ const install = (Vue, vm) => {
}
else
{
}
else
{
// 如果返回false,则会调用Promise的reject回调,
// 如果返回false,则会调用Promise的reject回调,
vm
.
$u
.
toast
(
data
.
msg
)
vm
.
$u
.
toast
(
data
.
msg
)
return
data
.
data
return
data
}
}
}
else
if
(
res
.
statusCode
===
401
)
{
}
else
if
(
res
.
statusCode
===
401
)
{
// 登录过期
// 登录过期
...
...
src/pages/search/detail.vue
View file @
69bdc8cc
...
@@ -213,6 +213,7 @@ export default {
...
@@ -213,6 +213,7 @@ export default {
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
keyword
=
e
?
decodeURIComponent
(
e
.
keyword
)
:
''
this
.
keyword
=
e
?
decodeURIComponent
(
e
.
keyword
)
:
''
this
.
init
()
},
},
computed
:
{
computed
:
{
defaultImg
()
{
defaultImg
()
{
...
@@ -220,6 +221,15 @@ export default {
...
@@ -220,6 +221,15 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
init
()
{
const
data
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
keyWord
:
this
.
keyword
}
this
.
$u
.
api
.
searchQuestion
(
data
).
then
(
res
=>
{
console
.
log
(
"res"
,
res
)
})
},
itemChange
(
e
)
{
itemChange
(
e
)
{
this
.
arrIndex
=
e
.
show
?
e
.
index
:
null
this
.
arrIndex
=
e
.
show
?
e
.
index
:
null
},
},
...
...
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