新增播放器配置

This commit is contained in:
none 2023-03-21 16:18:57 +08:00
parent 85f7afa6e8
commit 0cfac84092
2 changed files with 63 additions and 37 deletions

View File

@ -18,43 +18,68 @@ import java.util.*;
public class AppConfigCheck implements ApplicationRunner { public class AppConfigCheck implements ApplicationRunner {
private static final HashMap<String, AppConfig[]> configs = new HashMap<>() {{ private static final HashMap<String, AppConfig[]> configs = new HashMap<>() {{
put("系统", new AppConfig[]{ put("系统", new AppConfig[]{new AppConfig() {{
new AppConfig() {{ setName("网站名");
setName("网站名"); setSort(10);
setSort(10); setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT);
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT); setKeyName("system.name");
setKeyName("system.name"); setKeyValue("");
setKeyValue(""); }}, new AppConfig() {{
}}, setName("Logo");
new AppConfig() {{ setSort(20);
setName("Logo"); setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_IMAGE);
setSort(20); setKeyName("system.logo");
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_IMAGE); setKeyValue("");
setKeyName("system.logo"); }}, new AppConfig() {{
setKeyValue(""); setName("API访问地址");
}}, setSort(30);
new AppConfig() {{ setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT);
setName("API访问地址"); setKeyName("system.api_url");
setSort(30); setKeyValue("");
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT); }}, new AppConfig() {{
setKeyName("system.api_url"); setName("PC端口访问地址");
setKeyValue(""); setSort(40);
}}, setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT);
new AppConfig() {{ setKeyName("system.pc_url");
setName("PC端口访问地址"); setKeyValue("");
setSort(40); }}, new AppConfig() {{
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT); setName("H5端口访问地址");
setKeyName("system.pc_url"); setSort(50);
setKeyValue(""); setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT);
}}, setKeyName("system.h5_url");
new AppConfig() {{ setKeyValue("");
setName("H5端口访问地址"); }},});
setSort(50); put("播放器配置", new AppConfig[]{new AppConfig() {{
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_INPUT); setName("播放器封面");
setKeyName("system.h5_url"); setSort(10);
setKeyValue(""); setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_IMAGE);
}}, setKeyName("player.poster");
}); setKeyValue("");
}}, new AppConfig() {{
setName("启用跑马灯");
setSort(20);
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_SWITCH);
setKeyName("player.is_enabled_bullet_secret");
setKeyValue("0");
}}, new AppConfig() {{
setName("跑马灯内容");
setSort(30);
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_TEXT);
setKeyName("player.bullet_secret_text");
setKeyValue("");
}}, new AppConfig() {{
setName("跑马灯颜色");
setSort(40);
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_TEXT);
setKeyName("player.bullet_secret_color");
setKeyValue("");
}}, new AppConfig() {{
setName("跑马灯透明度");
setSort(50);
setFieldType(BackendConstant.APP_CONFIG_FIELD_TYPE_TEXT);
setKeyName("player.bullet_secret_opacity");
setKeyValue("1");
}},});
}}; }};
@Autowired @Autowired

View File

@ -70,5 +70,6 @@ public class BackendConstant {
public final static String APP_CONFIG_FIELD_TYPE_INPUT = "input"; public final static String APP_CONFIG_FIELD_TYPE_INPUT = "input";
public final static String APP_CONFIG_FIELD_TYPE_TEXT = "text"; public final static String APP_CONFIG_FIELD_TYPE_TEXT = "text";
public final static String APP_CONFIG_FIELD_TYPE_SELECT = "select"; public final static String APP_CONFIG_FIELD_TYPE_SELECT = "select";
public final static String APP_CONFIG_FIELD_TYPE_SWITCH = "switch";
} }