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]}`;
}
}
}
}
}

View File

@ -80,7 +80,7 @@ public class MaxKeyMvcConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
_logger.debug("addResourceHandlers");
_logger.debug("add Resource Handlers");
_logger.debug("add statics");
registry.addResourceHandler("/static/**")
.addResourceLocations("classpath:/static/");
@ -98,7 +98,7 @@ public class MaxKeyMvcConfig implements WebMvcConfigurer {
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
_logger.debug("addResourceHandler finished .");
_logger.debug("add Resource Handler finished .");
}
@Override

View File

@ -58,7 +58,7 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
_logger.debug("addResourceHandlers");
_logger.debug("add Resource Handlers");
_logger.debug("add statics");
registry.addResourceHandler("/static/**")
@ -77,7 +77,7 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
_logger.debug("addResourceHandler finished .");
_logger.debug("add Resource Handler finished .");
}
@Override