Skip to content

Commit

Permalink
fix: detail install status error
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed May 18, 2022
1 parent 2ad76c1 commit a0e5043
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ExtensionDetailComponent implements OnInit {
this.getDetail();
}
async getDetail() {
this.extensionDetail = await this.extensionService.getDetail(this.route.snapshot.queryParams.id);
this.extensionDetail = await this.extensionService.getDetail(this.route.snapshot.queryParams.id,this.route.snapshot.queryParams.name);
}
manageExtension(operate: string, id) {
this.isOperating = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export class ExtensionService {
public async requestList() {
return await lastValueFrom(this.http.get('http://106.12.149.147:3333/list'));
}
async getDetail(id): Promise<any> {
async getDetail(id,name): Promise<any> {
let result = {};
if (this.localModules.has(id)) {
Object.assign(result, this.localModules.get(id), { installed: true });
}
let { code, data }: any = await this.requestDetail(id);
let { code, data }: any = await this.requestDetail(name);
Object.assign(result, data);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class ExtensionListComponent implements OnInit {
clickExtension(item) {
this.router
.navigate(['home/extension/detail'], {
queryParams: { id: item.name, jump: 'setting' },
queryParams: { id: item.moduleID,name:item.name, jump: 'setting' },
})
.finally();
}
Expand Down

0 comments on commit a0e5043

Please sign in to comment.