Commit 69bdc8cc authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 7faaaa7a 169f88f2
...@@ -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
} }
......
...@@ -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) {
// 登录过期 // 登录过期
......
...@@ -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
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment