diff --git a/package.json b/package.json index 51ad219..dca2db5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "node ./bin/www" + "start": "node ./app.js" }, "dependencies": { "cookie-parser": "~1.4.4", diff --git a/routes.js b/routes.js index 38face5..e9893a5 100644 --- a/routes.js +++ b/routes.js @@ -8,7 +8,7 @@ router.get("/", (req, res, next) => { router.get("/verify", (req, res, next) => { // 验证消息来自微信服务器:https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html - const { signature, timestamp, nonce, echostr } = req.body; + const { signature, timestamp, nonce, echostr } = req.query; const token = process.env.TOKEN; let tmp_array = [token, timestamp, nonce].sort(); let tmp_string = tmp_array.join("");