Commit f958b975 by keith

into client,admin public

parent d9c0acfd
Showing with 639 additions and 19 deletions
...@@ -2,4 +2,5 @@ attach ...@@ -2,4 +2,5 @@ attach
mimc.log mimc.log
kefu_server kefu_server
kefu_server.tar.gz kefu_server.tar.gz
conf/app.back.conf conf/app.back.conf
\ No newline at end of file node_modules
\ No newline at end of file
File mode changed
...@@ -36,8 +36,8 @@ mimc_appSecret = "wjLFWivIORCFsi3tHr9wHQ==" ...@@ -36,8 +36,8 @@ mimc_appSecret = "wjLFWivIORCFsi3tHr9wHQ=="
# IM数据库信息 # IM数据库信息
kf_alias_name = "default" kf_alias_name = "default"
kf_driver_name= "mysql" kf_driver_name= "mysql"
kf_mysql_host = "192.168.31.72" kf_mysql_host = "aissz.com"
kf_mysql_port = "3306" kf_mysql_port = "3636"
kf_mysql_user = "root" kf_mysql_user = "root"
kf_mysql_db = "kefu_server_dev" kf_mysql_db = "kefu_server_dev"
kf_mysql_pwd = "chenxianqi" kf_mysql_pwd = "chenxianqi"
......
File mode changed
File mode changed
...@@ -142,8 +142,8 @@ func (c *WorkOrderController) DeleteWorkType() { ...@@ -142,8 +142,8 @@ func (c *WorkOrderController) DeleteWorkType() {
c.JSON(configs.ResponseSucess, "删除成功!", nil) c.JSON(configs.ResponseSucess, "删除成功!", nil)
} }
// GetType get work order type // GetWorkType get work order type
func (c *WorkOrderController) GetType() { func (c *WorkOrderController) GetWorkType() {
// id // id
id, _ := strconv.ParseInt(c.Ctx.Input.Param(":id"), 10, 64) id, _ := strconv.ParseInt(c.Ctx.Input.Param(":id"), 10, 64)
...@@ -155,17 +155,8 @@ func (c *WorkOrderController) GetType() { ...@@ -155,17 +155,8 @@ func (c *WorkOrderController) GetType() {
} }
// GetTypes get work order types // GetWorkTypes get work order types
func (c *WorkOrderController) GetTypes() { func (c *WorkOrderController) GetWorkTypes() {
workOrderTypes := c.WorkOrderTypeRepository.GetWorkOrderTypes()
} c.JSON(configs.ResponseSucess, "查询成功!", workOrderTypes)
// PutType update work order type
func (c *WorkOrderController) PutType() {
}
// DeleteType delete work order type
func (c *WorkOrderController) DeleteType() {
} }
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
File mode changed
No preview for this file type
No preview for this file type
No preview for this file type

4.35 KB | W: | H:

4.35 KB | W: | H:

public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
  • 2-up
  • Swipe
  • Onion skin

237 KB | W: | H:

237 KB | W: | H:

public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
  • 2-up
  • Swipe
  • Onion skin

23.4 KB | W: | H:

23.4 KB | W: | H:

public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
  • 2-up
  • Swipe
  • Onion skin
File mode changed
File mode changed
File mode changed
File mode changed
No preview for this file type

8.64 KB | W: | H:

8.64 KB | W: | H:

public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
  • 2-up
  • Swipe
  • Onion skin

5.59 KB | W: | H:

5.59 KB | W: | H:

public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
  • 2-up
  • Swipe
  • Onion skin
File mode changed
File mode changed
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
node_modules
dist
build
\ No newline at end of file
客服系统开发者QQ交流群: 623661658
# 欢迎使用本客服系统 - 客服端-工作台
![客服系统](http://qiniu.cmp520.com/kefuxitonh.jpg)
## 本项目关联GIT项目资源连接
- **[服务端][1]**
- **[客服端Flutter][5]**
- **[客服端][2]**
- **[客户端H5][3]**
- **[客户端Flutter][4]**
**本系统** 是基于小米消息云实现的一款简单实用的面向多终端的客服系统,本系统简单易用,易扩展,易整合现有的业务系统,无缝对接自有业务。
## 安装
```
npm install
npm run serve
npm run build
npm run test
npm run lint
```
## 打包基于Electron的二进制包
```
npm run build # 先执行
npm run win32
npm run win64
npm run mac
npm run linux32
npm run linux64
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
### TypeError: Cannot destructure property `createHash` of 'undefined' or 'null'.
npm add webpack@latest OK
[1]: https://github.com/chenxianqi/kefu_server
[2]: https://github.com/chenxianqi/kefu_admin
[3]: https://github.com/chenxianqi/kefu_client
[4]: https://github.com/chenxianqi/kefu_flutter
[5]: https://github.com/chenxianqi/kefu_workbench
module.exports = {
presets: [
'@vue/app'
]
}
No preview for this file type
const electron = require('electron')
const app = electron.app
const dialog = electron.dialog;
const BrowserWindow = electron.BrowserWindow
const Menu = electron.Menu
const path = require('path')
if (process.mas) app.setName('客服系统')
let mainWindow
function createWindow () {
let windowOptions = {
width: 1330,
height: 780,
title: app.getName()
}
if (process.platform === 'linux') {
windowOptions.icon = path.join(__dirname, '/logo.ico')
}
mainWindow = new BrowserWindow(windowOptions);
mainWindow.loadURL(path.join('file://', __dirname, '/dist/index.html'))
mainWindow.on('closed', function () {
mainWindow = null
})
mainWindow.on('close', function (e) {
const options = {
type: 'warning',
title: '温馨提示!',
message: "您确定关闭应用程序吗?",
buttons: ['我点错了', '窗口最小化', '确定关闭']
}
dialog.showMessageBox(options, function (index) {
if(index == 2) app.exit();
if(index == 1) mainWindow.minimize()
})
e.preventDefault()
})
}
app.on('ready', function() {
const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
createWindow()
})
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
})
app.on('activate', function () {
if (mainWindow === null) createWindow()
})
app.on('browser-window-created', function () {
let reopenMenuItem = findReopenMenuItem()
if (reopenMenuItem) reopenMenuItem.enabled = false
})
app.on('window-all-closed', function () {
let reopenMenuItem = findReopenMenuItem()
if (reopenMenuItem) reopenMenuItem.enabled = true
app.quit()
})
/**
* 注册键盘快捷键
*/
let template = [
{
label: '操作',
submenu: [{
label: '重新加载',
accelerator: 'CmdOrCtrl+R',
click: function (item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow.id === 1) {
BrowserWindow.getAllWindows().forEach(function (win) {
if (win.id > 1) {
win.close()
}
})
}
focusedWindow.loadURL(path.join('file://', __dirname, '/dist/index.html'))
}
}
},
{
label: "选项",
submenu: [
{ label: "复制", accelerator: "CmdOrCtrl+C", selector: "copy:" },
{ label: "粘贴", accelerator: "CmdOrCtrl+V", selector: "paste:" },
]
}]
},
{
label: '窗口设置',
role: 'window',
submenu: [{
label: '最小化',
accelerator: 'CmdOrCtrl+M',
role: 'minimize'
},{
label: '切换开发者工具',
accelerator: (function () {
if (process.platform === 'darwin') {
return 'Alt+Command+I'
} else {
return 'Ctrl+Shift+I'
}
})(),
click: function (item, focusedWindow) {
if (focusedWindow) {
focusedWindow.toggleDevTools()
}
}
}]
},
{
label: '关于',
role: 'help',
submenu: [{
label: '客服',
click: function () {
electron.shell.openExternal('http://kf.aissz.com:666')
}
}]
}
]
/**
* 增加更新相关的菜单选项
*/
function addUpdateMenuItems (items, position) {
if (process.mas) return
const version = electron.app.getVersion()
let updateItems = [{
label: `当前版本 ${version}`,
enabled: false
}]
items.splice.apply(items, [position, 0].concat(updateItems))
}
function findReopenMenuItem () {
const menu = Menu.getApplicationMenu()
if (!menu) return
let reopenMenuItem
menu.items.forEach(function (item) {
if (item.submenu) {
item.submenu.items.forEach(function (item) {
if (item.key === 'reopenMenuItem') {
reopenMenuItem = item
}
})
}
})
return reopenMenuItem
}
// 针对Mac端的一些配置
if (process.platform === 'darwin') {
const name = electron.app.getName()
template.unshift({
label: name,
submenu: [{
label: '退出应用',
accelerator: 'Command+Q',
click: function () {
app.exit()
}
}]
})
// Window menu.
template[3].submenu.push({
type: 'separator'
})
addUpdateMenuItems(template[0].submenu, 1)
}
// 针对Windows端的一些配置
if (process.platform === 'win32') {
const helpMenu = template[template.length - 1].submenu
addUpdateMenuItems(helpMenu, 0)
}
This diff could not be displayed because it is too large.
{
"name": "kefu_admin",
"version": "0.0.1",
"private": true,
"main": "main.js",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"open": "electron .",
"win32": "electron-builder --win --ia32",
"win64": "electron-builder --win --x64",
"mac": "electron-builder --mac --x64",
"linux32": "electron-builder --linux --ia32",
"linux64": "electron-builder --linux --x64"
},
"build": {
"appId": "im.aissz.com:666",
"productName": "客服系统",
"win": {
"icon": "logo.ico"
},
"mac": {
"icon": "mac.png"
},
"directories": {
"output": "build"
}
},
"dependencies": {
"axios": "^0.19.0",
"core-js": "^2.6.5",
"echarts": "^4.2.1",
"element-ui": "^2.10.1",
"moment": "^2.24.0",
"push.js": "^1.0.12",
"qiniu-js": "^2.5.5",
"v-charts": "^1.19.0",
"vue": "^2.6.10",
"vue-photo-preview": "git+https://github.com/chenxianqi/vue-photo-preview.git",
"vue-router": "^3.0.3",
"vuex": "^3.1.1",
"webpack": "^4.41.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.9.0",
"@vue/cli-plugin-eslint": "^3.9.0",
"@vue/cli-service": "^3.9.0",
"babel-eslint": "^10.0.1",
"electron": "^6.0.7",
"electron-builder": "^21.2.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"html-webpack-plugin": "^4.0.0-beta.8",
"mini-css-extract-plugin": "^0.8.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue-loader": "^15.7.1",
"vue-template-compiler": "^2.6.10",
"webpack-cli": "^3.3.8"
}
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory(global):typeof define==="function"&&define.amd?define(factory):factory(global)})(typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64;var version="2.5.1";var buffer;if(typeof module!=="undefined"&&module.exports){try{buffer=eval("require('buffer').Buffer")}catch(err){buffer=undefined}}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64tab=function(bin){var t={};for(var i=0,l=bin.length;i<l;i++)t[bin.charAt(i)]=i;return t}(b64chars);var fromCharCode=String.fromCharCode;var cb_utob=function(c){if(c.length<2){var cc=c.charCodeAt(0);return cc<128?c:cc<2048?fromCharCode(192|cc>>>6)+fromCharCode(128|cc&63):fromCharCode(224|cc>>>12&15)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}else{var cc=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return fromCharCode(240|cc>>>18&7)+fromCharCode(128|cc>>>12&63)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}};var re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var utob=function(u){return u.replace(re_utob,cb_utob)};var cb_encode=function(ccc){var padlen=[0,2,1][ccc.length%3],ord=ccc.charCodeAt(0)<<16|(ccc.length>1?ccc.charCodeAt(1):0)<<8|(ccc.length>2?ccc.charCodeAt(2):0),chars=[b64chars.charAt(ord>>>18),b64chars.charAt(ord>>>12&63),padlen>=2?"=":b64chars.charAt(ord>>>6&63),padlen>=1?"=":b64chars.charAt(ord&63)];return chars.join("")};var btoa=global.btoa?function(b){return global.btoa(b)}:function(b){return b.replace(/[\s\S]{1,3}/g,cb_encode)};var _encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(u){return(u.constructor===buffer.constructor?u:buffer.from(u)).toString("base64")}:function(u){return(u.constructor===buffer.constructor?u:new buffer(u)).toString("base64")}:function(u){return btoa(utob(u))};var encode=function(u,urisafe){return!urisafe?_encode(String(u)):_encode(String(u)).replace(/[+\/]/g,function(m0){return m0=="+"?"-":"_"}).replace(/=/g,"")};var encodeURI=function(u){return encode(u,true)};var re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g");var cb_btou=function(cccc){switch(cccc.length){case 4:var cp=(7&cccc.charCodeAt(0))<<18|(63&cccc.charCodeAt(1))<<12|(63&cccc.charCodeAt(2))<<6|63&cccc.charCodeAt(3),offset=cp-65536;return fromCharCode((offset>>>10)+55296)+fromCharCode((offset&1023)+56320);case 3:return fromCharCode((15&cccc.charCodeAt(0))<<12|(63&cccc.charCodeAt(1))<<6|63&cccc.charCodeAt(2));default:return fromCharCode((31&cccc.charCodeAt(0))<<6|63&cccc.charCodeAt(1))}};var btou=function(b){return b.replace(re_btou,cb_btou)};var cb_decode=function(cccc){var len=cccc.length,padlen=len%4,n=(len>0?b64tab[cccc.charAt(0)]<<18:0)|(len>1?b64tab[cccc.charAt(1)]<<12:0)|(len>2?b64tab[cccc.charAt(2)]<<6:0)|(len>3?b64tab[cccc.charAt(3)]:0),chars=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(n&255)];chars.length-=[0,0,2,1][padlen];return chars.join("")};var _atob=global.atob?function(a){return global.atob(a)}:function(a){return a.replace(/\S{1,4}/g,cb_decode)};var atob=function(a){return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g,""))};var _decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(a){return(a.constructor===buffer.constructor?a:buffer.from(a,"base64")).toString()}:function(a){return(a.constructor===buffer.constructor?a:new buffer(a,"base64")).toString()}:function(a){return btou(_atob(a))};var decode=function(a){return _decode(String(a).replace(/[-_]/g,function(m0){return m0=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};var noConflict=function(){var Base64=global.Base64;global.Base64=_Base64;return Base64};global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer};if(typeof Object.defineProperty==="function"){var noEnum=function(v){return{value:v,enumerable:false,writable:true,configurable:true}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)}));Object.defineProperty(String.prototype,"toBase64",noEnum(function(urisafe){return encode(this,urisafe)}));Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,true)}))}}if(global["Meteor"]){Base64=global.Base64}if(typeof module!=="undefined"&&module.exports){module.exports.Base64=global.Base64}else if(typeof define==="function"&&define.amd){define([],function(){return global.Base64})}return{Base64:global.Base64}});
\ No newline at end of file
No preview for this file type
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script type="text/javascript" src="<%= BASE_URL %>mimc-min_1_0_2.js"></script>
<script type="text/javascript" src="<%= BASE_URL %>base64.min.js"></script>
<title>客服系统</title>
<style>
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; }
body, button, input, select, textarea { font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif; }
h1, h2, h3, h4, h5, h6{ font-size:100%; }
address, cite, dfn, em, var { font-style:normal; }
code, kbd, pre, samp { font-family:couriernew, courier, monospace; }
small{ font-size:12px; }
ul, ol { list-style:none; }
a { text-decoration:none;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-webkit-user-select: none;
-moz-user-focus: none;
-moz-user-select: none;
}
a:hover { text-decoration:underline; }
sup { vertical-align:text-top; }
sub{ vertical-align:text-bottom; }
legend { color:#000; }
fieldset, img { border:0; }
button, input, select, textarea { font-size:100%; outline: none;}
table { border-collapse:collapse; border-spacing:0; }
input{
border:0;
outline: none;
}
body{
height: 100vh;
overflow: hidden;
overflow-y: auto;
-webkit-overflow-scrolling:touch;
background-color: #fff;
}
.lx-load-box{
width: 2rem !important;
height: 2rem !important;
top:0 !important;
min-height: inherit!important;
left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important;
}
input::-webkit-input-placeholder{
color:#ccc;
}
input::-moz-placeholder{ /* Mozilla Firefox 19+ */
color:#ccc;
}
input:-moz-placeholder{ /* Mozilla Firefox 4 to 18 */
color:#ccc;
}
input:-ms-input-placeholder{ /* Internet Explorer 10-11 */
color:#ccc;
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
This diff could not be displayed because it is too large.
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
import axios from "axios";
import Push from "push.js";
export default {
created(){
this.$store.dispatch('ON_GET_ME')
},
methods: {
// app init
appInit(){
if(!this.adminInfo){
setTimeout(()=> this.appInit(), 50)
return
}
this.$store.dispatch('ON_GET_UPLOAD_TOKEN')
this.$store.dispatch('ON_GET_PLATFORM_CONFIG')
this.$store.dispatch('ON_GET_SYSTEM')
this.$store.dispatch('ON_GET_COMPANY')
this.$store.dispatch('ON_GET_UPLOADS_CONFIG')
this.$store.dispatch('ON_GET_ROBOTS')
this.$store.dispatch('ON_GET_CONTACTS')
// 一分钟上报一次我的活动时间
this.upLastActivity()
// 获取会话表
this.getContacts()
// Mimc 初始化
this.initMimc()
},
// 获取会话列表
getContacts(){
if(this.adminInfo){
this.$store.dispatch('ON_GET_CONTACTS')
if(this.seviceCurrentUser && this.$store.getters.contacts.length > 0){
this.$store.getters.contacts.map(i => {
if(i.from_account == this.seviceCurrentUser.from_account){
this.$store.commit("onChangeSeviceCurrentUser", i)
}
})
}
}
},
// 上报最后活动时间
upLastActivity(){
this.$store.dispatch('ON_RUN_LAST_ACTiIVITY')
setTimeout(() => this.upLastActivity(), 1000*60)
},
// 初始化Mimc
initMimc(){
var self = this
var adminInfo = this.$store.state.adminInfo
if(!adminInfo){
setTimeout(() => this.initMimc(), 1000)
}else{
self.$mimcInstance.init({
type: 1,
account_id: adminInfo.id
}, (isSuccess) => {
// 初始化完成
if(isSuccess){
// 监听登录状态
this.$mimcInstance.addEventListener("statusChange", (status) => {
if(!status && self.$store.getters.adminInfo.online != 0){
self.watchLogin()
}
})
// 监听连接断开
this.$mimcInstance.addEventListener("disconnect", () => {
console.log("链接断开!")
if(self.$store.getters.adminInfo.online != 0){
self.watchLogin()
}
})
self.watchLogin()
}else{
self.initMimc()
}
})
}
},
// 更新用户状态
changeUserOnlineStatus(online){
// 更新状态
axios.put('/admin/online/' + online)
.then(() => {
this.$store.dispatch('ON_GET_ME')
if(online == 0){
this.$message.info("当前状态为离线")
}
})
.catch(error => {
this.$message.error(error.response.data.message)
});
},
// 监听用户是否有上线登录
watchLogin(){
try{
var self = this
if(self.$store.state.user != null) return;
if(self.$store.getters.adminInfo.online == 1 || self.$store.getters.adminInfo.online == 2){
self.$mimcInstance.login(()=>{
self.changeUserOnlineStatus(self.$store.getters.adminInfo.online)
self.$store.dispatch('ON_RUN_LAST_ACTiIVITY')
self.$store.dispatch('ON_GET_CONTACTS')
self.$store.commit("onChangeMimcUser", self.$mimcInstance.user)
})
}else if(self.$store.getters.adminInfo.online != 0){
setTimeout(() => self.watchLogin(), 1000)
}
}catch(err){
setTimeout(() => this.watchLogin(), 1000)
}
},
},
mounted(){
window.addEventListener("resize", () => {
this.$store.commit("onChangeToggleAside", true)
if(document.body.clientWidth < 1000){
this.$store.commit("onChangeToggleAside", false)
}
}, false)
// 判断通知权限
if(!Push.Permission.has()){
Push.Permission.request(function(){}, function(){})
}
},
computed: {
adminInfo(){
return this.$store.getters.adminInfo
},
seviceCurrentUser(){
return this.$store.getters.seviceCurrentUser
},
messageRecord(){
return this.$store.getters.messageRecord
},
isLogin(){
return this.$store.getters.isLogin
}
},
watch: {
"$route"(){
if(!/^\/workbench(\/\d+)?$/i.test(this.$route.path)){
// 监听消息
this.$mimcInstance.addEventListener("receiveP2PMsg", (message) => {
var nowTime = parseInt((new Date().getTime() +"").substr(0, 10))
message.timestamp = parseInt((message.timestamp +"").substr(0, 10))
if(nowTime - message.timestamp >= 60) return
// 处理用户列表
if(message.biz_type == "contacts"){
var contacts = JSON.parse(message.payload)
// console.log(contacts)
this.$store.commit('onChangeContacts', contacts)
return
}
// 判断是否是握手消息
if(message.biz_type == "handshake"){
this.$mimcInstance.sendMessage("text", message.from_account, this.adminInfo.auto_reply)
return
}
var newMessageRecord = JSON.parse(JSON.stringify(this.messageRecord))
newMessageRecord.list.push(message)
this.$store.commit("onChangeMessageRecord", newMessageRecord)
// 推送消息
if(message.biz_type == "contacts" || message.biz_type == "pong" || message.biz_type == "welcome" || message.biz_type == "cancel" || message.biz_type == "handshake" || message.biz_type == "end" || message.biz_type == "timeout") return
if(!Push.Permission.has()) return
Push.create("收到一条新消息", {
body: message.payload,
icon: this.$store.state.pushIcon,
timeout: 5000,
onClick: () => {
this.$router.push({ path: '/workbench?uid=' + message.from_account})
window.focus();
}
});
})
}
},
isLogin(){
console.log("当前是登录状态")
this.appInit()
}
}
}
</script>
<style lang="stylus">
#app{
display flex
height 100vh
}
.el-tabs__content,.el-tab-pane{
height 100%
padding 0
}
.el-tabs__content{
padding 0 !important
}
button{
background-color #fff
}
.pswp{
z-index 3000!important
}
</style>
No preview for this file type
This diff could not be displayed because it is too large.

246 KB | W: | H:

246 KB | W: | H:

static/uploads/images/1024564602991303.png
static/uploads/images/1024564602991303.png
static/uploads/images/1024564602991303.png
static/uploads/images/1024564602991303.png
  • 2-up
  • Swipe
  • Onion skin

13.2 KB | W: | H:

13.2 KB | W: | H:

static/uploads/images/10595706961116000.jpg
static/uploads/images/10595706961116000.jpg
static/uploads/images/10595706961116000.jpg
static/uploads/images/10595706961116000.jpg
  • 2-up
  • Swipe
  • Onion skin

246 KB | W: | H:

246 KB | W: | H:

static/uploads/images/10739162322084292.png
static/uploads/images/10739162322084292.png
static/uploads/images/10739162322084292.png
static/uploads/images/10739162322084292.png
  • 2-up
  • Swipe
  • Onion skin

1.7 KB | W: | H:

1.7 KB | W: | H:

static/uploads/images/11162360010345286.png
static/uploads/images/11162360010345286.png
static/uploads/images/11162360010345286.png
static/uploads/images/11162360010345286.png
  • 2-up
  • Swipe
  • Onion skin

13.2 KB | W: | H:

13.2 KB | W: | H:

static/uploads/images/15465341792953788.jpg
static/uploads/images/15465341792953788.jpg
static/uploads/images/15465341792953788.jpg
static/uploads/images/15465341792953788.jpg
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/1895426542557186.png
static/uploads/images/1895426542557186.png
static/uploads/images/1895426542557186.png
static/uploads/images/1895426542557186.png
  • 2-up
  • Swipe
  • Onion skin

4.81 MB | W: | H:

4.81 MB | W: | H:

static/uploads/images/2020-03-07/sdfsdfs1df.jpg
static/uploads/images/2020-03-07/sdfsdfs1df.jpg
static/uploads/images/2020-03-07/sdfsdfs1df.jpg
static/uploads/images/2020-03-07/sdfsdfs1df.jpg
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/1059705541630756.png
static/uploads/images/2020-03-14/1059705541630756.png
static/uploads/images/2020-03-14/1059705541630756.png
static/uploads/images/2020-03-14/1059705541630756.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/10748561963710498.png
static/uploads/images/2020-03-14/10748561963710498.png
static/uploads/images/2020-03-14/10748561963710498.png
static/uploads/images/2020-03-14/10748561963710498.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/3868620975118566.png
static/uploads/images/2020-03-14/3868620975118566.png
static/uploads/images/2020-03-14/3868620975118566.png
static/uploads/images/2020-03-14/3868620975118566.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/5319691654085043.png
static/uploads/images/2020-03-14/5319691654085043.png
static/uploads/images/2020-03-14/5319691654085043.png
static/uploads/images/2020-03-14/5319691654085043.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/7805661278802885.png
static/uploads/images/2020-03-14/7805661278802885.png
static/uploads/images/2020-03-14/7805661278802885.png
static/uploads/images/2020-03-14/7805661278802885.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/8569570733363921.png
static/uploads/images/2020-03-14/8569570733363921.png
static/uploads/images/2020-03-14/8569570733363921.png
static/uploads/images/2020-03-14/8569570733363921.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/2020-03-14/9610469172281572.png
static/uploads/images/2020-03-14/9610469172281572.png
static/uploads/images/2020-03-14/9610469172281572.png
static/uploads/images/2020-03-14/9610469172281572.png
  • 2-up
  • Swipe
  • Onion skin

246 KB | W: | H:

246 KB | W: | H:

static/uploads/images/2550071827788813.png
static/uploads/images/2550071827788813.png
static/uploads/images/2550071827788813.png
static/uploads/images/2550071827788813.png
  • 2-up
  • Swipe
  • Onion skin

4.17 KB | W: | H:

4.17 KB | W: | H:

static/uploads/images/3001017273673196.png
static/uploads/images/3001017273673196.png
static/uploads/images/3001017273673196.png
static/uploads/images/3001017273673196.png
  • 2-up
  • Swipe
  • Onion skin

31.2 KB | W: | H:

31.2 KB | W: | H:

static/uploads/images/4191721475264322.jpeg
static/uploads/images/4191721475264322.jpeg
static/uploads/images/4191721475264322.jpeg
static/uploads/images/4191721475264322.jpeg
  • 2-up
  • Swipe
  • Onion skin

965 Bytes | W: | H:

965 Bytes | W: | H:

static/uploads/images/5516437697233784.png
static/uploads/images/5516437697233784.png
static/uploads/images/5516437697233784.png
static/uploads/images/5516437697233784.png
  • 2-up
  • Swipe
  • Onion skin

4.35 KB | W: | H:

4.35 KB | W: | H:

static/uploads/images/6359931358190748.png
static/uploads/images/6359931358190748.png
static/uploads/images/6359931358190748.png
static/uploads/images/6359931358190748.png
  • 2-up
  • Swipe
  • Onion skin

551 Bytes | W: | H:

551 Bytes | W: | H:

static/uploads/images/6417803415722617.png
static/uploads/images/6417803415722617.png
static/uploads/images/6417803415722617.png
static/uploads/images/6417803415722617.png
  • 2-up
  • Swipe
  • Onion skin

4.17 KB | W: | H:

4.17 KB | W: | H:

static/uploads/images/6800660106241034.png
static/uploads/images/6800660106241034.png
static/uploads/images/6800660106241034.png
static/uploads/images/6800660106241034.png
  • 2-up
  • Swipe
  • Onion skin

4.17 KB | W: | H:

4.17 KB | W: | H:

static/uploads/images/7485103156563738.png
static/uploads/images/7485103156563738.png
static/uploads/images/7485103156563738.png
static/uploads/images/7485103156563738.png
  • 2-up
  • Swipe
  • Onion skin

246 KB | W: | H:

246 KB | W: | H:

static/uploads/images/9050831048854968.png
static/uploads/images/9050831048854968.png
static/uploads/images/9050831048854968.png
static/uploads/images/9050831048854968.png
  • 2-up
  • Swipe
  • Onion skin

551 Bytes | W: | H:

551 Bytes | W: | H:

static/uploads/images/9111169004028260.png
static/uploads/images/9111169004028260.png
static/uploads/images/9111169004028260.png
static/uploads/images/9111169004028260.png
  • 2-up
  • Swipe
  • Onion skin

4 KB | W: | H:

4 KB | W: | H:

static/uploads/images/sdfsdfsdf.jpg
static/uploads/images/sdfsdfsdf.jpg
static/uploads/images/sdfsdfsdf.jpg
static/uploads/images/sdfsdfsdf.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment