处理全局消息提示,移除部分页面接口的提示
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run

This commit is contained in:
wwt 2025-03-24 15:24:16 +08:00
parent 47d5cab23a
commit 988912de2f
5 changed files with 5 additions and 19 deletions

View File

@ -90,8 +90,6 @@ const onSubmit = () => {
ServeUploadAvatar(form).then((res) => {
if (res.code == 200) {
emit('success', res.data.avatar)
} else {
message.warning(res.message)
}
})
})

View File

@ -51,13 +51,13 @@ const request = new Request({
}
if ([200, 201, 204].includes(res.status)) {
if(res.data.code !== 200 && res.data.code!== 0) {
messageInstance.error(res.data.message || 'An error occurred.');
messageInstance.error(res.data.message || res.data.msg || 'An error occurred.');
}
return res.config.responseType === 'blob' ? res : res;
} else {
/* message.error(res.data.msg || 'An error occurred.');*/
messageInstance.error(res.data.message || 'An error occurred.');
return Promise.reject(new Error(res.data.message || 'An error occurred.'));
messageInstance.error(res.data.message || res.data.msg || 'An error occurred.');
return Promise.reject(new Error(res.data.message || res.data.msg || 'An error occurred.'));
}
}
}

View File

@ -214,8 +214,6 @@ export const useDialogueStore = defineStore('dialogue', {
if (res.code == 200) {
this.batchDelDialogueRecord(msgIds)
batchDelDialogueRecord(msgIds)
} else {
message.warning(res.message)
}
})
},
@ -239,8 +237,6 @@ export const useDialogueStore = defineStore('dialogue', {
ServeRevokeRecords({ msg_id }).then((res) => {
if (res.code == 200) {
this.updateDialogueRecord({ msg_id, is_revoke: 1 })
} else {
message.warning(res.message)
}
})
},

View File

@ -41,8 +41,6 @@ export const useEditorStore = defineStore('editor', {
}).then((res) => {
if (res.code == 200) {
this.loadUserEmoticon()
} else {
message.warning(res.message)
}
})
},
@ -55,8 +53,6 @@ export const useEditorStore = defineStore('editor', {
ServeUploadEmoticon(data).then((res) => {
if (res.code == 200) {
this.emoticon.items[1].children.unshift(res.data)
} else {
message.warning(res.message)
}
})
},
@ -69,9 +65,7 @@ export const useEditorStore = defineStore('editor', {
if (res.code == 200) {
this.emoticon.items[1].children.splice(resoure.index, 1)
message.success('删除成功')
} else {
message.warning(res.message)
}
}
})
}
}

View File

@ -74,9 +74,7 @@ export const useUploadsStore = defineStore('uploads', {
this.triggerUpload(upload_id,msgId)
this.isShow = true
} else {
message.error(res.message)
}
}
})
},