mirror of
				https://github.com/tidys/cc-inspector-chrome
				synced 2025-11-04 01:45:25 +00:00 
			
		
		
		
	增加解析git仓库url图片的功能
This commit is contained in:
		@@ -32,6 +32,8 @@ export class AdItem {
 | 
				
			|||||||
  parse(data: AdItem) {
 | 
					  parse(data: AdItem) {
 | 
				
			||||||
    this.name = data.name;
 | 
					    this.name = data.name;
 | 
				
			||||||
    this.store = data.store || "";
 | 
					    this.store = data.store || "";
 | 
				
			||||||
 | 
					    this.parseStore();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.try = data.try || "";
 | 
					    this.try = data.try || "";
 | 
				
			||||||
    this.tip = data.tip || "";
 | 
					    this.tip = data.tip || "";
 | 
				
			||||||
    this.duration = data.duration || 0;
 | 
					    this.duration = data.duration || 0;
 | 
				
			||||||
@@ -40,6 +42,13 @@ export class AdItem {
 | 
				
			|||||||
    this.img = githubMirrorMgr.getFileUrl(img);
 | 
					    this.img = githubMirrorMgr.getFileUrl(img);
 | 
				
			||||||
    return this;
 | 
					    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 {
 | 
					export class AdData {
 | 
				
			||||||
  desc: string = "";
 | 
					  desc: string = "";
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 621 KiB After Width: | Height: | Size: 53 KiB  | 
		Reference in New Issue
	
	Block a user