✨ feat(37需求): 打开webview的页面
This commit is contained in:
34
shared/domain/activityField/webviewField.ts
Normal file
34
shared/domain/activityField/webviewField.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { ActivityModelType } from "../../db/Activity";
|
||||
import { ActivityBase } from "./activityField";
|
||||
|
||||
interface WebViewDataInDb {
|
||||
iosUrl: string;
|
||||
androidUrl: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打脸公告
|
||||
*/
|
||||
export class WebViewData extends ActivityBase {
|
||||
iosUrl: string;
|
||||
androidUrl: string;
|
||||
|
||||
constructor(activityData: ActivityModelType, createTime: number, serverTime: number) {
|
||||
super(activityData, createTime, serverTime)
|
||||
this.initData(activityData.data)
|
||||
}
|
||||
|
||||
public initData(data: string) {
|
||||
let dataObj: WebViewDataInDb = JSON.parse(data);
|
||||
this.iosUrl = dataObj.iosUrl;
|
||||
this.androidUrl = dataObj.androidUrl;
|
||||
}
|
||||
|
||||
public getShowResult() {
|
||||
return {
|
||||
...this.getBaseKeys(),
|
||||
iosUrl: this.iosUrl,
|
||||
androidUrl: this.androidUrl,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user