refactor(http): 移除调试用的console.log语句
清理http模块中用于调试的console.log输出,保持代码整洁
This commit is contained in:
parent
82704b61bc
commit
80307e6992
|
|
@ -12,7 +12,7 @@ export function http<T>(options: CustomRequestOptions) {
|
|||
// #endif
|
||||
// 响应成功
|
||||
success: async (res:any) => {
|
||||
console.log(res,'ppp')
|
||||
// console.log(res,'ppp')
|
||||
// 状态码 2xx,参考 axios 的设计
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ export function http<T>(options: CustomRequestOptions) {
|
|||
// 401 状态码,说明 token 过期或无效
|
||||
removeToken()
|
||||
// 这里可以触发重新登录逻辑,例如跳转到登录页
|
||||
console.error('登录过期,需要重新登录')
|
||||
// console.error('登录过期,需要重新登录')
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue