Commit 07e8dea8 by lixinming

no message

parent 6fe23631
......@@ -28,10 +28,11 @@ export function getDefPwd(phone:string) {
return md5(`${phone.slice(5, 11)}`);
}
export function getFileType(fileName) {
export function getFileType(fileName) {
let fileType = 0;
fileName.forEach(info => {
let type = info.split("_")[1];
let repList = info.split(".");
let type = repList[repList.length-1];
if (!type) throw new BizError(ERRORENUM.文件不存在, `文件名 ${info}`);
let typeNum = 0;
switch(type) {
......@@ -43,8 +44,8 @@ export function getFileType(fileName) {
};
if (typeNum) {
if (!fileType) fileType = typeNum;
else if (fileType != typeNum) fileType = FILETYPE.多类型
else if (fileType != typeNum) fileType = FILETYPE.多类型;
}
});
return fileType
return fileType;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment