Fork me on GitHub

构建mibew项目(开源人工客服系统)

项目环境

  • php版本为5,千万别用7

  • apache

  • mysql

具体安装可以参考我的博客
在linux下部署PHP项目

git地址

我在自己的git上配置过一个版本3的代码,可以借鉴。如果不喜欢请自己寻找其他版本的mibew

git下载地址

代码源码地址

1
git clone git@github.com:Hughendman/mibew.git

部署

修改apache文件

1
2
3
/usr/local/apache2/conf

vim httpd.conf

我将项目下载到了/var/www下面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<Directory />
AllowOverride none
Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www"
<Directory "/var/www">

修改数据库配置

1
2
3
cd /var/www/mibew/configs

vim config.yml
1
2
3
4
5
6
7
8
database:
host: "localhost"
port: 3306
db: "mibew"
login: "root"
pass: "abcd234"
tables_prefix: ""
use_persistent_connection: false

重启apache

1
/usr/local/apache/bin/apachectl restart

应用

访问:http://127.0.0.1/mibew/install.php

下载数据库

访问:http://127.0.0.1/mibew/index.php/operator/login

用户:admin 密码:admin

嵌入其他应用

进入:http://127.0.0.1/mibew/index.php/operator/button-code

可以获取嵌入代码。

例如:

1
<!-- mibew button --><a id="mibew-agent-button" href="/mibew/index.php/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups['5b7126f35626d57a'].open();return false;"><img src="/mibew/index.php/b?i=mibew&amp;lang=en" border="0" alt="" /></a><script type="text/javascript" src="/mibew/js/compiled/chat_popup.js"></script><script type="text/javascript">Mibew.ChatPopup.init({"id":"5b7126f35626d57a","url":"\/mibew\/index.php\/chat?locale=en","preferIFrame":true,"modSecurity":false,"forceSecure":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/mibew\/index.php\/chat\/style\/popup"});</script><!-- / mibew button -->

修改一下:

1
2

<!-- mibew button --><a id="mibew-agent-button" href="http://127.0.0.1/mibew/index.php/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups['5b7126f35626d57a'].open();return false;"><img src="http://127.0.0.1/mibew/index.php/b?i=mibew&amp;lang=en" border="0" alt="" /></a><script type="text/javascript" src="http://127.0.0.1/mibew/js/compiled/chat_popup.js"></script><script type="text/javascript">Mibew.ChatPopup.init({"id":"5b7126f35626d57a","url":"http://127.0.0.1\/mibew\/index.php\/chat?locale=en","preferIFrame":true,"modSecurity":false,"forceSecure":false,"width":640,"height":480,"resizable":true,"styleLoader":"http://127.0.0.1\/mibew\/index.php\/chat\/style\/popup"});</script><!-- / mibew button -->

这样就可以使用了。

进入 http://127.0.0.1/mibew/index.php/operator/users

可以操作了

一下为实例:

如果你嵌入代码成功,你会在你的代码中发现这样一个按钮

点击这个按钮,会在页面右侧弹出

下面介绍以下管理员页面:

显示 Gitment 评论