vue2-client 1.8.108 → 1.8.109
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.
package/package.json
CHANGED
|
@@ -250,16 +250,21 @@ export default {
|
|
|
250
250
|
type: 'ai-question',
|
|
251
251
|
content: ''
|
|
252
252
|
}).then(res => {
|
|
253
|
+
const _questionsLib = []
|
|
253
254
|
res.forEach(item => {
|
|
254
255
|
const _item = JSON.parse(item.f_json)
|
|
255
256
|
if (_item.data && _item.data.length) {
|
|
256
257
|
if (!this.questionsLib.some(_ => _.uuid === _item.uuid)) {
|
|
257
258
|
_item.date = formatDate('now')
|
|
258
|
-
|
|
259
|
+
_questionsLib.push(_item)
|
|
259
260
|
indexedDB.add('question-lib-' + _item.uuid, _item)
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
})
|
|
264
|
+
// _questionsLib 根据问题question文字排序
|
|
265
|
+
_questionsLib.sort((a, b) => a.question.localeCompare(b.question))
|
|
266
|
+
// 把_questionsLib 放到 questionsLib 上面
|
|
267
|
+
this.questionsLib = _questionsLib.concat(this.questionsLib)
|
|
263
268
|
this.pullQuestionLoading = false
|
|
264
269
|
}).catch(e => {
|
|
265
270
|
this.pullQuestionLoading = false
|
|
@@ -110,9 +110,9 @@ export default {
|
|
|
110
110
|
isFavorite: false,
|
|
111
111
|
date: formatDate('now')
|
|
112
112
|
})
|
|
113
|
-
let url = '/ai/question
|
|
113
|
+
let url = '/ai/question'
|
|
114
114
|
if (queryType !== 'all') {
|
|
115
|
-
url = url + queryType + '/'
|
|
115
|
+
url = '/' + url + queryType + '/'
|
|
116
116
|
}
|
|
117
117
|
post(url, {
|
|
118
118
|
messages: [{
|