Commit 5425fedc authored by Facius's avatar Facius

improvement: 全局题库id保存使用

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