收藏
回答

小程序接口响应很慢,需要10s,是什么原因?

我在授权获取手机号的时候,小程序接口响应很慢,需要10秒以上,但是开发电脑本地和测试环境也正常,正式环境上的体验版就很慢,后端服务的服务器上curl小程序接口响应也是正常的,我还可以重哪些方面去排查呢?下面是我获取token和手机号的java代码请求

@Cleanup HttpResponse execute = HttpRequest.get(StrUtil.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}", appId, appSecret))
        .execute();
@Cleanup HttpResponse execute = HttpRequest.post("https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=" + getAccessToken())
        .body(parameter.toString()).execute();
回答关注问题邀请回答
收藏

1 个回答

  • Affection
    Affection
    08-30

    后端服务的服务器上curl小程序接口时间是多少?大概率这段时间出问题

    08-30
    有用
    回复
登录 后发表内容