Commit e0687144 authored by nick zheng's avatar nick zheng

Merge branch 'nick-test' into 'master'

test: 测试对话报错

See merge request !183
parents 59201b1c eea554d4
...@@ -65,6 +65,8 @@ export function fetchCustomEventSource(config: { ...@@ -65,6 +65,8 @@ export function fetchCustomEventSource(config: {
window.$message.error(data.message) window.$message.error(data.message)
config.controller?.abort() config.controller?.abort()
// 测试代码,需删除
userStore.userInfo.memberId === 198 && window.$message.error(`code === -1', ${data.message}`)
config.onFinally && config.onFinally() config.onFinally && config.onFinally()
config.onError && config.onError(data) config.onError && config.onError(data)
...@@ -81,6 +83,7 @@ export function fetchCustomEventSource(config: { ...@@ -81,6 +83,7 @@ export function fetchCustomEventSource(config: {
}, },
onclose: () => {}, onclose: () => {},
onerror: (err) => { onerror: (err) => {
userStore.userInfo.memberId === 198 && window.$message.loading('error:' + err.message)
config.onRequestError(err) config.onRequestError(err)
window.$message.error(err.message || '操作失败请重试') window.$message.error(err.message || '操作失败请重试')
config.onFinally && config.onFinally() config.onFinally && config.onFinally()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment