支付宝小程序获取openId的时候报500错误

来源:13-2 支付宝小程序用户授权

dreamJack

2020-01-07

appId:2021001105610555
code:2a80d34373a6488c870ded9574e8ZB51

返回:

Error
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
   at Object.openSync (fs.js:443:3)
   at Object.readFileSync (fs.js:351:35)
   at app.get (/root/mpvue-ebook/mpvue-imooc-node/app.js:120:22)
   at Layer.handle [as handle_request] (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/layer.js:95:5)
   at next (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/route.js:137:13)
   at Route.dispatch (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/layer.js:95:5)
   at /root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/index.js:281:22
   at Function.process_params (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/index.js:335:12)
   at next (/root/mpvue-ebook/mpvue-imooc-node/node_modules/_express@4.17.1@express/lib/router/index.js:275:10)
写回答

1回答

小俊001

2020-01-07

同学您好,您的问题可能是没有获取到opedId的secret参数。详细您可以参与一下教程的官网文档

http://www.youbaobao.xyz/mpvue-docs/api/


0
2
dreamJack
微信获取openid是才要传secret参数
2020-01-07
共2条回复

零基础入门 实战mpvue2.0多端小程序框架

mpvue,一套代码搞定多个平台小程序,前端更易上手

819 学习 · 647 问题

查看课程