电子商城测试版v3
This commit is contained in:
@@ -171,6 +171,13 @@ export const useRequest = (options:option = {
|
||||
stateRef.current.msg = msg
|
||||
stateRef.current.data = data
|
||||
stateRef.current.total = data?.list ? data?.total : 0
|
||||
if(code !== 0) {
|
||||
Taro.showToast({
|
||||
title: `${msg}`,
|
||||
icon: 'none'
|
||||
})
|
||||
console.log('错误::',msg)
|
||||
}
|
||||
}else{
|
||||
if (statusCode === 401) {
|
||||
removeToken()
|
||||
@@ -189,6 +196,7 @@ export const useRequest = (options:option = {
|
||||
stateRef.current.success = false
|
||||
stateRef.current.error = true
|
||||
stateRef.current.msg = e.errMsg
|
||||
console.log('后台错误信息::',e.errMsg)
|
||||
|
||||
}
|
||||
stateRef.current.error = false
|
||||
|
||||
Reference in New Issue
Block a user