提交
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
const TokenKey = 'Admin-Token';
|
||||
const TokenKey = 'DM-Manage-Token';
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey);
|
||||
|
||||
@@ -240,3 +240,16 @@ export async function blobValidate(data) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function isNullOrEmpty(val) {
|
||||
if (val === null || val === undefined) {
|
||||
return true
|
||||
} else if (val === {} || Object.keys(val).length === 0) {
|
||||
return true
|
||||
} else if (val.length === 0) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user