diff --git a/api/common/completeness.php b/api/common/completeness.php index c63ece1..30ab13d 100644 --- a/api/common/completeness.php +++ b/api/common/completeness.php @@ -31,7 +31,12 @@ const COMPLETENESS_LAYERS = [ 'social_accounts' => [ 'core' => ['platform', 'account_id'], 'important' => ['is_primary'], - 'optional' => ['profile_url', 'remark'], + 'optional' => [], + // 主页链接/备注仅对真实社媒账号(非 phone/email)计入非必要层;手机/邮箱账号无主页,不适用 + 'conditional' => [ + 'profile_url' => ['layer' => 'optional', 'when' => ['platform_not_in' => ['phone', 'email']]], + 'remark' => ['layer' => 'optional', 'when' => ['platform_not_in' => ['phone', 'email']]], + ], 'virtual' => [], ], 'media' => [ @@ -125,9 +130,18 @@ function completenessCalc($table, $row) $layer = $cond['layer'] ?? 'optional'; $match = true; foreach (($cond['when'] ?? []) as $wf => $wv) { - if ((string)($row[$wf] ?? '') !== (string)$wv) { - $match = false; - break; + // 支持 _not_in 后缀:字段值不在列表中才满足条件 + if (substr($wf, -7) === '_not_in') { + $realField = substr($wf, 0, -7); + if (in_array((string)($row[$realField] ?? ''), (array)$wv, true)) { + $match = false; + break; + } + } else { + if ((string)($row[$wf] ?? '') !== (string)$wv) { + $match = false; + break; + } } } if (!$match) { diff --git a/static/js/config.js b/static/js/config.js index 236d250..d788fe4 100644 --- a/static/js/config.js +++ b/static/js/config.js @@ -5,7 +5,7 @@ var BASE_URL = '/api/'; var PAGE_SIZE = 20; /** 系统版本号(logo旁展示):修改代码后运行 tools/bump_version.php 自动递增 */ -var APP_VERSION = 'v1.0.38'; +var APP_VERSION = 'v1.0.39'; /** 页脚版权/备案信息(在 config.js 中修改) */ var FOOTER_TEXT = '© 2026 SuperLink 管理系统 版权所有 | 备案号:请替换为真实备案号';