flat:修改

This commit is contained in:
Apcallover
2025-12-16 09:22:57 +08:00
parent e19673b99e
commit d9f0356491
10 changed files with 344 additions and 373 deletions

View File

@@ -216,7 +216,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
userBadFeedback: content,
}
$api.chatRequest('/stepped', parmas, 'POST').then((res) => {
$api.createRequest('/stepped', parmas, 'POST').then((res) => {
baseDB.db.update(massageName.value, dbData) // 更新本地数据库
messages.value.forEach((item) => {
if (item.id === dbData.id) {
@@ -230,7 +230,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
// 云端数据
function getHistory() {
$api.chatRequest('/app/chat/getHistory').then((res) => {
$api.createRequest('/app/chat/getHistory').then((res) => {
if (!res.data.list.length) return
let tabel = parseHistory(res.data.list)
if (tabel && tabel.length) {
@@ -250,14 +250,14 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
const params = {
sessionId: chatSessionID.value
}
$api.chatRequest('/app/chat/detail', params, 'GET', loading).then((res) => {
$api.createRequest('/app/chat/detail', params, 'GET', loading).then((res) => {
let list = parseHistoryDetail(res.data.list, chatSessionID.value)
if (list.length) {
baseDB.db.add(massageName.value, list).then((ids) => {
messages.value = listAddId(list, ids)
});
}
console.log('解析后:', list)
// console.log('解析后:', list)
}).catch(() => {
msg('请求出现异常,请联系工作人员')
})