如何通过命令行调用或者HTTP调用拿到登录态,判断开发者工具是否登录成功?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:24 571 0 全屏看文

AI助手支持GPT4.0

如何通过命令行调用或者HTTP调用拿到登录态,判断开发者工具是否登录成功?

最近正在开发小程序,但是开发期间老是被测试同学求码的要求打断(微信小程序的开发码只有25分钟有效期,坑啊)。现在想的是弄一个东西可以让测试同学自己打码。

主要是借助小程序的命令行调用和HTTP调用,参考文档如下:

https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html

https://developers.weixin.qq.com/miniprogram/dev/devtools/http.html

在开发者工具没有开启的时候是没有端口号的,所以只能使用命令行调用来启动工具,输入 cli login命令后可以返回登录的二维码,开发者扫码以后怎么获取这个是否登录成功的登录态呢?

Recently, we are developing a small program, but during the development, I am always interrupted by the request of the testing students for code (the development code of wechat applet has a valid period of 25 minutes, pit ah). What I want now is to make something that can let the test students type their own code. It mainly uses the command line call and HTTP call of the applet. The reference documents are as follows: https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html https://developers.weixin.qq.com/miniprogram/dev/devtools/http.html There is no port number when the developer tool is not opened, so you can only use the command line call to start the tool and enter cli After the login command, the login QR code can be returned. How can developers get the login status of whether the login is successful after scanning the code?

回答:

小马:你好,并不是用户登录。是开发者是否登录开发者工具这个问题
子不语:这个,没必要判断吧?左上角就能看到了……
小马:我重新编辑了下问题内容,烦请大神过目
子不语:给他们体验版吧,那个没有时间限制,上传一下就行

请学会如何「提问」(👈戳我)

谋谋谋:

如题 已阅

-EOF-

AI助手支持GPT4.0