From 8aca5b3bc67dde63e9f8018ead2b6098641ca43c Mon Sep 17 00:00:00 2001 From: nanguaboss <602995148@qq.com> Date: Sun, 9 Aug 2026 23:04:11 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.39:=20=E4=BF=AE=E5=A4=8D=E7=A2=8E=E7=89=87?= =?UTF-8?q?=E6=80=BB=E6=95=B0=E4=B8=8D=E9=99=8D=E5=8F=8D=E5=8D=87=20-=20so?= =?UTF-8?q?cial=5Faccounts=E7=9A=84profile=5Furl/remark=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E4=BB=85=E7=9C=9F=E5=AE=9E=E7=A4=BE=E5=AA=92=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?(=E9=9D=9Ephone/email)=E8=AE=A1=E5=85=A5=E9=9D=9E=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E5=B1=82(conditional=E6=94=AF=E6=8C=81=5Fnot=5Fin),?= =?UTF-8?q?=E8=A1=A5=E5=85=A8=E4=BA=BA=E5=91=98=E5=86=99=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=89=8B=E6=9C=BA/=E9=82=AE=E7=AE=B1=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=AF=AF=E5=88=A4=E8=BD=AF=E7=A2=8E=E7=89=87?= =?UTF-8?q?,=E8=A1=A5=E5=85=A8=E5=90=8E=E7=A2=8E=E7=89=87=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E7=B2=BE=E7=A1=AE-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/common/completeness.php | 22 ++++++++++++++++++---- static/js/config.js | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) 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 管理系统 版权所有 | 备案号:请替换为真实备案号';