This commit is contained in:
陆柯 2022-06-05 11:30:45 +08:00
parent fa20d06a42
commit 241798d443

View File

@ -37,7 +37,7 @@ export default {
console.error('%c ' + JSON.stringify({ time: new Date().toJSON(), page: pageName }), 'color:red', ...args)
},
ccdebug (...args) {
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV !== 'production') {
const pageName = this.thisPage()?.route || 'VueApp'
console.debug('%c ' + JSON.stringify({ time: new Date().toJSON(), page: pageName }), 'color:cyan', ...args)
}
@ -229,7 +229,7 @@ export default {
}
// 注意1resultServer 和 resultCloud 推荐遵循同样的格式 { _state, error | data },这样方便前端做统一判断。
// 注意2虽然预设了 resultServer 和 resultCloud = {},但如果后台返回了 null那么 resultServer/resultCloud 也是 null。
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV !== 'production') {
console.log(
'%c ' +
JSON.stringify({ startTime: startTime, page: thisRoute, endTime: new Date().toJSON() }) +
@ -343,7 +343,7 @@ export default {
return { _state: 'CLIENT_FAIL_UNKNOWN_MEDIA_TYPE' }
}
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV !== 'production') {
cloudPath = 'dev_' + cloudPath
}