mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-19 16:38:41 +00:00
增加解析git仓库url图片的功能
This commit is contained in:
parent
93be854469
commit
b9b0ff3b03
@ -32,6 +32,8 @@ export class AdItem {
|
||||
parse(data: AdItem) {
|
||||
this.name = data.name;
|
||||
this.store = data.store || "";
|
||||
this.parseStore();
|
||||
|
||||
this.try = data.try || "";
|
||||
this.tip = data.tip || "";
|
||||
this.duration = data.duration || 0;
|
||||
@ -40,6 +42,13 @@ export class AdItem {
|
||||
this.img = githubMirrorMgr.getFileUrl(img);
|
||||
return this;
|
||||
}
|
||||
parseStore() {
|
||||
const flag = "${git}";
|
||||
if (this.store.startsWith(flag)) {
|
||||
const file = this.store.split(flag)[1];
|
||||
this.store = githubMirrorMgr.getFileUrl(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
export class AdData {
|
||||
desc: string = "";
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 621 KiB After Width: | Height: | Size: 53 KiB |
Loading…
x
Reference in New Issue
Block a user