You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-fly/static/html/chat_page.html

97 lines
5.1 KiB

<html lang="cn">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="keywords" content="开源客服系统,golang在线客服,免费客服系统,go语言在线聊天工具,gofly,GOFLY客服系统"/>
<meta name="description" content="golang开发的开源免费客服系统,可独立部署客服系统,支持文字/表情/图片/文件发送,支持快捷回复,支持IP黑名单,展示访客信息,后台权限控制"/>
<meta name="author" content="陶士涵">
<title>GO语言开源客服系统-GOFLY</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/theme-chalk/index.css">
<script src="/static/js/functions.js?v=0.1.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="/static/js/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="/static/css/front.css?v=1.0.0" />
<link rel="stylesheet" href="/static/css/common.css?v=1.0.0" />
</head>
<body>
<div id="app" class="chatCenter">
<template>
<!--客服代码-->
<div class="chatContext chatVisitorPage">
<div class="chatBox">
<el-alert
style="margin:10px 0px;width: 100%"
:title="chatTitle"
:closable="false"
type="success">
</el-alert>
<div class="el-alert el-alert--info is-center is-light el-alert__title" v-show="msgListNum>1" v-on:click="getMesssagesByVisitorId(true)"><i class="el-icon-info" ></i>&nbsp;<{flyLang['moremessage']}></div>
<el-row :gutter="2" v-show="replys.length>0">
<el-col :span="3"><el-avatar shape="square" :size="36" :src="noticeAvatar"></el-avatar></el-col>
<el-col :span="21">
<div class="chatUser"><{noticeName}></div>
<div class="chatContent visitorReply" >
<div v-for="reply in replys">
<div class="visitorReplyTitle"><{reply.group_name}></div>
<div v-on:click="sendReply(item.item_name)" class="visitorReplyContent" v-for="item in reply.items"><{item.item_name}></div>
</div>
</div>
</el-col>
<div class="clear"></div>
</el-row>
<el-row :gutter="2" v-for="v in msgList" v-bind:class="{'chatBoxMe': v.is_kefu==true}">
<div class="chatTime" v-bind:class="{'chatTimeHide': v.show_time==false}"><{v.time}></div>
<el-col :span="3"><el-avatar shape="square" :size="36" :src="v.avator"></el-avatar></el-col>
<el-col :span="21">
<div class="chatUser"><{v.name}></div>
<div class="chatContent" v-html="v.content"></div>
</el-col>
<div class="clear"></div>
</el-row>
</div>
</div>
<div class="chatBoxSend">
<div class="iconBtns">
<div class="faceBtn visitorFaceBtn"></div>
<div class="imageBtn visitorImageBtn" id="uploadImg" v-on:click="uploadImg('/uploadimg')"></div>
<div class="folderBtn visitorFolderBtn" id="uploadFile" v-on:click="uploadFile('/uploadfile')"></div>
<div class="clear"></div>
</div>
<el-input type="textarea" @focus="textareaFocus" @blur="textareaBlur" class="chatArea" v-model="messageContent" @keyup.native="inputNextText" v-on:keyup.enter.native="chatToUser" :placeholder="flyLang.textarea"></el-input>
<div class="faceBox visitorFaceBox">
<ul class="faceBoxList">
<li v-on:click="faceIconClick(i)" class="faceIcon" v-for="(v,i) in face" :title="v.name"><img :src=v.path></li>
</ul>
<div class="clear"></div>
</div>
<div class="btnArea">
<el-button :disabled="sendDisabled||messageContent==''" type="primary" class="chatBoxSendBtn" size="small" v-on:click="chatToUser"><{flyLang.sent}></el-button>
</div>
<div class="footContact clear">
<a href="https://github.com/taoshihan1991/go-fly" target="_blank"><{flyLang.copyright}></a>
</div>
</div>
<!--//客服代码-->
<audio id="chatMessageAudio">
<source id="chatMessageAudioSource" />
</audio>
<audio id="chatMessageSendAudio">
<source id="chatMessageSendAudioSource" />
</audio>
</template>
</div>
</body>
<script src="https://cdn.bootcss.com/reconnecting-websocket/1.0.0/reconnecting-websocket.min.js"></script>
<script>
var KEFU_ID='{{.KEFU_ID}}';
var REFER='{{.Refer}}';
var LANG=checkLang();
</script>
<script src="/static/js/chat-lang.js?v=0.3.7"></script>
<script src="/static/js/chat-page.js?v=0.3.7"></script>
</html>