收藏
回答

docker服务调试云托管访问/wxa/getopendata 返回errCode:601007?

AppID
wxd1f6e7106b21bb83

在小程序本地开发调试时 前端代码:

// 微信手机登录

     // 调用云托管接口进行登录 ; e.detail 请求数据

         post( '/wechatMiniLogin', e.detail)

本地启动docker服务 后端代码 请求地址 http://api.weixin.qq.com/wxa/getopendata?openid=

// 构建 JSON 请求体
    String jsonBody = String.format("{\"cloudid_list\": [\"%s\"]}", cloudID);

// 构建 HttpRequest
    HttpRequest apiWxReq = HttpRequest.newBuilder()
            .uri(URI.create(WxCloudVisitApi.getGETOPENDATA(openid)))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonBody, StandardCharsets.UTF_8))
            .build();

    // 1. 创建 HttpClient(可复用)
    HttpClient client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(10))
            .build();


返回信息:

响应数据: {"errcode":0,"errmsg":"ok","data_list":[{"cloud_id":"102_lePfDXUUJ026mrxPNtnFc-37jU82XkgRfAcILgOpd3XifUWZwXVYDCbLegY","json":"{ \"cloudID\":\"102_lePfDXUUJ026mrxPNtnFc-37jU82XkgRfAcILgOpd3XifUWZwXVYDCbLegY\", \"errCode\":-601007, \"errMsg\":\"cloudID not belong to user.\" }"}]}


请问,本地启动docker服务调试调用 微信开发接口服务 获取手机号 是否可以呢

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    1天前
    有用
登录 后发表内容