首页增加js变量

pull/23/head
taoshihan1991 4 years ago
parent 81c0e8c240
commit 5c6727e643

@ -169,13 +169,13 @@
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script> <script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script>
<link href="/static/css/gofly-front.css" rel="stylesheet" type="text/css"/> <link href="/static/css/gofly-front.css" rel="stylesheet" type="text/css"/>
<div id="launchButton" class="launchButton animateUpDown"> <div id="launchButton" class="launchButton animateUpDown">
<svg x="0px" y="0px" viewBox="0 0 27 21.9" aria-labelledby="title desc" role="img" class="xhl-launch-button-svg"><title>Chat Icon </title><desc>three small dots to indicate that an agent is available to chat</desc><path fill="#ffffff" d="M23.2,0L2.6,1.7C1,1.9,0,3.2,0,4.9v8c0,1.6,0.8,3,2.4,3.1l5.3,0.5c0,0,1,1.6,0.3,3.2C7.2,21.3,6,21.9,6,21.9 c4.2,0,6.6-3.1,7.8-4.9l9.4,0.7c1.8,0.2,3.8-1.3,3.8-3.1V3.1C27,1.3,25-0.1,23.2,0z M6.4,10.1c-0.9,0-1.7-0.7-1.7-1.7 c0-0.9,0.7-1.7,1.7-1.7C7.3,6.8,8,7.5,8,8.5C8,9.4,7.3,10.1,6.4,10.1z M13.2,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C14.8,9.4,14.1,10.1,13.2,10.1z M19.9,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C21.6,9.4,20.9,10.1,19.9,10.1z"></path></svg>
<div class="launchButtonText"> <div class="launchButtonText">
Chat with us Chat with me
</div> </div>
</div> </div>
<script> <script>
var GOFLY_URL=""; var GOFLY_URL="";
var GOFLY_KEFU_ID="kefu3";
</script> </script>
<script src="/static/js/gofly-front.js"></script> <script src="/static/js/gofly-front.js"></script>
<!--//对接客服代码--> <!--//对接客服代码-->
@ -185,13 +185,13 @@ setTimeout(function(){
if (launchButtonFlag) return; if (launchButtonFlag) return;
layer.open({ layer.open({
type: 2, type: 2,
title: "Chat with us", title: "Chat with me",
closeBtn: 1, //不显示关闭按钮 closeBtn: 1, //不显示关闭按钮
shade: [0], shade: [0],
area: ['510px', '520px'], area: ['510px', '520px'],
offset: 'rb', //右下角弹出 offset: 'rb', //右下角弹出
anim: 2, anim: 2,
content: ['/chatIndex?lang=en&refer='+window.document.title, 'no'], //iframe的urlno代表不显示滚动条 content: ['/chatIndex?kefu_id='+GOFLY_KEFU_ID+'&refer='+window.document.title, 'no'], //iframe的urlno代表不显示滚动条
end: function(){ end: function(){
launchButtonFlag=false; launchButtonFlag=false;
$(".launchButton").show(); $(".launchButton").show();

@ -8,23 +8,23 @@
<el-tabs> <el-tabs>
<el-tab-pane label="HTML模式"> <el-tab-pane label="HTML模式">
<textarea style="width:100%;color:green;font-size:12px;height:290px;"> <textarea style="width:100%;color:green;font-size:12px;height:290px;">
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script> <script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script>
<link href="https://gofly.sopans.com/static/css/gofly-front.css" rel="stylesheet" type="text/css"/> <link href="/static/css/gofly-front.css" rel="stylesheet" type="text/css"/>
<div id="launchButton" class="launchButton"> <div id="launchButton" class="launchButton animateUpDown">
<svg x="0px" y="0px" viewBox="0 0 27 21.9" aria-labelledby="title desc" role="img" class="xhl-launch-button-svg"><title>Chat Icon </title><desc>three small dots to indicate that an agent is available to chat</desc><path fill="#ffffff" d="M23.2,0L2.6,1.7C1,1.9,0,3.2,0,4.9v8c0,1.6,0.8,3,2.4,3.1l5.3,0.5c0,0,1,1.6,0.3,3.2C7.2,21.3,6,21.9,6,21.9 c4.2,0,6.6-3.1,7.8-4.9l9.4,0.7c1.8,0.2,3.8-1.3,3.8-3.1V3.1C27,1.3,25-0.1,23.2,0z M6.4,10.1c-0.9,0-1.7-0.7-1.7-1.7 c0-0.9,0.7-1.7,1.7-1.7C7.3,6.8,8,7.5,8,8.5C8,9.4,7.3,10.1,6.4,10.1z M13.2,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C14.8,9.4,14.1,10.1,13.2,10.1z M19.9,10.1c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 c0.9,0,1.7,0.7,1.7,1.7C21.6,9.4,20.9,10.1,19.9,10.1z"></path></svg>
<div class="launchButtonText"> <div class="launchButtonText">
Chat with us Chat with me
</div> </div>
</div> </div>
<script> <script>
var GOFLY_URL="https://gofly.sopans.com"; var GOFLY_URL="";
</script> var GOFLY_KEFU_ID="[客服用户名]";
<script src="https://gofly.sopans.com/static/js/gofly-front.js"></script> </script>
<script src="/static/js/gofly-front.js"></script>
</textarea> </textarea>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="超链接模式"> <el-tab-pane label="超链接模式">
<el-input value="https://gofly.sopans.com/chat_page?kefu_id=[客服用户名]"></el-input> <el-input value="https://gofly.sopans.com/chatIndex?kefu_id=[客服用户名]"></el-input>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-main> </el-main>

@ -8,13 +8,13 @@ $("#launchButton").click(function() {
} }
layer.open({ layer.open({
type: 2, type: 2,
title: "Chat with us", title: "Chat with me",
closeBtn: 1, //不显示关闭按钮 closeBtn: 1, //不显示关闭按钮
shade: [0], shade: [0],
area: ['520px', '530px'], area: ['520px', '530px'],
offset: 'rb', //右下角弹出 offset: 'rb', //右下角弹出
anim: 2, anim: 2,
content: [GOFLY_URL+'/chatIndex?refer='+window.document.title, 'yes'], //iframe的urlno代表不显示滚动条 content: [GOFLY_URL+'/chatIndex?kefu_id='+GOFLY_KEFU_ID+'&refer='+window.document.title, 'yes'], //iframe的urlno代表不显示滚动条
end: function(){ end: function(){
launchButtonFlag=false; launchButtonFlag=false;
$(".launchButton").show(); $(".launchButton").show();

Loading…
Cancel
Save