jiangchengfeiyi-xiaochengxu/common/globalFunction.js

27 lines
514 B
JavaScript
Raw Normal View History

2025-03-09 10:55:38 +00:00
export const dealResult = (res) => {
let response = res.data
if (response.code !== 1) {
uni.showModal({
title: '提示',
content: response.message,
2025-03-24 14:42:31 +00:00
showCancel: false,
success: (res) => {
if(response.code === 40100) {
if(res.confirm) {
uni.redirectTo({
url: '/pages/login/login'
})
}
}
}
2025-03-09 10:55:38 +00:00
})
return false
}
return response.data
2025-03-11 14:04:30 +00:00
}
export const JudgeIsNullity = (val) => {
if (val === null || val === undefined || val === '') return true
return false
2025-03-09 10:55:38 +00:00
}