公司小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
963 B

export default class SkipData{
//更新时间
inserttime = 0;
//显示图片
picurl = '';
//显示类型 0x01图片 0x02文字 0x04视频
showtype = 0;
//跳转地址
skipurl = '';
//排序权位
sortid = 0;
//显示文字
textmsg = '';
//标题
title = '';
///附标题
titledesc = '';
constructor(){
}
initWithNetData = function(data){
for(var key in data){
this[key] = data[key];
}
}
/**
* 获取真正可以显示的类型,可能是 [图片,文字],[视频,文字]等
* 返回数组
* 0x01图片 0x02文字 0x04视频 视频与图片不能同事存在
*/
getShowType = function(){
var hasPic = this.showtype & 0x01;
var hasText = this.showtype & 0x02;
var hasVideo = this.showtype & 0x04;
console.log(this.showtype,hasPic,hasText,hasVideo);
var res = [];
if(hasPic){
res.push(0x01)
}
if(hasText){
res.push(0x02);
}
if(hasVideo){
res.push(0x04);
}
return res;
}
}