mirror of
https://github.com/chatopera/cosin.git
synced 2025-06-16 18:30:03 +08:00
https://github.com/chatopera/cskefu/issues/469 enable set a chatbox in login page
This commit is contained in:
parent
93f272b147
commit
39b3dad28e
@ -85,8 +85,26 @@ public class LoginController extends Handler {
|
||||
@Value("${tongji.baidu.sitekey}")
|
||||
private String tongjiBaiduSiteKey;
|
||||
|
||||
@Value("${notice.login.banner}")
|
||||
private String noticeLoginBanner;
|
||||
@Value("${extras.login.banner}")
|
||||
private String extrasLoginBanner;
|
||||
|
||||
@Value("${extras.login.chatbox}")
|
||||
private String extrasLoginChatbox;
|
||||
|
||||
|
||||
private void putViewExtras(final ModelAndView view) {
|
||||
if (StringUtils.isNotBlank(extrasLoginBanner) && !StringUtils.equalsIgnoreCase(extrasLoginBanner, "off")) {
|
||||
view.addObject("extrasLoginBanner", extrasLoginBanner);
|
||||
} else {
|
||||
view.addObject("extrasLoginBanner", "off");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(extrasLoginChatbox) && !StringUtils.equalsIgnoreCase(extrasLoginChatbox, "off")) {
|
||||
view.addObject("extrasLoginChatbox", extrasLoginChatbox);
|
||||
} else {
|
||||
view.addObject("extrasLoginChatbox", "off");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录页面
|
||||
@ -152,11 +170,7 @@ public class LoginController extends Handler {
|
||||
view.addObject("tongjiBaiduSiteKey", tongjiBaiduSiteKey);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(noticeLoginBanner) && !StringUtils.equalsIgnoreCase(noticeLoginBanner, "off")) {
|
||||
view.addObject("noticeLoginBanner", noticeLoginBanner);
|
||||
} else {
|
||||
view.addObject("noticeLoginBanner", "off");
|
||||
}
|
||||
putViewExtras(view);
|
||||
|
||||
return view;
|
||||
}
|
||||
@ -238,11 +252,9 @@ public class LoginController extends Handler {
|
||||
if (StringUtils.isNotBlank(referer)) {
|
||||
view.addObject("referer", referer);
|
||||
}
|
||||
if (StringUtils.isNotBlank(noticeLoginBanner) && !StringUtils.equalsIgnoreCase(noticeLoginBanner, "off")) {
|
||||
view.addObject("noticeLoginBanner", noticeLoginBanner);
|
||||
} else {
|
||||
view.addObject("noticeLoginBanner", "off");
|
||||
}
|
||||
|
||||
putViewExtras(view);
|
||||
|
||||
view.addObject("msg", "0");
|
||||
}
|
||||
}
|
||||
|
@ -228,4 +228,5 @@ channel.skype.crm=
|
||||
# Miscs
|
||||
##############################################
|
||||
# 登陆页面公告
|
||||
notice.login.banner=商务洽谈、技术支持等联系方式查看 https://dwz.chatopera.com/A51h6m *本提示仅出现于演示环境
|
||||
extras.login.banner=商务洽谈、技术支持等联系方式查看 https://dwz.chatopera.com/A51h6m *本提示仅出现于演示环境
|
||||
extras.login.chatbox=off
|
@ -14,6 +14,8 @@ html
|
||||
link(rel="stylesheet" href="/css/layui.css")
|
||||
link(rel="stylesheet" href="/css/login.css")
|
||||
link(rel="stylesheet" href="/css/flexboxgrid.min.css")
|
||||
if extrasLoginChatbox != "off"
|
||||
script(defer="true" src="#{extrasLoginChatbox}")
|
||||
script(src="/layui.js")
|
||||
script(language="javascript").
|
||||
if ((window.frameElement && window.frameElement.id || '') != "") {
|
||||
@ -54,9 +56,9 @@ html
|
||||
})();
|
||||
}
|
||||
body.login
|
||||
if noticeLoginBanner != "off"
|
||||
if extrasLoginBanner != "off"
|
||||
div(style="width: 100%; height:50px; background-color: #2bd99e; padding-top: 0px;display: flex;")
|
||||
p(style="color: white;margin: auto; font-size: 15px")= noticeLoginBanner
|
||||
p(style="color: white;margin: auto; font-size: 15px")= extrasLoginBanner
|
||||
.login-box
|
||||
.login-logo
|
||||
a
|
||||
|
@ -51,7 +51,8 @@ services:
|
||||
- BOT_THRESHOLD_FAQ_SUGG_REPLY=${BOT_THRESHOLD_FAQ_SUGG_REPLY:-0.3}
|
||||
- CSKEFU_SETTINGS_WEBIM_VISITOR_SEPARATE=true
|
||||
- TONGJI_BAIDU_SITEKEY=${TONGJI_BAIDU_SITEKEY:-placeholder}
|
||||
- NOTICE_LOGIN_BANNER=${NOTICE_LOGIN_BANNER:-off}
|
||||
- EXTRAS_LOGIN_BANNER=${NOTICE_LOGIN_BANNER:-off}
|
||||
- EXTRAS_LOGIN_CHATBOX=${EXTRAS_LOGIN_CHATBOX:-off}
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
|
@ -29,4 +29,5 @@ BOT_THRESHOLD_FAQ_BEST_REPLY=0.8
|
||||
BOT_THRESHOLD_FAQ_SUGG_REPLY=0.6
|
||||
|
||||
TONGJI_BAIDU_SITEKEY=placeholder
|
||||
NOTICE_LOGIN_BANNER=商务洽谈、售后技术支持和云服务发票等 https://dwz.chatopera.com/A51h6m *本提示仅出现于演环境
|
||||
EXTRAS_LOGIN_BANNER=商务洽谈、技术支持等联系方式查看 https://dwz.chatopera.com/A51h6m *本提示仅出现于演示环境
|
||||
EXTRAS_LOGIN_CHATBOX=https://oh-my.cskefu.com/im/0nhckh.html
|
Loading…
x
Reference in New Issue
Block a user