Code Monkey home page Code Monkey logo

mega-wechat-client's Introduction

Mega-WeChat-Client

这是Mega-WeChat的Client Demo,主要的功能是发送模板消息任务,支持自定义模板内容,指定发送用户或群发所有用户。该项目是基于Yii实现,Client使用Swoole。

二话不说,先上效果图:

这里写图片描述

这里写图片描述 功能特性

  • 发送微信模板消息
  • 多任务发送支持
  • 自定义用户模板消息内容
  • 群发所有用户或指定用户
  • 实时进度监控,支持进度控制(开始,暂停)

介绍

###环境要求

  • php5.6+
  • Swoole1.8.2+
  • Mysql
  • Composer

###安装

第一步 安装PHP,需要5.6以上版本。由于服务端的队列用了SPL函数和PHP新特性的语法

第二步 安装Mysql,什么版本都可以。

yum install mysql

第三步 安装swoole扩展前必须保证系统已经安装了下列软件

php-5.3.10 或更高版本 gcc-4.4 或更高版本 make autoconf

下载地址 https://github.com/swoole/swoole-src/releases http://pecl.php.net/package/swoole http://git.oschina.net/matyhtf/swoole

第四步 初始化Yii并安装composer依赖,进入到项目根目录。

cd Mega-WeChat-Client php composer.phar global require "fxp/composer-asset-plugin:~1.1.1 php composer.phar install ./init

需要导入数据库表,表结构在mega-db.sql

第五步 安装Mega-WeChat服务端 详细教程在github:https://github.com/imRainChen/Mega-Wechat

###配置 该项目基于Yii框架,配置的方式与Yii相同。

  • 设置数据库组件配置信息
vi config/db.php

[
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=127.0.0.1;dbname=mega',
    'username' => 'root',
    'password' => 'root',
    'charset' => 'utf8mb4',
    'tablePrefix'   => 'mega_',
];
  • 设置Mega-Wechat配置信息
vi config/params.php

'mega'  =>  [
    'host' => '127.0.0.1',
    'port' => '9501',
    'mysql'    =>  [
        'dsn' => 'mysql:host=127.0.0.1;dbname=mega',
        'username' => 'root',
        'password' => 'root',
        'charset' => 'utf8',
        'tablePrefix'   => 'mega_',
    ],
]

###注意事项

  1. 如若出现任务执行失败,请检查Mega-WeChat服务是否启动。
  2. 检查runtime目录存放日志的权限,必须要有读写权限。
  3. 若还有什么问题请咨询我

贡献

如果有什么建议欢迎联系,也可发布问题和反馈。

Email:[email protected]

mega-wechat-client's People

Contributors

imrainchen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.