u
This commit is contained in:
parent
5b3008b601
commit
f49f9c6685
25
unitool.js
25
unitool.js
@ -218,15 +218,22 @@ export default {
|
||||
// 注意1,resultServer 和 resultCloud 推荐遵循同样的格式 { _state, error | data },这样方便前端做统一判断。
|
||||
// 注意2,虽然预设了 resultServer 和 resultCloud = {},但如果后台返回了 null,那么 resultServer/resultCloud 也是 null。
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log(`%c[FROM] ${thisRoute}`, 'background: #1e90ff; border-radius: 0.5em;color: white; font-weight: bold; padding: 2px 0.5em;')
|
||||
console.log(`%c(IN) ${startTime}`, 'background: #87cefa; border-radius: 0.5em;color: white; font-weight: bold; padding: 2px 0.5em;', {
|
||||
baseType,
|
||||
apiWho,
|
||||
apiTodo,
|
||||
apiWhat,
|
||||
url,
|
||||
})
|
||||
console.log(`%c(OUT) ${new Date().toJSON()}`, 'background: #4169e1; border-radius: 0.5em;color: white; font-weight: bold; padding: 2px 0.5em;', result)
|
||||
console.log(
|
||||
`%c(IN) ${startTime} ${thisRoute} :: ${apiTodo}`,
|
||||
'background: #87cefa; border-radius: 0.5em;color: white; font-weight: bold; padding: 2px 0.5em;',
|
||||
{
|
||||
baseType,
|
||||
apiWho,
|
||||
apiTodo,
|
||||
apiWhat,
|
||||
url,
|
||||
}
|
||||
)
|
||||
console.log(
|
||||
`%c(OUT) ${new Date().toJSON()} ${thisRoute} :: ${apiTodo}`,
|
||||
'background: #4169e1; border-radius: 0.5em;color: white; font-weight: bold; padding: 2px 0.5em;',
|
||||
result
|
||||
)
|
||||
}
|
||||
return result
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user