File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -142,12 +142,14 @@ export default class Asw {
142
142
} ;
143
143
144
144
let roleName = role ;
145
- const { appId , ownerUin } = await this . account . get ( ) ;
145
+ const accountInfo = await this . account . get ( ) ;
146
146
147
147
if ( ! roleName ) {
148
- roleName = await this . createRole ( name , appId ) ;
148
+ // 如果上层传入 appId 直接使用上层 appId,如果没有尝试通过 accountInfo 中来获取
149
+ const appId = options . appId || accountInfo . appId ;
150
+ roleName = await this . createRole ( name , appId ! ) ;
149
151
}
150
- reqParams . RoleResource = `qcs::cam::uin/${ ownerUin } :roleName/${ roleName } ` ;
152
+ reqParams . RoleResource = `qcs::cam::uin/${ accountInfo . ownerUin } :roleName/${ roleName } ` ;
151
153
152
154
if ( input ) {
153
155
reqParams . Input = input ;
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ export interface CreateOptions {
43
43
enableCls ?: boolean ;
44
44
// 状态机默认输入参数
45
45
input ?: string ;
46
+
47
+ // app id
48
+ appId ?: string ;
46
49
}
47
50
48
51
export interface UpdateOptions extends CreateOptions {
You can’t perform that action at this time.
0 commit comments