REQ-3045: IM按钮
This commit is contained in:
parent
c53d0fda80
commit
9275e42828
@ -134,7 +134,14 @@ public class MessageTemplateParserV3 {
|
||||
cmsButton.setAction(button.getCategory().name());
|
||||
cmsButton.setIsHighlight(button.parseStyle().contains(ButtonStyleEnum.HIGH_LIGHT));
|
||||
cmsButton.setIsOverCard(button.parseStyle().contains(ButtonStyleEnum.OVER_CARD));
|
||||
cmsButton.setUrlInfo(parseUrlForCms(button.getUrlConfig()));
|
||||
if (RouterCategoryEnum.ACTION.equals(button.getCategory())) {
|
||||
ParsedUrlForCms urlForCms = new ParsedUrlForCms();
|
||||
urlForCms.setHasManagerAppUrl(true);
|
||||
urlForCms.setUrl(button.getApiUrl());
|
||||
cmsButton.setUrlInfo(urlForCms);
|
||||
} else {
|
||||
cmsButton.setUrlInfo(parseUrlForCms(button.getUrlConfig()));
|
||||
}
|
||||
if (im.getCardButtonsForCms() == null)
|
||||
im.setCardButtonsForCms(new ArrayList<>());
|
||||
im.getCardButtonsForCms().add(cmsButton);
|
||||
@ -145,6 +152,7 @@ public class MessageTemplateParserV3 {
|
||||
}
|
||||
|
||||
private static ParsedUrlForCms parseUrlForCms(UrlConfig urlConfig) {
|
||||
if (urlConfig == null) return null;
|
||||
ParsedUrlForCms urlForCms = new ParsedUrlForCms();
|
||||
urlForCms.setUrl(urlForCms.getUrl());
|
||||
UrlConfigWalker.walkDown(urlConfig, new UrlConfigVisitor() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user