|
|
|
|
@ -53,6 +53,23 @@ export const $image = (path) => {
|
|
|
|
|
export const $response = (response, then, error = () => {}) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let showModals = [200099]
|
|
|
|
|
if (!!showModals.includes(response.code)) {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: response.message,
|
|
|
|
|
showCancel: false,
|
|
|
|
|
success: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
uni.$lu.toast(response.message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uni.$lu.toast(response.message);
|
|
|
|
|
error()
|
|
|
|
|
return
|
|
|
|
|
|