亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

? ?? ??? ?? ?? koa2? ???? WeChat ?3? ?? ???? ???? ??

koa2? ???? WeChat ?3? ?? ???? ???? ??

May 29, 2018 am 11:22 AM
koa2 ?? ?3?

???? koa2? ???? WeChat?? ?? ?? ???? ???? ??? ?? ??????. koa2? ???? WeChat?? ?? ?? ???? ??? ?? ?? ??? ?????? ????.

?? ?? ?? ?? Koa? ?? ????? ????. Express? ?? Koa? ?? ???? ? ?? ?? ???? ?? ?????. ?? ??? ???? ??? ??? ??? ???? ????. ????? ???? ??? ????? Koa? ? ??????? ???? ??? ???? ???? ?? ??? ????? ???? ??? ?? ? ?? ?? ?? ???? ?? ?????. koa? ?? ???? ?? ????? ????? ??? ??? ??? ?? ?????? ????? ? ?????? ??? ????. nodejs? ????? ??? ?? ????? WeChat ?? ??? ?? ??? ????? ?? ?????. pm2? ?? ???? ??? ??? ?? ??? ??? ??? ??? ?? ?? ??? ?? ??? ?? ?? ?? ?? ???? ?? ?????? ?? ? ????.

koa2? ???? WeChat ?3? ?? ???? ??? ? ?? ?? ???? ? ?? WeChat?? ??? XML ???? ?? ??? ?? XML ??? WeChat? ???? ?????.
koa ??? ?????? ??? ??? ???? ?? ?? ???? ??? express? ??? ?????? ??????. ??? ??? ? git ??? ?????: https://github .com /yxz1025/koa-lana, ?? WeChat ???? ? ?????? ????. ?? ???????!

???, ?? WeChat?? ??? xml ???? ?? ??? ???????.

======tool.js=====
//截獲微信返回的xml流文件
const?Promise?=?require('bluebird');
//普通post流轉(zhuǎn)化為promise
var?Tool?=?{
??convertPost:?function(req)?{
????let?post_data?=?"";
????return?new?Promise(function(resolve,?reject){
??????req.on('data',?function(chunk)?{
????????post_data?+=?chunk;
??????});
??????req.on('end',?function()?{
????????resolve(post_data);
??????});
????});
??},
};
module.exports?=?Tool;
=====weichat.js======
//微信響應(yīng)主體文件
const?router?=?require('koa-router')();
const?parseMessage?=?require('../common/parseMessage');
const?config?=?require('../config');
const?WXBizMsgCrypt?=?require('wechat-crypto');
const?middleware?=?require('../model/middleware');
const?validator?=?require('validator');
const?Aes?=?require('../common/aes');
const?Tool?=?require('../common/tool');
const?cryptor?=?new?WXBizMsgCrypt(config.component_config.token,?config.component_config.key,?config.component_config.component_appid);
//第三方授權(quán)路徑?/:appid/callback??/wechat/100234/callback
router.post('/:appid/callback',?async?function(ctx,?next)?{
??let?post_data?=?"";
??let?req?=?ctx.req;
??post_data?=?await?Tool.convertPost(req);
??let?xml?=?parseMessage(post_data);
??let?signature?=?cryptor.getSignature(ctx.query.timestamp,?ctx.query.nonce,?xml.encrypt);
??if?(ctx.query.msg_signature?!=?signature)?{
????ctx.body?=?'Auth?failed!';?//?指紋碼不匹配時(shí)返回錯(cuò)誤信息,禁止后面的消息接受及發(fā)送
??}
??let?message?=?middleware.decryptXml(xml);
??let?appid?=?ctx.params.appid;
??message.appId?=?appid;
??//發(fā)送消息隊(duì)列
??switch?(message.msgType)?{
????case?'text':
??????//測(cè)試
??????if?(message.toUserName?==?"gh_3c884a361561")?{
????????if?(message.content?==?"TESTCOMPONENT_MSG_TYPE_TEXT")?{
??????????let?text?=?middleware.text(message,?message.content?+?"_callback");
??????????let?reply?=?middleware.encryptXml(text);
??????????return?ctx.body?=?reply;
????????}
????????let?content?=?message.content;
????????if?(content.indexOf("QUERY_AUTH_CODE")?!=?-1)?{
??????????ctx.body?=?"";
??????????let?code_li?=?content.split(":");
??????????await?middleware.customSend(message.fromUserName,?code_li[1]);
??????????return;
????????}
??????}
??????let?keywords?=?validator.trim(message.content).toLowerCase();
??????let?member_config?=?await?middleware.getMemberConfig(message.toUserName,?keywords);
??????if?(!member_config)?{
????????await?middleware.sendMnsQuene(message);
????????return?ctx.body?=?"success";
??????}else{
?????????//匹配成功
????????message.packetsId?=?parseInt(member_config.hongbaoId);
????????message.keywords?=?keywords;
????????await?middleware.sendMnsQuene(message);
????????let?data?=?{
??????????title:?member_config.news_title?||?'點(diǎn)我領(lǐng)紅包',
??????????description:?member_config.description?||?'第一輪紅包雨開始了,手快有,手慢無(wú)!',
??????????picurl:?member_config.picurl?||?'http://7xqomp.com2.z0.glb.qiniucdn.com/17269743.png'
????????};
????????let?key?=?{
??????????fromUserName:?message.fromUserName,
??????????toUserName:?message.toUserName,
??????????keywords:?keywords,
??????????appId:?appid
????????};
????????key?=?JSON.stringify(key);
????????key?=?Aes.encypt(key);
????????key?=?Aes.base64_encode(key);
????????//獲取授權(quán)域名
????????let?auth_url?=?await?middleware.packetDomain();
????????data.url?=?"http://"?+?appid?+?"."?+?auth_url?+?"/redPackets/koulin?key="?+?key;
????????let?news?=?middleware.news(message,?[data]);
????????let?reply?=?middleware.encryptXml(news);
????????ctx.body?=?reply;?
????????return;???????
??????}
??????break;
????case?'event':
??????await?middleware.sendMnsQuene(message);
??????//測(cè)試專用
??????if?(message.toUserName?==?"gh_3c884a361561")?{
????????let?text?=?middleware.text(message,?message.event?+?"from_callback");
????????let?reply?=?middleware.encryptXml(text);
????????ctx.body?=?reply;
????????return;
??????}
??????break;
????default:
??????await?middleware.sendMnsQuene(message);
??????ctx.body?=?"success";
??????return;
??};
});
module.exports?=?router;

? ??? ??? ?? ? ??? ?????? ?????. ? ???? ??? ??? ?? ?? ??? ?????. PHP ??? ????? ??!

?? ??:

Koa2 WeChat ?? ?? ?? ?? ??? ?? ?? ? ??? ?? ??

Koa2 WeChat ?? ?? ?? ???? ??? ?? ??

? ??? koa2? ???? WeChat ?3? ?? ???? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1597
29
PHP ????
1487
72
NYT ?? ??? ??
129
836
???
Vue ??????? ?? ?? ???? ??? ???? ?? Vue ??????? ?? ?? ???? ??? ???? ?? Aug 21, 2023 pm 05:48 PM

Vue ??????? ?? ?? ???? ??? ???? ?? ?? ? ???????? ?? ??? ?? ?? ?????. ?? ???? ????? ?????? Vue.js? ?? ?? ???? ???? ???? ? ??? ?? ?? ??? ??? ?? ??? ?????. ? ????? Vue ?????? ?? ????? ???? ??? ?? ?? ???? ???? ??? ?????. ?? Vue ???? ? ?? ?? ???? ??? ???? Vue.js ?? ??? ???? ???. ????? ?? ??? ?????.

Mistlock Kingdom? ????? ??? ?? ? ???? Mistlock Kingdom? ????? ??? ?? ? ???? Mar 07, 2024 pm 08:28 PM

????? Mistlock ???? ???? ? ??? ?? ?? ??? ??? ??? ? ????. ?? ????? ???? ??? ?? ? ??? ?? ?????. Mistlock ????? ??? ?? ?? ?? ??? ???. . Mistlock Kingdom??? ??? ??? ?? ? ???? ??: ???. 1. ???? ??? ?? ???? ??? ?? ? ????. 2. ??? ??? ?? ??? ????? ??. 3. ???? ??? Spirit Fire Altar? ??? ? ???, ??? ???? ??? ?? ? ????. 4. ?? ?? ??? ?? ??? ?? ?? ?? ????? ??? ??? ????. 5. ????? ?? ?? ???? ??? ????? ????. ?, ????? ???? ???? ?????. 6. ?? ???? ?????? ??? ?? ?? ???? ?????.

PyCharm ?? ???: ? ?? ???? ?? ????? ???? PyCharm ?? ???: ? ?? ???? ?? ????? ???? Feb 21, 2024 am 10:33 AM

PyCharm? ????? ?? ???? ?? ?? ????, Python ??? ?? ????? ???? ????? ??? ??? ??? ?????. ????? ????? ?? ?????? ???? ?? PyCharm? ?? ???? ????, ???? ??? ?? ?????? ???? ???? ?? ???? ????? ? ??? ???. ? ????? PyCharm? ??? ?? ????? ???? ?? ???? ???? ???? ?? ??? ?????. 1. ?? PyCharm? ?? PyCharm? ?? ??? ?????.

PyCharm? PyTorch? ??? ????: ?? ??? PyCharm? PyTorch? ??? ????: ?? ??? Feb 24, 2024 pm 09:54 PM

PyTorch ?? ???: PyCharm?? ?? ??? ??? ??????. PyTorch? ?? ? ?? ???? ?? ?? ???? ????? ? ???? ?? ???? ???? ???? ????? ?????. ? ???? ? ?? ???? ??? ??? ? ??? PyCharm?? PyTorch ?? ??? ??? ???? ??? ?????. 1??: PyTorch ?? ?? PyTorch? ???? ???. PyTorch ??? ????? ??? ??? ???? ???.

CentOS 7?? ? ??? ???? ?? ?? ?? ? ?? ?? CentOS 7?? ? ??? ???? ?? ?? ?? ? ?? ?? Aug 25, 2023 pm 11:33 PM

CentOS7?? ? ?? ??? ?? ?? ?? ? ?? ?? ??: ??? ??? ??? ? ??? ? ??? ?? ? ???? ?? ?? ?? ?? ? ?????. CentOS7? ?? ???? ?? ???? ??? Linux ??????. ? ????? CentOS7?? ? ??? ???? ?? ?? ??? ?? ??? ???? ??? ?? ?? ? ?? ?? ??? ?????. 1. Apache HTTP ?? ?? Apache? ?? ?? ???? ?????.

Douyin ??? ???? ?? ?? ??? ?????? 5?? ??? ?? ?? ??? ?????? Douyin ??? ???? ?? ?? ??? ?????? 5?? ??? ?? ?? ??? ?????? Apr 02, 2024 am 09:52 AM

??? ???? ??? ???? ?? ?? ??? ??????? Douyin? ???? ????? ???? ? ? ??? ?????. ?? ?? Douyin ??? ???? ??? ??? ? ? ?? ?? ??? ??? ??? ??? ? ????. ???? ??? Douyin ??? ???? ??? ?????? 1. Douyin ??? ???? ?? ?? ??? ?????? 1. ??? ???? Douyin ??? ?? ? ?? ????? ??? ?? ???. ???? ??? ?? ???, ??? ?? ?? ???? ?? ???? ??? ????? ??? ?? ???? ?? ??? ??? ? ??? ???. 2. ?? ??: ?? ?? ??? ??? ??? ??? ??? ? ?? ????. ?? ??? ??? ????? ???? ???? ???? ?? ?? ?? ???? ??? ???. ?? ??? ??? ??? ?? ?? ?? ??? ???? ????.

?? ????? ?? ???? ?? ?? ?? ?? ????? ?? ???? ?? ?? ?? Dec 23, 2023 pm 06:25 PM

?? ????? ?? ???? ?? ????? ?? ?? ???? ?? ??? ???? ?????. ?? ?? ????? ???? ??? ??? ??? ? ????. ????? ??? ???????. ?? ????? ?? ????? ??? ? ???? ??: ?. ??? ??? Edge??? ????? ?? ????? ??? ??? ? ????. crx ?? ??? ??? ???? ????? Edge? ????? ??? ??? ????? ?? ??? ? ????. 1. ??? Edge Extension ?? ???? ??? ??? ? zip ???? ??? ???? ??? ???. 2. ? ??? Edge? ??? ??? ?? ???? ??? ??? ?? ? ?? ?? ???? ? ? ????. 3. ?? ????? "??? ??"? ???.

CentOS?? ? ??? ???? ?? ??? ???? ??????. CentOS?? ? ??? ???? ?? ??? ???? ??????. Aug 07, 2023 pm 03:25 PM

CentOS?? ? ??? ???? ?? ??? ???? ?????. ?? ? ??? HTTP ????? ???? ??????? ? ??? ? ? ???? ???? ? ?????. Apache ? Nginx? ?? ???? ?????? ???? CentOS? ? ??? ??? ? ????. ? ????? Apache? ?? ?? CentOS?? ? ??? ???? ??? ??? ?????. Apache ?? ?? ???? ?? ?? ??? ???? Apache? ?????. sudoyuminst

See all articles