{
  "project": {
    "name": "ZHCT ai_api restore login sample",
    "source_openapi": "/Users/jack/code/010-cpt/008-zhct/zhctprompt/work_ai_api/apifox_vwcg_960_mpwx_restore_openapi.json",
    "base_url": "https://aizhctdev.yyangpt.cn/index.php?s=",
    "openapi_title": "VWCG-960 微信小程序登录态恢复",
    "openapi_version": "1.0.0"
  },
  "metadata": {
    "request_count": 5,
    "filter_tag": null,
    "limit": 5,
    "use_examples": false,
    "warnings": []
  },
  "requests": [
    {
      "name": "微信小程序识别最近登录企业",
      "description": "清缓存或无本地登录态时调用。请求头不带 enterprise-no，走默认项目。后台通过 wx.login code 换取 openid，并查询默认库最近企业路由。若用户主动退出过，返回 enterpriseNo 为空并带 logoutDisabled=1。",
      "method": "POST",
      "path": "/api/passport/resolveMpWxEnterprise",
      "url": "https://aizhctdev.yyangpt.cn/index.php?s=api/passport/resolveMpWxEnterprise",
      "headers": "{\"content-type\": \"application/json;charset=utf-8\"}",
      "body": "\"\"",
      "order_index": 1,
      "is_enabled": true,
      "stop_on_failure": true,
      "extract_rules": [],
      "assertions": [
        {
          "assertion_type": "status_code",
          "comparison": "equals",
          "expected_value": "200",
          "is_critical": true
        }
      ],
      "source": {
        "operation_id": "",
        "tags": [
          "用户认证模块/微信小程序登录态恢复"
        ],
        "x_apifox_folder": "用户认证模块/微信小程序登录态恢复",
        "x_apifox_status": ""
      }
    },
    {
      "name": "微信小程序静默恢复登录态",
      "description": "新版本可传 openid + enterprise_no + user_id；后台会校验 openid 与 user_id 在当前企业库确实绑定后才发 token。旧版本不传 user_id 时继续按 openid 恢复。",
      "method": "POST",
      "path": "/api/passport/restoreMpWxLogin",
      "url": "https://aizhctdev.yyangpt.cn/index.php?s=api/passport/restoreMpWxLogin",
      "headers": "{\"content-type\": \"application/json;charset=utf-8\"}",
      "body": "\"\"",
      "order_index": 2,
      "is_enabled": true,
      "stop_on_failure": true,
      "extract_rules": [],
      "assertions": [
        {
          "assertion_type": "status_code",
          "comparison": "equals",
          "expected_value": "200",
          "is_critical": true
        }
      ],
      "source": {
        "operation_id": "",
        "tags": [
          "用户认证模块/微信小程序登录态恢复"
        ],
        "x_apifox_folder": "用户认证模块/微信小程序登录态恢复",
        "x_apifox_status": ""
      }
    },
    {
      "name": "微信小程序记录最近登录企业",
      "description": "正常登录成功后调用，默认库记录 appid + openid 最近登录的 enterprise_no + user_id；同一微信多账号时最新登录成功的用户覆盖旧记录。",
      "method": "POST",
      "path": "/api/passport/bindMpWxEnterpriseRoute",
      "url": "https://aizhctdev.yyangpt.cn/index.php?s=api/passport/bindMpWxEnterpriseRoute",
      "headers": "{\"content-type\": \"application/json;charset=utf-8\"}",
      "body": "\"\"",
      "order_index": 3,
      "is_enabled": true,
      "stop_on_failure": true,
      "extract_rules": [],
      "assertions": [
        {
          "assertion_type": "status_code",
          "comparison": "equals",
          "expected_value": "200",
          "is_critical": true
        }
      ],
      "source": {
        "operation_id": "",
        "tags": [
          "用户认证模块/微信小程序登录态恢复"
        ],
        "x_apifox_folder": "用户认证模块/微信小程序登录态恢复",
        "x_apifox_status": ""
      }
    },
    {
      "name": "微信小程序禁用最近登录企业恢复",
      "description": "退出登录可按 openid/code 禁用当前微信；修改密码后可只传 enterprise_no + user_id，禁用该企业该用户所有 openid 自动恢复。",
      "method": "POST",
      "path": "/api/passport/disableMpWxEnterpriseRoute",
      "url": "https://aizhctdev.yyangpt.cn/index.php?s=api/passport/disableMpWxEnterpriseRoute",
      "headers": "{\"content-type\": \"application/json;charset=utf-8\"}",
      "body": "\"\"",
      "order_index": 4,
      "is_enabled": true,
      "stop_on_failure": true,
      "extract_rules": [],
      "assertions": [
        {
          "assertion_type": "status_code",
          "comparison": "equals",
          "expected_value": "200",
          "is_critical": true
        }
      ],
      "source": {
        "operation_id": "",
        "tags": [
          "用户认证模块/微信小程序登录态恢复"
        ],
        "x_apifox_folder": "用户认证模块/微信小程序登录态恢复",
        "x_apifox_status": ""
      }
    },
    {
      "name": "退出登录",
      "description": "用户主动退出登录。请求头带 enterprise-no 时由 Nginx 转发到企业项目，企业库记录 user_oauth.silent_login_disabled=1；新版本会同时调用 disableMpWxEnterpriseRoute 禁用默认路由恢复。旧版本不传 openid 时仍按当前用户绑定关系处理。",
      "method": "POST",
      "path": "/api/passport/logout",
      "url": "https://aizhctdev.yyangpt.cn/index.php?s=api/passport/logout",
      "headers": "{\"content-type\": \"application/json;charset=utf-8\"}",
      "body": "\"\"",
      "order_index": 5,
      "is_enabled": true,
      "stop_on_failure": true,
      "extract_rules": [],
      "assertions": [
        {
          "assertion_type": "status_code",
          "comparison": "equals",
          "expected_value": "200",
          "is_critical": true
        }
      ],
      "source": {
        "operation_id": "",
        "tags": [
          "用户认证模块/微信小程序登录态恢复"
        ],
        "x_apifox_folder": "用户认证模块/微信小程序登录态恢复",
        "x_apifox_status": ""
      }
    }
  ]
}
