我将“让我们聊天”按钮放置在比“重新聊天”聊天框更好的位置。
如何在使用苗条的的“让我们聊天”按钮上挂起onclick事件?
div.col-md-3
p
a.btn-primary.btn-lg.btn-block.chat-link Let's Chat
还要打开由onclick动作触发的ReAmaze聊天框:
<script type="text/javascript" async src="https://cdn.reamaze.com/assets/reamaze.js"></script>
<script type="text/javascript">
var _support = _support || { 'ui': {}, 'user': {} };
_support['account'] = 'scihelp';
_support['ui']['widget'] = true;
<% if user_signed_in? %>
_support['user'] = {
id: '<%= current_user.id %>',
email: '<%= current_user.email %>',
name: '<%= current_user.full_name %>',
authkey: '<%= OpenSSL::HMAC.hexdigest('sha256', "#{ENV['REAMAZE_SSO_SECRET']}", "#{current_user.id}:#{current_user.email}") %>'
}
<% end %>
_support['custom_fields'] = {
AppName: {
type: 'hidden',
value: 'Chat',
}
}
</script>