ai-question-pro 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,7 +166,8 @@ export default {
166
166
  selectDom = tree.$el.querySelector('.is-current')
167
167
  }
168
168
  setTimeout(() => {
169
- this.$refs.select.scrollToOption({ $el: selectDom })
169
+ // this.$refs.select.scrollToOption({ $el: selectDom })
170
+ this.$refs.select.scrollToOption({ $el: tree.$el })
170
171
  }, 0)
171
172
  }
172
173
  },
@@ -314,11 +314,13 @@ export default {
314
314
  } else {
315
315
  this.loading && this.loading.close()
316
316
  this.$message.warning('题目获取失败')
317
+ this.rebuildFlag = false;
317
318
  }
318
319
  }).catch(error => {
319
320
  console.log("error:" + error);
320
321
  this.loading && this.loading.close()
321
322
  this.$message.warning('题目获取失败')
323
+ this.rebuildFlag = false;
322
324
  })
323
325
  },
324
326
  //发送请求
@@ -364,17 +366,19 @@ export default {
364
366
  this.$set(res.data.questions[0], 'evaluate', 0)
365
367
  this.showGenerateResult();
366
368
  } else {
367
- this.$message.warning('题目获取失败')
369
+ this.$message.warning('题目获取失败,重新生成中...')
368
370
  return this.reSend()
369
371
  }
370
372
  } else {
371
373
  this.loading && this.loading.close()
372
374
  this.$message.warning('题目获取失败')
375
+ this.rebuildFlag = false;
373
376
  }
374
377
  }).catch(error => {
375
378
  console.log("error:" + error);
376
379
  this.loading && this.loading.close()
377
380
  this.$message.warning('题目获取失败')
381
+ this.rebuildFlag = false;
378
382
  })
379
383
  }
380
384
 
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios'
2
2
  import Cookies from 'js-cookie'
3
3
  import cache from '../plugins/cache'
4
- // import { Message } from 'element-ui'
4
+ import { Message } from 'element-ui'
5
5
  const door = sessionStorage.getItem('AI_BASE_URL_FOR_TEST');
6
6
 
7
7
  axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
@@ -65,7 +65,7 @@ service.interceptors.response.use(res => {
65
65
  return res.data
66
66
  }
67
67
  if (res.data.code == 401) {
68
- // Message.warning(res.data.msg)
68
+ Message.warning(res.data.msg)
69
69
  }
70
70
  if (!res.data.success) {
71
71
  // Message.warning(res.data.errMessage)