@@ -14,6 +14,7 @@ import {
1414 IframeCommunicationService
1515} from '@app/services' ;
1616import { CookieService } from 'ngx-cookie-service' ;
17+ import { Protocol } from '@app/model' ;
1718
1819@Component ( {
1920 standalone : false ,
@@ -55,6 +56,7 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
5556 private connectMethod : ConnectMethod | string ;
5657 private asset : any ;
5758 private method : string ;
59+ private permedProtocol : Protocol ;
5860
5961 constructor (
6062 private _i18n : I18nService ,
@@ -149,6 +151,9 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
149151 this . asset = await this . _http . getAssetDetail ( this . assetId ) . toPromise ( ) ;
150152 this . account = await this . _http . getAccountDetail ( this . accountId ) . toPromise ( ) ;
151153
154+ const permed = await this . _http . getPermedAssetDetail ( this . assetId ) . toPromise ( ) ;
155+ this . permedProtocol = permed . permed_protocols ;
156+
152157 if ( ! this . asset ) {
153158 alert ( this . _i18n . instant ( 'NoAsset' ) ) ;
154159 return ;
@@ -171,7 +176,7 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
171176 comment : asset . comment ,
172177 type : asset . type ,
173178 category : asset . category ,
174- permed_protocols : asset . protocols ,
179+ permed_protocols : this . permedProtocol ,
175180 permed_accounts : asset . accounts ,
176181 spec_info : asset . spec_info
177182 } ;
@@ -324,10 +329,10 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
324329 if ( this . isDirect && ! view ) {
325330 // 直连模式创建视图
326331 this . view = new View (
327- this . asset ,
332+ this . permedAsset ,
328333 {
329334 ...this . connectData ,
330- protocol : { name : this . protocol } ,
335+ permed_protocol : { name : this . protocol } ,
331336 connectMethod : this . connectMethod
332337 } ,
333338 this . connectToken ,
@@ -356,8 +361,6 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
356361 } ,
357362 this . isDirect ? 100 : 500
358363 ) ;
359-
360- console . log ( 'view' , this . view ) ;
361364 }
362365 }
363366
0 commit comments