This action will force synchronization from mochat/mochat-java, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
MoChat, easy way to WeWork
MoChat 是开源的企业微信应用开发框架&引擎,是一套通用的企业微信管理系统,得益于 Hyperf
框架的优秀,MoChat 可提供超高性能的同时,也保持着极其灵活的可扩展性。
可用于电商、金融、零售、餐饮服装等服务行业的企业微信用户,通过简单的分流、引流转化微信客户为企业客户,结合强大的后台支持,灵活的运营模式,建立企业与客户的强联系,让企业的盈利模式有了多种不同的选择。
六大模块助力企业营销能力升级:
严格的分层来保证架构的灵活性
Vue
、Vuex
、Vant
、Ant Design of Vue
Java
、MySQL
、Redis
、Spring Boot
、MyBatis-Plus
、Spring Security
、Jwt
Java >= 1.8 (推荐1.8版本)
MySQL >= 5.7
Redis >= 3.0
Node.js >= 10
后端运行
mochat
并导入数据脚本 api-server/install/mochat.sql
com.mochat.mochat.MoChatApplication.java
假设你的安装目录为 /data/www/
# 进入项目目录
cd /data/www/
# 克隆项目文件
git clone https://github.com/mochat-cloud/mochat-java。git
# 更新子模块文件
git submodule update --init --recursive
cd /data/www/mochat-java/api-server
修改 MySQL 数据库连接
resources
目录下的 application.yml
查看spring配置中的active属性,然后根据属性值找到application-dev.xml或者是application-prod.xml(默认是dev环境)url
: 服务器地址username
: 账号password
: 密码修改 Redis 相关配置
开发环境配置
编辑 resources
目录下的 application.yml
port
: 端口
然后会在项目下生成 target
文件夹包含 war
或 jar
jar
部署方式:使用命令行执行 java –jar mochat.jar
war
部署方式:pom.xml packaging
修改为 war
放入 tomcat
服务器 webapps
直接启动bin目录下的./startup.sh(linux环境下)
Nginx 配置:具体参考开发文档
初始管理员账号为 18888888888 密码123456
# 进入项目目录
cd /path/to/mochat/dashboard
# 安装依赖
yarn install
# 修改 .env 中的配置
VUE_APP_API_BASE_URL= 接口地址
# 编译直接查看
yarn run dev
# 编译生成dist
yarn run build
当项目开发完毕,只需要运行一行命令就可以打包你的应用
# dashboard 打包正式环境
yarn run build
# sidebar 打包正式环境
yarn run build
构建打包成功之后,会在根目录生成 dist
文件夹,里面就是构建打包好的文件,通常是 .js
、.css
、index.html
等静态文件。
通常情况下 dist
文件夹的静态文件发布到你的 nginx
或者静态服务器即可,其中的 index.html
是后台服务的入口页面。
.
├── api-server------------------------------------------ 后端接口代码
├── dashboard------------------------------------------- 管理后台前端代码
├── sidebar--------------------------------------------- 聊天侧边栏前端代码
└── workbench------------------------------------------- 工作台前端代码
.
├── com.mochat.mochat
│ ├── controller------------------------------------------- 控制器
│ ├── config----------------------------------------------- 应用配置
│ ├── dao-------------------------------------------------- 数据层
│ ├── common----------------------------------------------- 公共类
│ ├── interceptor------------------------------------------ 拦截器
│ ├── job-------------------------------------------------- 定时任务
│ ├── model------------------------------------------------ 模型层
│ ├── service----------------------------------- ---------- 逻辑层
│ ├── weixin.mp-------------------------------------------- 微信相关配置
│ ├── Service---------------------------------------------- 服务层
├── resourse
├── docker-compose.yml
├── docker-entrypoint.sh
├── Dockerfile
├── pom.xml
dashboard 和 sidebar 项目结构类似
.
├── README.md------------------------------------------- 项目说明
├── babel.config.js------------------------------------- babel配置文件
├── config
│ ├── plugin.config.js-------------------------------- 插件配置文件
│ └── themePluginConfig.js---------------------------- 主题配置文件
├── jest.config.js
├── jsconfig.json
├── package.json
├── postcss.config.js
├── public
│ ├── favicon.ico------------------------------------- 浏览器icon
│ └── index.html-------------------------------------- Vue 入口模板
├── src
│ ├── App.vue----------------------------------------- Vue 模板入口
│ ├── api--------------------------------------------- Api ajax 等
│ ├── assets------------------------------------------ 本地静态资源
│ ├── components-------------------------------------- 业务通用组件
│ ├── core-------------------------------------------- 项目引导, 全局配置初始化,依赖包引入等
│ ├── global.less------------------------------------- 全局样式
│ ├── layouts----------------------------------------- 控制器
│ ├── main.js----------------------------------------- Vue 入口 JS
│ ├── router------------------------------------------ Vue-Router
│ ├── store------------------------------------------- Vuex
│ ├── utils------------------------------------------- 工具库
│ └── views------------------------------------------- 业务页面入口和常用模板
├── vue.config.js--------------------------------------- Vue主配置
└── webstorm.config.js---------------------------------- ide配置文件
MoChat 开源版遵循 GPL-3.0
开源协议发布,并提供免费研究使用,但绝不允许修改后和衍生的代码做为闭源的商业软件发布和销售!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。