bigfix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { request, uploadFile } from '../../utils/request'
|
||||
import { request, uploadFile, NOT_LOGIN_CODE } from '../../utils/request'
|
||||
import { ProcessStatus } from '../../utils/config'
|
||||
|
||||
Page({
|
||||
@@ -17,6 +17,7 @@ Page({
|
||||
const sourceType: Array<'camera' | 'album'> = res.tapIndex === 0 ? ['camera'] : ['album']
|
||||
this.chooseImage(sourceType)
|
||||
},
|
||||
fail: () => {}, // 取消选择属正常操作,不必抛错日志
|
||||
})
|
||||
},
|
||||
|
||||
@@ -42,7 +43,14 @@ Page({
|
||||
})
|
||||
.catch((e: any) => {
|
||||
this.setData({ state: 'idle' })
|
||||
if (e && e.code === 80000) this.showQuotaModal()
|
||||
if (e && e.code === 80000) {
|
||||
this.showQuotaModal()
|
||||
return
|
||||
}
|
||||
// uploadFile 已统一 toast 业务错误与网络错误;未登录时请求并未发出,需补一次提示
|
||||
if (e && e.code === NOT_LOGIN_CODE) {
|
||||
wx.showToast({ title: '请先登录', icon: 'none' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user