jiangchengfeiyi-xiaochengxu/common/globalFunction.js
2025-03-25 08:28:12 +08:00

26 lines
492 B
JavaScript

export const dealResult = (res) => {
let response = res.data
if (response.code !== 1) {
uni.showModal({
title: '提示',
content: response.message,
success: (res) => {
if(response.code === 40100) {
if(res.confirm) {
uni.redirectTo({
url: '/pages/login/login'
})
}
}
}
})
return false
}
return response.data
}
export const JudgeIsNullity = (val) => {
if (val === null || val === undefined || val === '') return true
return false
}