修复了个人中心和直播视频item高度
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user