deleteLink($remoteLinkId)'); $localDeleteAt = strpos($method, "Db::transaction(function () use (\$id, \$now)"); if ($remoteDeleteAt === false || $localDeleteAt === false || $remoteDeleteAt >= $localDeleteAt) { throw new RuntimeException('删除方案必须先永久删除企业微信官方链接,再删除本地记录'); } if (!str_contains($method, '本地方案已保留') || !str_contains($method, "'remote_status' => 2")) { throw new RuntimeException('企业微信删除失败保护或成功状态记录缺失'); } if (!str_contains($view, '已投放的链接会失效且无法恢复') || !str_contains($view, "confirmButtonText: '永久删除'")) { throw new RuntimeException('前端没有明确提示官方链接将被永久删除'); } echo "WECOM_PROMOTION_DELETE_POOL_CONTRACT_OK\n";