微信开放平台 · 网站应用扫码登录

一套微信扫码登录
全部站点共用

微信「授权回调域」只能绑定一个域名?把 OAuth 交给统一登录网关, 任意数量的业务域名都能复用同一套扫码登录与 unionid 用户体系。

  • ✓零配置部署
  • ✓一次性 ticket
  • ✓完整授权日志
https://login.fps5.cn/oauth/authorize
微信扫码登录请使用微信扫一扫
等待扫码…
1业务站点发起登录
2校验项目与回调域
3微信扫码授权
4ticket 换取用户资料
unionid 统一用户
ticket 300s · 一次性
1 已接入项目
2 累计授权次数
0 今日授权
2 独立微信用户
FEATURES

为多域名业务而生

不用再为每个站点单独申请微信网站应用,也不用反复调整回调域。

一个回调域,多站共用

把微信授权回调域固定为网关域名,任意业务域名通过 client_id 接入,新增站点无需再改微信后台配置。

unionid 统一用户

同一开放平台下,所有站点拿到一致的 unionid,用户在一处登录即可识别为同一个人。

一次性安全票据

业务回调只拿到短效 ticket(默认 300 秒、仅可使用一次),用户资料由业务后端凭密钥换取,不暴露在浏览器。

5 分钟完成接入

业务站只需两步:跳转网关发起授权、回调后用 ticket 调一个接口。官方示例覆盖 PHP / Node / Java。

完整授权日志

每次扫码记录项目、openid / unionid、昵称、IP 与时间,排查问题、核对用户来源都有据可查。

零配置部署

上传即用:SQLite 自动建表,首次访问初始化管理员,无需安装数据库或额外扩展。

HOW IT WORKS

四步完成一次登录

浏览器与后端各司其职,密钥只在服务端流转。

01

业务站点发起

生成 state 并 302 到网关 /oauth/authorize,携带 client_id 与回调地址。

02

网关校验并跳转微信

校验项目状态与回调域名白名单,随后跳转微信官方扫码页。

03

微信回调网关

网关用 code 换取用户资料、记录日志,并生成一次性 ticket。

04

业务后端换取用户

浏览器带 ticket 回到业务站,后端凭 client_secret 调 /api/user/info。

QUICK START

业务站只需两个动作

第一步把用户送到网关,第二步在回调里用 ticket 换资料。所有语言的处理方式完全一致。

  1. 跳转授权GET http://127.0.0.1:8000/oauth/authorize?client_id=…&redirect_url=…&state=…
  2. 换取用户POST http://127.0.0.1:8000/api/user/info,参数 client_id / client_secret / code
  3. 建立会话拿到 openid / unionid 后写入自己的登录态
查看完整接入步骤 →
callback.php
// 微信授权回调:用 ticket 换取用户资料
$resp = file_get_contents(
    'https://login.fps5.cn/api/user/info',
    false,
    stream_context_create(['http' => [
        'method'  => 'POST',
        'header'  => 'Content-Type: application/x-www-form-urlencoded',
        'content' => http_build_query([
            'client_id'     => $clientId,
            'client_secret' => $clientSecret,
            'code'          => $_GET['code'],
        ]),
    ]])
);

$json = json_decode($resp, true);
if ($json['code'] === 200) {
    // $json['data']['openid'] / unionid / nickname / avatar
}

把微信扫码登录,变成一次配置

登录后台创建项目,拿到 client_id / client_secret 即可开始。

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-10-17 14:46:58 HTTP/2.0 GET : https://login.fps5.cn/
  2. 运行时间 : 0.016118s [ 吞吐率:62.04req/s ] 内存消耗:255.18kb 文件加载:146
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=e96cd116ccd484db949e4569d2de6b0a
  1. /www/wwwroot/login.fps5.cn/public/index.php ( 0.79 KB )
  2. /www/wwwroot/login.fps5.cn/vendor/autoload.php ( 0.73 KB )
  3. /www/wwwroot/login.fps5.cn/vendor/composer/autoload_real.php ( 1.63 KB )
  4. /www/wwwroot/login.fps5.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /www/wwwroot/login.fps5.cn/vendor/composer/ClassLoader.php ( 15.99 KB )
  6. /www/wwwroot/login.fps5.cn/vendor/composer/autoload_static.php ( 4.73 KB )
  7. /www/wwwroot/login.fps5.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /www/wwwroot/login.fps5.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /www/wwwroot/login.fps5.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /www/wwwroot/login.fps5.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /www/wwwroot/login.fps5.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 0.35 KB )
  15. /www/wwwroot/login.fps5.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.81 KB )
  16. /www/wwwroot/login.fps5.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.60 KB )
  17. /www/wwwroot/login.fps5.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /www/wwwroot/login.fps5.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.23 KB )
  19. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /www/wwwroot/login.fps5.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /www/wwwroot/login.fps5.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /www/wwwroot/login.fps5.cn/app/provider.php ( 0.19 KB )
  23. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Http.php ( 6.22 KB )
  24. /www/wwwroot/login.fps5.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /www/wwwroot/login.fps5.cn/app/common.php ( 4.77 KB )
  27. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/helper.php ( 18.77 KB )
  28. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Config.php ( 5.93 KB )
  29. /www/wwwroot/login.fps5.cn/config/app.php ( 0.95 KB )
  30. /www/wwwroot/login.fps5.cn/config/cache.php ( 0.78 KB )
  31. /www/wwwroot/login.fps5.cn/config/console.php ( 0.23 KB )
  32. /www/wwwroot/login.fps5.cn/config/cookie.php ( 0.56 KB )
  33. /www/wwwroot/login.fps5.cn/config/database.php ( 1.93 KB )
  34. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /www/wwwroot/login.fps5.cn/config/filesystem.php ( 0.61 KB )
  36. /www/wwwroot/login.fps5.cn/config/gateway.php ( 1.96 KB )
  37. /www/wwwroot/login.fps5.cn/config/lang.php ( 0.91 KB )
  38. /www/wwwroot/login.fps5.cn/config/log.php ( 1.35 KB )
  39. /www/wwwroot/login.fps5.cn/config/middleware.php ( 0.19 KB )
  40. /www/wwwroot/login.fps5.cn/config/route.php ( 1.88 KB )
  41. /www/wwwroot/login.fps5.cn/config/session.php ( 0.57 KB )
  42. /www/wwwroot/login.fps5.cn/config/trace.php ( 0.34 KB )
  43. /www/wwwroot/login.fps5.cn/config/view.php ( 0.82 KB )
  44. /www/wwwroot/login.fps5.cn/app/event.php ( 0.25 KB )
  45. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Event.php ( 7.77 KB )
  46. /www/wwwroot/login.fps5.cn/app/service.php ( 0.13 KB )
  47. /www/wwwroot/login.fps5.cn/app/AppService.php ( 5.11 KB )
  48. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  49. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  50. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  51. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  52. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  53. /www/wwwroot/login.fps5.cn/vendor/services.php ( 0.15 KB )
  54. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  55. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  56. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  57. /www/wwwroot/login.fps5.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  58. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  59. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  60. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  61. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  62. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  63. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  64. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  65. /www/wwwroot/login.fps5.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  66. /www/wwwroot/login.fps5.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  67. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  68. /www/wwwroot/login.fps5.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  69. /www/wwwroot/login.fps5.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 17.45 KB )
  70. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  71. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.02 KB )
  72. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  73. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/connector/Sqlite.php ( 3.02 KB )
  74. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 53.74 KB )
  75. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  76. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  77. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/builder/Sqlite.php ( 2.97 KB )
  78. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.07 KB )
  79. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  80. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 6.10 KB )
  81. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  82. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  83. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  84. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  85. /www/wwwroot/login.fps5.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  86. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  87. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  88. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.20 KB )
  89. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.75 KB )
  90. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  91. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  92. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.30 KB )
  93. /www/wwwroot/login.fps5.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  94. /www/wwwroot/login.fps5.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  95. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  96. /www/wwwroot/login.fps5.cn/app/Request.php ( 0.09 KB )
  97. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Request.php ( 54.64 KB )
  98. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/traits/UrlHandler.php ( 6.05 KB )
  99. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/traits/DomainHandler.php ( 5.49 KB )
  100. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/traits/HttpMethodHandler.php ( 4.74 KB )
  101. /www/wwwroot/login.fps5.cn/app/middleware.php ( 0.16 KB )
  102. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  103. /www/wwwroot/login.fps5.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  104. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  105. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  106. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  107. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  108. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  109. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  110. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.74 KB )
  111. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  112. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.41 KB )
  113. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/Rule.php ( 27.49 KB )
  114. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  115. /www/wwwroot/login.fps5.cn/route/app.php ( 1.67 KB )
  116. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  117. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  118. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 11.32 KB )
  119. /www/wwwroot/login.fps5.cn/app/controller/Home.php ( 1.08 KB )
  120. /www/wwwroot/login.fps5.cn/app/BaseController.php ( 2.05 KB )
  121. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  122. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/facade/Session.php ( 1.79 KB )
  123. /www/wwwroot/login.fps5.cn/app/service/GatewayService.php ( 4.44 KB )
  124. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.97 KB )
  125. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  126. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  127. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  128. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  129. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  130. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  131. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  132. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  133. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  134. /www/wwwroot/login.fps5.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  135. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/facade/Config.php ( 1.37 KB )
  136. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  137. /www/wwwroot/login.fps5.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  138. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  139. /www/wwwroot/login.fps5.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  140. /www/wwwroot/login.fps5.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  141. /www/wwwroot/login.fps5.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  142. /www/wwwroot/login.fps5.cn/runtime/temp/6881c70242429dbe0318648c7353c73f.php ( 22.71 KB )
  143. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Response.php ( 9.07 KB )
  144. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/response/Html.php ( 0.97 KB )
  145. /www/wwwroot/login.fps5.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  146. /www/wwwroot/login.fps5.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000153s ] sqlite:/www/wwwroot/login.fps5.cn/database/weblogin.db
  2. CREATE TABLE IF NOT EXISTS projects ( id INTEGER PRIMARY KEY AUTOINCREMENT, project_name TEXT NOT NULL DEFAULT '', client_id TEXT NOT NULL DEFAULT '', client_secret TEXT NOT NULL DEFAULT '', domain TEXT NOT NULL DEFAULT '', redirect_url TEXT NOT NULL DEFAULT '', status INTEGER NOT NULL DEFAULT 1, create_time TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000242s ]
  3. CREATE TABLE IF NOT EXISTS admin ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL DEFAULT '', password TEXT NOT NULL DEFAULT '', create_time TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000026s ]
  4. CREATE TABLE IF NOT EXISTS oauth_logs ( id INTEGER PRIMARY KEY AUTOINCREMENT, project_id INTEGER NOT NULL DEFAULT 0, openid TEXT NOT NULL DEFAULT '', unionid TEXT NOT NULL DEFAULT '', nickname TEXT NOT NULL DEFAULT '', avatar TEXT NOT NULL DEFAULT '', code TEXT NOT NULL DEFAULT '', access_token TEXT NOT NULL DEFAULT '', raw_data TEXT NOT NULL DEFAULT '', ip TEXT NOT NULL DEFAULT '', create_time TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000018s ]
  5. CREATE TABLE IF NOT EXISTS tickets ( id INTEGER PRIMARY KEY AUTOINCREMENT, ticket TEXT NOT NULL DEFAULT '', project_id INTEGER NOT NULL DEFAULT 0, openid TEXT NOT NULL DEFAULT '', unionid TEXT NOT NULL DEFAULT '', nickname TEXT NOT NULL DEFAULT '', avatar TEXT NOT NULL DEFAULT '', sex INTEGER NOT NULL DEFAULT 0, country TEXT NOT NULL DEFAULT '', province TEXT NOT NULL DEFAULT '', city TEXT NOT NULL DEFAULT '', raw_user TEXT NOT NULL DEFAULT '', used INTEGER NOT NULL DEFAULT 0, expire_time INTEGER NOT NULL DEFAULT 0, create_time TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000017s ]
  6. CREATE TABLE IF NOT EXISTS settings ( name TEXT PRIMARY KEY, value TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000011s ]
  7. CREATE TABLE IF NOT EXISTS gw_users ( id INTEGER PRIMARY KEY AUTOINCREMENT, openid TEXT NOT NULL DEFAULT '', unionid TEXT NOT NULL DEFAULT '', nickname TEXT NOT NULL DEFAULT '', avatar TEXT NOT NULL DEFAULT '', sex INTEGER NOT NULL DEFAULT 0, country TEXT NOT NULL DEFAULT '', province TEXT NOT NULL DEFAULT '', city TEXT NOT NULL DEFAULT '', status INTEGER NOT NULL DEFAULT 1, login_count INTEGER NOT NULL DEFAULT 0, create_time TEXT NOT NULL DEFAULT '', last_login_time TEXT NOT NULL DEFAULT '' ) [ RunTime:0.000016s ]
  8. CREATE UNIQUE INDEX IF NOT EXISTS idx_projects_client_id ON projects(client_id) [ RunTime:0.000013s ]
  9. CREATE UNIQUE INDEX IF NOT EXISTS idx_admin_username ON admin(username) [ RunTime:0.000011s ]
  10. CREATE UNIQUE INDEX IF NOT EXISTS idx_tickets_ticket ON tickets(ticket) [ RunTime:0.000017s ]
  11. CREATE INDEX IF NOT EXISTS idx_logs_project ON oauth_logs(project_id) [ RunTime:0.000012s ]
  12. CREATE INDEX IF NOT EXISTS idx_logs_create ON oauth_logs(create_time) [ RunTime:0.000073s ]
  13. CREATE UNIQUE INDEX IF NOT EXISTS idx_gw_users_openid ON gw_users(openid) [ RunTime:0.000014s ]
  14. CREATE INDEX IF NOT EXISTS idx_gw_users_unionid ON gw_users(unionid) [ RunTime:0.000011s ]
  15. PRAGMA table_info( 'projects' ) [ RunTime:0.000039s ]
  16. SELECT COUNT(*) AS think_count FROM `projects` [ RunTime:0.000032s ]
  17. PRAGMA table_info( 'oauth_logs' ) [ RunTime:0.000020s ]
  18. SELECT COUNT(*) AS think_count FROM `oauth_logs` [ RunTime:0.000021s ]
  19. SELECT COUNT(*) AS think_count FROM `oauth_logs` WHERE `create_time` LIKE '2026-10-17%' [ RunTime:0.000092s ]
  20. SELECT DISTINCT COUNT(*) AS think_count FROM `oauth_logs` [ RunTime:0.000177s ]
  21. PRAGMA table_info( 'settings' ) [ RunTime:0.000027s ]
  22. SELECT * FROM `settings` WHERE `name` = 'gateway_url' LIMIT 1 [ RunTime:0.000039s ]
0.020776s