开发完错题本
This commit is contained in:
+9
-4
@@ -97,13 +97,18 @@ export default function request({
|
||||
const res = response.data
|
||||
if (res?.rtnCode === '0000') {
|
||||
return resolve(res)
|
||||
} else if (toastErrors) {
|
||||
// common.msg(res?.message)
|
||||
|
||||
} else if (res?.rtnCode === '0001') { // 为前后端约定不公共拦截的码值(王洋洋20250830定)
|
||||
return reject(res)
|
||||
|
||||
} else if (res?.rtnCode === '0002' && res?.message) {
|
||||
if (toastErrors) {
|
||||
common.msg(res.message)
|
||||
}
|
||||
return reject(response)
|
||||
}
|
||||
//到这里下面全是异常的处理
|
||||
if (suppressErrors) { // 静默的接口,报错也不处理,因为下面有公共处理
|
||||
return reject()
|
||||
return reject(response)
|
||||
}
|
||||
if (!res) {
|
||||
common.msg("系统异常.")
|
||||
|
||||
Reference in New Issue
Block a user