Commit 5425fedc authored by Facius's avatar Facius

improvement: 全局题库id保存使用

parent 863e03af
......@@ -271,13 +271,10 @@ export default {
this.$u.api
.checkGetQuestion(id)
.then((res) => {
console.log('-------checkGet---------------Question----------', res)
this.canExperience = res <= 0
console.log(this.canExperience)
})
.catch((err) => {
console.log('----------------', err)
console.log(err)
})
},
......@@ -310,6 +307,12 @@ export default {
.then((res) => {
this.detail = res || { questionWarehouse: {} }
this.relationId = res.questionWarehouse.id
if (res.questionWarehouse.questionWarehouseId) {
this.$u.vuex(
'questionWarehouseId',
res.questionWarehouse.questionWarehouseId
)
}
this.queryQuestionWarehouseById(
res.questionWarehouse.questionWarehouseId
)
......
......@@ -174,8 +174,9 @@ export default {
if (e && e.relationId) {
this.relationId = e.relationId
}
if (e && e.id) {
this.queryQuestionWarehouseById(e.id)
if ((e && e.id) || this.questionWarehouseId) {
this.queryQuestionWarehouseById(e.id || this.questionWarehouseId)
}
},
methods: {
......
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