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.
83 lines
3.4 KiB
83 lines
3.4 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="description" content="">
|
|
<meta name="author" content="陶士涵">
|
|
<title>GO-FLY客服页</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="https://cdn.jsdelivr.net/npm/vue-router/dist/vue-router.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
|
<link rel="stylesheet" href="/static/css/common.css?v=0.1.1" />
|
|
<style>
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
background: #fff;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="app" class="chatKfPageApp">
|
|
<router-view></router-view>
|
|
</div>
|
|
<template id="chatKfIndex">
|
|
<el-row>
|
|
<div style="cursor:pointer" v-for="item in visitors" :key="item.uid" class="onlineUsers">
|
|
<router-link :to="'/chatKfBox/'+item.uid">
|
|
<el-col :span="6">
|
|
<el-avatar :size="40" :src="item.avator"></el-avatar>
|
|
</el-col>
|
|
<el-col :span="18">
|
|
<{item.username}>
|
|
</el-col>
|
|
</router-link>
|
|
</div>
|
|
</el-row>
|
|
</template>
|
|
<template id="chatBox">
|
|
<div>
|
|
<div class="chatContext">
|
|
<div class="chatBox">
|
|
<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 :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="clear"></div>
|
|
</div>
|
|
<el-input type="textarea" class="chatArea" v-model="messageContent" v-on:keyup.enter.native="chatToUser"></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 type="primary" class="chatBoxSendBtn" size="small" v-on:click="chatToUser">发送</el-button>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</body>
|
|
<script src="https://cdn.bootcss.com/reconnecting-websocket/1.0.0/reconnecting-websocket.min.js"></script>
|
|
<script>
|
|
var TOKEN='{{.Token}}';
|
|
</script>
|
|
<script src="/static/js/chat-kf-page.js?v=0.1.1"></script>
|
|
</html>
|