Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/app/pages/connect/connect.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
IframeCommunicationService
} from '@app/services';
import { CookieService } from 'ngx-cookie-service';
import { Protocol } from '@app/model';

@Component({
standalone: false,
Expand Down Expand Up @@ -55,6 +56,7 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
private connectMethod: ConnectMethod | string;
private asset: any;
private method: string;
private permedProtocol: Protocol;

constructor(
private _i18n: I18nService,
Expand Down Expand Up @@ -149,6 +151,9 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
this.asset = await this._http.getAssetDetail(this.assetId).toPromise();
this.account = await this._http.getAccountDetail(this.accountId).toPromise();

const permed = await this._http.getPermedAssetDetail(this.assetId).toPromise();
this.permedProtocol = permed.permed_protocols;

if (!this.asset) {
alert(this._i18n.instant('NoAsset'));
return;
Expand All @@ -171,7 +176,7 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
comment: asset.comment,
type: asset.type,
category: asset.category,
permed_protocols: asset.protocols,
permed_protocols: this.permedProtocol,
permed_accounts: asset.accounts,
spec_info: asset.spec_info
};
Expand Down Expand Up @@ -324,10 +329,10 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
if (this.isDirect && !view) {
// 直连模式创建视图
this.view = new View(
this.asset,
this.permedAsset,
{
...this.connectData,
protocol: { name: this.protocol },
permed_protocol: { name: this.protocol },
connectMethod: this.connectMethod
},
this.connectToken,
Expand Down Expand Up @@ -356,8 +361,6 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
},
this.isDirect ? 100 : 500
);

console.log('view', this.view);
}
}

Expand Down