???? 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 ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

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

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

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

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

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

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

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

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

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