Files
zhxg_xsbdV1.0/api/helpFunc.js

37 lines
646 B
JavaScript
Raw Normal View History

2025-07-16 17:44:45 +08:00
import {
BASE_URL
} from "@/config/baseUrl.js";
let IMG_URL="http://zhxg.gxsdxy.cn/prod_api";
export function isEmpty(obj) {
if (obj == "" || obj == null || obj == undefined || obj.length == 0) {
return true;
} else {
return false;
}
}
export function getImgSrc(src) {
if (isEmpty(src)) {
return "http://greenfw.ah.hostadm.net/i/np2.gif";
} else {
return IMG_URL + src;
}
}
export function getRegStatus(status) {
switch (status) {
case "1":
return "已缴费";
case "2":
return "已激活待缴费"
case "3":
return "已报到";
case "4":
return "在校";
case "0":
default:
return "未激活";
}
}