flat:修改
This commit is contained in:
@@ -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('请求出现异常,请联系工作人员')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user