修复了个人中心和直播视频item高度

This commit is contained in:
2020-11-10 14:56:42 +08:00
parent e515b8266d
commit b0a6592373
7 changed files with 57 additions and 7 deletions

View File

@@ -52,4 +52,38 @@ export function getValue(key: string): any{
}
}
return value;
}
/**
* 验证图片是否为对应类型
* @param name 图片名字
*/
export function provenimg(name: string): boolean{
const type = ['png', 'jpg'];
const ntypearr = name.split('.');
const ntype = ntypearr[ntypearr.length - 1];
for(const i in type){
if(type[i] == ntype){
return true;
}
}
return false;
}
/**
* 验证视频是否为对应类型
* @param name 图片名字
*/
export function provenvideo(name: string): boolean{
const type = ['flv', 'mp4'];
const ntypearr = name.split('.');
const ntype = ntypearr[ntypearr.length - 1];
for(const i in type){
if(type[i] == ntype){
return true;
}
}
return false;
}