打脸公告:添加返回数据
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { ActivityModelType } from "../../db/Activity";
|
||||
import { ActivityBase } from "./activityField";
|
||||
|
||||
interface PopNoticeInDb {
|
||||
bg: string; // 背景图片
|
||||
canClose: boolean; // 是否可以选择今天不再弹出
|
||||
sort: number; // 活动的排序,越大的越前
|
||||
skip: string; // 前往
|
||||
sysType: number; // dic_zyz_systemOpenTime的id,功能开启
|
||||
timePosition: string; // 控制公告持续时间的显示位置'&'表示不显示持续时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 打脸公告
|
||||
*/
|
||||
export class PopNoticeData extends ActivityBase {
|
||||
bg: string; // 背景图片
|
||||
canClose: boolean; // 是否可以选择今天不再弹出
|
||||
sort: number; // 活动的排序,越大的越前
|
||||
skip: string; // 前往
|
||||
sysType: number; // dic_zyz_systemOpenTime的id,功能开启
|
||||
timePosition: string; // 控制公告持续时间的显示位置'&'表示不显示持续时间
|
||||
|
||||
constructor(activityData: ActivityModelType, createTime: number, serverTime: number) {
|
||||
super(activityData, createTime, serverTime)
|
||||
this.initData(activityData.data)
|
||||
}
|
||||
|
||||
public initData(data: string) {
|
||||
let dataObj: PopNoticeInDb = JSON.parse(data);
|
||||
this.bg = dataObj.bg;
|
||||
this.canClose = dataObj.canClose;
|
||||
this.sort = dataObj.sort;
|
||||
this.sysType = dataObj.sysType;
|
||||
this.skip = dataObj.skip;
|
||||
this.timePosition = dataObj.timePosition;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user