Code Monkey home page Code Monkey logo

wechat_message's Introduction

wechat_message(公众号模板消息接口)

Introduction

  • 开发目的:用于弥补PHP群发模板消息的性能硬伤。
  • 利用golang能达到不可思议的速度。针对golang的数据结构传输符合微信接口的数据。

Installation

	go build main.go
	go run wechat_mesage

Run

	/**
	 * 接收数据
	 * api:"post:localhost:7767/getMessage"
	 */
	example:{
		openid:['111','fd2dw','gree'],		//openid数组,需提前切好
		ac_token : string,					//公众号access_token
		mess_type: int,						// 0:模板消息,1:文字消息,2:图文消息

		//模板消息
		template_id:string,					//模板id
		url:"http://www.baidu.com",			//可选,跳转url	
		appid:string,						//可选,小程序appid
		pagepath:string,					//可选,小程序page
		example:{
			first:{
				value:"你好",
				color:"#e6212a"
			},
			keyword1:{
				value:"你好",
				color:"#e6212a"				
			}
		}

		//文字消息
		content:string

		//图文消息
		title:"标题",
		description:"图文描述",
		picurl:"http://www.baidu.com",		//图文链接
		url:"http://www.baidu.com"			//可选,跳转链接
	}
	
	/**
	 * 返回数据
	 */
	return [
		'total', 							//发送总人数
		'suc', 								//成功人数
	];
	/**
	 * 停止任务
	 * api:"get:localhost:7767/stop"
	 */
	/**
	 * 查看任务PID
	 * api:"get:localhost:7767/pid"
	 */

wechat_message's People

Contributors

hogenyuan avatar 17fun 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.