oauth select多选保存问题

This commit is contained in:
MaxKey 2022-07-18 08:29:13 +08:00
parent b12e7b7049
commit 5ae9dfd16f
3 changed files with 26 additions and 5 deletions

View File

@ -76,7 +76,6 @@ export class AppsOauth20Details extends Apps {
override init(data: any): void {
Object.assign(this, data);
super.init(data);
//console.log(data);
if (this.status == 1) {
this.switch_status = true;
}
@ -105,5 +104,27 @@ export class AppsOauth20Details extends Apps {
} else {
this.status = 0;
}
this.scope = '';
for (let i = 0; i < this.select_scope.length; i++) {
if (this.select_scope[i] != '') {
if (this.scope === '') {
this.scope = this.select_scope[i];
} else {
this.scope = `${this.scope},${this.select_scope[i]}`;
}
}
}
this.authorizedGrantTypes = '';
let n = 0;
for (let i = 0; i < this.select_authorizedGrantTypes.length; i++) {
if (this.select_authorizedGrantTypes[i] != '') {
if (this.authorizedGrantTypes === '') {
this.authorizedGrantTypes = this.select_authorizedGrantTypes[i];
} else {
this.authorizedGrantTypes = `${this.authorizedGrantTypes},${this.select_authorizedGrantTypes[i]}`;
}
}
}
}
}