v1.0.33: 全局唯一性校验 - 手机号/邮箱/身份证/企业注册号/社媒账号ID/主页链接/企业名称 新增与修改时校验,重复弹窗提示并跳转定位(后端duplicate_check引擎+code 1001,前端弹窗+person/company/media页?id=跳转)
This commit is contained in:
@@ -11,6 +11,7 @@ require_once __DIR__ . '/../common/auth.php';
|
||||
require_once __DIR__ . '/../common/helpers.php';
|
||||
require_once __DIR__ . '/../common/logger.php';
|
||||
require_once __DIR__ . '/../common/completeness.php';
|
||||
require_once __DIR__ . '/../common/duplicate_check.php';
|
||||
|
||||
checkAjax();
|
||||
checkPermission('company');
|
||||
@@ -30,6 +31,10 @@ if ((int)$chk->fetchColumn() === 0) {
|
||||
Response::error('企业不存在');
|
||||
}
|
||||
|
||||
// 唯一性校验:社媒账号ID(同平台)/ 手机 / 邮箱 / 主页链接
|
||||
$dup = checkSingleAccountDuplicate($pdo, $platform, $accountId, $_POST['profile_url'] ?? '');
|
||||
if ($dup) Response::duplicate($dup);
|
||||
|
||||
$ins = $pdo->prepare(
|
||||
"INSERT INTO social_accounts (owner_type, owner_id, platform, account_id, profile_url, remark, is_primary, is_defult, is_active)
|
||||
VALUES ('company', ?, ?, ?, ?, ?, 0, ?, ?)"
|
||||
|
||||
Reference in New Issue
Block a user