发布(0.4.2): 修复履约绑定同步并支持特殊角色名核对
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# 直播账号运营后台
|
# 直播账号运营后台
|
||||||
|
|
||||||
斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.1)。
|
斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.2)。
|
||||||
|
|
||||||
## 能做什么
|
## 能做什么
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "live-hub-py"
|
name = "live-hub-py"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
description = "直播账号运营 Web 后台"
|
description = "直播账号运营 Web 后台"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12,<3.13"
|
requires-python = ">=3.12,<3.13"
|
||||||
|
|||||||
@@ -2943,9 +2943,11 @@ class TestBindingAndCompletion(_Base):
|
|||||||
.filter_by(task_id=task.id, event_type="binding_sync_rejected")
|
.filter_by(task_id=task.id, event_type="binding_sync_rejected")
|
||||||
.one()
|
.one()
|
||||||
)
|
)
|
||||||
assert synced == 0
|
assert synced == 1
|
||||||
assert task.binding_status == "role_ready"
|
assert task.binding_status == "role_ready"
|
||||||
assert task.bind_task_id == qr_task.id
|
assert task.bind_task_id == confirm_task.id
|
||||||
|
assert "别的角色" in (task.last_error or "")
|
||||||
|
assert "本单目标角色" in (task.last_error or "")
|
||||||
assert rejection.detail_json["reason"] == "target_mismatch"
|
assert rejection.detail_json["reason"] == "target_mismatch"
|
||||||
|
|
||||||
def _role_lock_event(self, account, role_name, *, occurred_at=None):
|
def _role_lock_event(self, account, role_name, *, occurred_at=None):
|
||||||
@@ -5655,10 +5657,89 @@ class TestBindingAndCompletion(_Base):
|
|||||||
.filter_by(task_id=task.id, event_type="binding_sync_rejected")
|
.filter_by(task_id=task.id, event_type="binding_sync_rejected")
|
||||||
.one()
|
.one()
|
||||||
)
|
)
|
||||||
assert synced >= 0
|
assert synced == 1
|
||||||
assert task.binding_status != "bound"
|
assert task.binding_status != "bound"
|
||||||
|
assert task.binding_status == "role_ready"
|
||||||
|
assert task.execution_status == "role_ready"
|
||||||
|
assert "账号旧角色" in (task.last_error or "")
|
||||||
|
assert "客户指定角色" in (task.last_error or "")
|
||||||
assert rejection.detail_json["reason"] == "target_mismatch"
|
assert rejection.detail_json["reason"] == "target_mismatch"
|
||||||
|
|
||||||
|
def test_refresh_absorbs_newer_owned_confirm_and_operator_can_fix_special_role_name(
|
||||||
|
self,
|
||||||
|
):
|
||||||
|
"""精英宝典确认后应吸收最新角色;特殊字符名可直接复制并修正后结算。"""
|
||||||
|
task = self._allocated()
|
||||||
|
task.customer_role_name = "狞王ゞ"
|
||||||
|
task.customer_platform = "wechat"
|
||||||
|
task.customer_system = "android"
|
||||||
|
qr_task = DouyuTask(
|
||||||
|
batch_id="older-qr-still-polling",
|
||||||
|
account_id=task.account_id,
|
||||||
|
account_assigned_to=self.admin_id,
|
||||||
|
task_type="get_bind_qr",
|
||||||
|
handbook_scope="elite",
|
||||||
|
status="running",
|
||||||
|
platform_task_id=task.id,
|
||||||
|
result={"url": "https://livelink.example/qr", "bind_polling": True},
|
||||||
|
created_by=self.admin_id,
|
||||||
|
)
|
||||||
|
self.session.add(qr_task)
|
||||||
|
self.session.flush()
|
||||||
|
task.bind_task_id = qr_task.id
|
||||||
|
task.binding_status = "qr_pending"
|
||||||
|
task.execution_status = "waiting_bind"
|
||||||
|
account = self.session.get(Account, task.account_id)
|
||||||
|
account.role_bind_status = "bound"
|
||||||
|
account.game_name = "゚狙王゜"
|
||||||
|
account.game_channel = "微信 · 安卓(android)"
|
||||||
|
confirm_task = DouyuTask(
|
||||||
|
batch_id="elite-workbench-confirmed-special-name",
|
||||||
|
account_id=task.account_id,
|
||||||
|
account_assigned_to=self.admin_id,
|
||||||
|
task_type="confirm_bind",
|
||||||
|
handbook_scope="elite",
|
||||||
|
status="success",
|
||||||
|
platform_task_id=task.id,
|
||||||
|
result={
|
||||||
|
"role_name": "゚狙王゜",
|
||||||
|
"area_name": "微信",
|
||||||
|
"plat_name": "安卓(android)",
|
||||||
|
"bind_confirmed": True,
|
||||||
|
"bind_phase": "confirmed",
|
||||||
|
},
|
||||||
|
created_by=self.admin_id,
|
||||||
|
)
|
||||||
|
self.session.add(confirm_task)
|
||||||
|
self.session.commit()
|
||||||
|
|
||||||
|
detail = service.refresh_binding(self.session, task_id=task.id)
|
||||||
|
|
||||||
|
self.session.refresh(task)
|
||||||
|
assert task.bind_task_id == confirm_task.id
|
||||||
|
assert detail["task"]["bindingStatus"] == "role_ready"
|
||||||
|
assert detail["task"]["executionStatus"] == "role_ready"
|
||||||
|
assert detail["task"]["customerProfile"]["platformRoleName"] == "゚狙王゜"
|
||||||
|
assert "゚狙王゜" in (task.last_error or "")
|
||||||
|
assert "狞王ゞ" in (task.last_error or "")
|
||||||
|
|
||||||
|
updated = service.update_customer_profile_by_operator(
|
||||||
|
self.session,
|
||||||
|
task_id=task.id,
|
||||||
|
current=self.admin,
|
||||||
|
customer_role_name=detail["task"]["customerProfile"]["platformRoleName"],
|
||||||
|
platform="wechat",
|
||||||
|
system="android",
|
||||||
|
reopen_binding=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
self.session.refresh(task)
|
||||||
|
assert task.customer_role_name == "゚狙王゜"
|
||||||
|
assert task.binding_status == "bound"
|
||||||
|
assert task.execution_status == "bound"
|
||||||
|
assert task.last_error == ""
|
||||||
|
assert updated["task"]["bindingStatus"] == "bound"
|
||||||
|
|
||||||
def test_save_customer_profile_immediately_reconciles_existing_qr_candidates(self):
|
def test_save_customer_profile_immediately_reconciles_existing_qr_candidates(self):
|
||||||
"""先出码扫码、后提交客户资料时,保存资料应立即把订单收敛到 role_ready。"""
|
"""先出码扫码、后提交客户资料时,保存资料应立即把订单收敛到 role_ready。"""
|
||||||
task = self._allocated()
|
task = self._allocated()
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "live-hub-py"
|
name = "live-hub-py"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "alembic" },
|
{ name = "alembic" },
|
||||||
|
|||||||
@@ -28,6 +28,16 @@ from ..binding_ownership import (
|
|||||||
source_created_within_lease,
|
source_created_within_lease,
|
||||||
)
|
)
|
||||||
from ..business_events import record_douyu_task_started
|
from ..business_events import record_douyu_task_started
|
||||||
|
from ..douyu_account_probe import (
|
||||||
|
ROLE_BOUND,
|
||||||
|
ROLE_ERROR,
|
||||||
|
ROLE_UNKNOWN,
|
||||||
|
activity_client,
|
||||||
|
config_mapping,
|
||||||
|
elite_action_aliases,
|
||||||
|
persist_probe_result,
|
||||||
|
resolve_elite_role,
|
||||||
|
)
|
||||||
from ..douyu_binding import (
|
from ..douyu_binding import (
|
||||||
BINDING_OBSERVATION_TASK_TYPES,
|
BINDING_OBSERVATION_TASK_TYPES,
|
||||||
BINDING_VIEW_CONFIRMED,
|
BINDING_VIEW_CONFIRMED,
|
||||||
@@ -35,6 +45,8 @@ from ..douyu_binding import (
|
|||||||
resolve_douyu_binding,
|
resolve_douyu_binding,
|
||||||
resolve_fulfillment_binding,
|
resolve_fulfillment_binding,
|
||||||
)
|
)
|
||||||
|
from ..douyu_role_audit import record_role_api_candidates
|
||||||
|
from ..douyu_service import ensure_douyu_config
|
||||||
from ..execution_jobs import (
|
from ..execution_jobs import (
|
||||||
JOB_DOUYU_BINDING,
|
JOB_DOUYU_BINDING,
|
||||||
LANE_FULFILLMENT,
|
LANE_FULFILLMENT,
|
||||||
@@ -65,18 +77,6 @@ from .runtime import (
|
|||||||
_apply_task_lease_policy,
|
_apply_task_lease_policy,
|
||||||
)
|
)
|
||||||
from .views import get_task_detail
|
from .views import get_task_detail
|
||||||
from ..douyu_account_probe import (
|
|
||||||
ROLE_BOUND,
|
|
||||||
ROLE_ERROR,
|
|
||||||
ROLE_UNKNOWN,
|
|
||||||
activity_client,
|
|
||||||
config_mapping,
|
|
||||||
elite_action_aliases,
|
|
||||||
persist_probe_result,
|
|
||||||
resolve_elite_role,
|
|
||||||
)
|
|
||||||
from ..douyu_role_audit import record_role_api_candidates
|
|
||||||
from ..douyu_service import ensure_douyu_config
|
|
||||||
|
|
||||||
BINDING_SYNC_TASK_TYPES = frozenset(
|
BINDING_SYNC_TASK_TYPES = frozenset(
|
||||||
{
|
{
|
||||||
@@ -104,8 +104,6 @@ ACTIVE_BINDING_STATUSES = frozenset(
|
|||||||
"role_ready",
|
"role_ready",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
#: 可以接受确认任务结算的阶段。
|
|
||||||
CONFIRMABLE_BINDING_STATUSES = frozenset({"role_ready", "confirming"})
|
|
||||||
#: 订单的权威绑定任务类型。查询任务只能展示,不能结算。
|
#: 订单的权威绑定任务类型。查询任务只能展示,不能结算。
|
||||||
BINDING_EVIDENCE_TASK_TYPES = frozenset({"get_bind_qr", "confirm_bind"})
|
BINDING_EVIDENCE_TASK_TYPES = frozenset({"get_bind_qr", "confirm_bind"})
|
||||||
assert BINDING_EVIDENCE_TASK_TYPES <= BINDING_TASK_TYPES
|
assert BINDING_EVIDENCE_TASK_TYPES <= BINDING_TASK_TYPES
|
||||||
@@ -359,6 +357,22 @@ def _order_target_role(
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
def _binding_target_mismatch_message(
|
||||||
|
confirmed_role: str,
|
||||||
|
expected_role: str,
|
||||||
|
) -> str:
|
||||||
|
if expected_role:
|
||||||
|
return (
|
||||||
|
f"确认绑定已生效:账号当前角色「{confirmed_role}」"
|
||||||
|
f"与客户填写「{expected_role}」不一致。"
|
||||||
|
"请点击“修改资料”,复制或采用平台当前角色后保存。"
|
||||||
|
)
|
||||||
|
return (
|
||||||
|
f"确认绑定已生效:账号当前角色「{confirmed_role}」,"
|
||||||
|
"但订单缺少客户目标角色。请点击“修改资料”补齐后保存。"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _sync_confirmed_observation(
|
def _sync_confirmed_observation(
|
||||||
db: Session,
|
db: Session,
|
||||||
observation: DouyuTask,
|
observation: DouyuTask,
|
||||||
@@ -1177,13 +1191,14 @@ def _apply_binding_task(
|
|||||||
|
|
||||||
if binding.status == BINDING_VIEW_CONFIRMED:
|
if binding.status == BINDING_VIEW_CONFIRMED:
|
||||||
confirmed_role = binding.confirmed_role_name
|
confirmed_role = binding.confirmed_role_name
|
||||||
|
customer_role = str(task.customer_role_name or "").strip()
|
||||||
|
explicit_expected = str(result.get("expected_role_name") or "").strip()
|
||||||
target_role = _order_target_role(
|
target_role = _order_target_role(
|
||||||
db,
|
db,
|
||||||
task,
|
task,
|
||||||
before_task_id=int(source.id) if source.task_type == "confirm_bind" else None,
|
before_task_id=int(source.id) if source.task_type == "confirm_bind" else None,
|
||||||
)
|
)
|
||||||
customer_role = str(task.customer_role_name or "").strip()
|
expected_role = customer_role or explicit_expected or target_role
|
||||||
expected_role = target_role or customer_role
|
|
||||||
if is_current:
|
if is_current:
|
||||||
# 订单自己的当前任务(订单创建的或兼容路径挂上的)回查到 bindAct=1。
|
# 订单自己的当前任务(订单创建的或兼容路径挂上的)回查到 bindAct=1。
|
||||||
# 查询类任务不会走到这里:resolve_fulfillment_binding 会把观测降级。
|
# 查询类任务不会走到这里:resolve_fulfillment_binding 会把观测降级。
|
||||||
@@ -1197,7 +1212,7 @@ def _apply_binding_task(
|
|||||||
accepted = False
|
accepted = False
|
||||||
elif source.task_type == "confirm_bind":
|
elif source.task_type == "confirm_bind":
|
||||||
accepted = (
|
accepted = (
|
||||||
phase in CONFIRMABLE_BINDING_STATUSES
|
phase in ACTIVE_BINDING_STATUSES | {"confirming"}
|
||||||
and bool(expected_role)
|
and bool(expected_role)
|
||||||
and role_names_match(confirmed_role, expected_role)
|
and role_names_match(confirmed_role, expected_role)
|
||||||
)
|
)
|
||||||
@@ -1207,13 +1222,52 @@ def _apply_binding_task(
|
|||||||
not expected_role or role_names_match(confirmed_role, expected_role)
|
not expected_role or role_names_match(confirmed_role, expected_role)
|
||||||
)
|
)
|
||||||
if not accepted:
|
if not accepted:
|
||||||
|
reason = (
|
||||||
|
"target_mismatch"
|
||||||
|
if expected_role and not role_names_match(confirmed_role, expected_role)
|
||||||
|
else "missing_target"
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
source.task_type == "confirm_bind"
|
||||||
|
and (owned or is_current)
|
||||||
|
and phase in ACTIVE_BINDING_STATUSES | {"confirming"}
|
||||||
|
):
|
||||||
|
message = _binding_target_mismatch_message(
|
||||||
|
confirmed_role,
|
||||||
|
expected_role,
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
int(task.bind_task_id or 0) == int(source.id)
|
||||||
|
and task.binding_status == "role_ready"
|
||||||
|
and task.last_error == message
|
||||||
|
):
|
||||||
|
return False
|
||||||
|
# 确认动作已经成功,旧 QR 指针必须让位。这里不宣告订单绑定完成,
|
||||||
|
# 而是把实际角色交给运营核对;修改客户资料后会再次结算为 bound。
|
||||||
|
task.bind_task_id = int(source.id)
|
||||||
|
task.binding_status = "role_ready"
|
||||||
|
task.execution_status = "role_ready"
|
||||||
|
task.issue_code = ""
|
||||||
|
task.last_error = message
|
||||||
|
task.updated_at = _now()
|
||||||
|
_record_binding_rejection(
|
||||||
|
db,
|
||||||
|
task,
|
||||||
|
source,
|
||||||
|
reason=reason,
|
||||||
|
confirmed_role=confirmed_role,
|
||||||
|
target_role=expected_role,
|
||||||
|
)
|
||||||
|
_apply_task_lease_policy(db, task, lease=lease)
|
||||||
|
_emit_order_site_binding_state(db, task.id)
|
||||||
|
return True
|
||||||
_record_binding_rejection(
|
_record_binding_rejection(
|
||||||
db,
|
db,
|
||||||
task,
|
task,
|
||||||
source,
|
source,
|
||||||
reason=(
|
reason=(
|
||||||
"target_mismatch"
|
reason
|
||||||
if expected_role and not role_names_match(confirmed_role, expected_role)
|
if reason != "missing_target"
|
||||||
else "untrusted_confirmation"
|
else "untrusted_confirmation"
|
||||||
),
|
),
|
||||||
confirmed_role=confirmed_role,
|
confirmed_role=confirmed_role,
|
||||||
@@ -1239,7 +1293,7 @@ def _apply_binding_task(
|
|||||||
or result.get("current_role_name")
|
or result.get("current_role_name")
|
||||||
or ""
|
or ""
|
||||||
)[:128],
|
)[:128],
|
||||||
"targetRoleName": target_role[:128],
|
"targetRoleName": expected_role[:128],
|
||||||
"confirmedRoleName": confirmed_role[:128],
|
"confirmedRoleName": confirmed_role[:128],
|
||||||
"confirmedChannel": binding.confirmed_channel,
|
"confirmedChannel": binding.confirmed_channel,
|
||||||
},
|
},
|
||||||
@@ -1355,6 +1409,18 @@ def refresh_binding(db: Session, *, task_id: int) -> dict[str, Any]:
|
|||||||
task = _load_task(db, task_id)
|
task = _load_task(db, task_id)
|
||||||
if _frozen(task):
|
if _frozen(task):
|
||||||
return get_task_detail(db, task.id)
|
return get_task_detail(db, task.id)
|
||||||
|
# 精英宝典等外部入口可能先创建确认任务,履约订单仍指向更早的扫码任务。
|
||||||
|
# 刷新时必须主动吸收更新、已归属本单的成功证据,不能只盯着旧指针。
|
||||||
|
for evidence in _owned_binding_tasks(
|
||||||
|
db,
|
||||||
|
task,
|
||||||
|
newer_than=int(task.bind_task_id or 0),
|
||||||
|
):
|
||||||
|
if evidence.status != "success":
|
||||||
|
continue
|
||||||
|
if _apply_binding_task(db, task, evidence, owned=True):
|
||||||
|
db.commit()
|
||||||
|
return get_task_detail(db, task.id)
|
||||||
if task.binding_status in ACTIVE_BINDING_STATUSES:
|
if task.binding_status in ACTIVE_BINDING_STATUSES:
|
||||||
latest_pending = _latest_pending_binding_task(db, task)
|
latest_pending = _latest_pending_binding_task(db, task)
|
||||||
if latest_pending is not None and _attach_pending_binding_task(
|
if latest_pending is not None and _attach_pending_binding_task(
|
||||||
@@ -1609,7 +1675,10 @@ def reconcile_binding_observations(
|
|||||||
# role_ready 订单最可能已有新观测可自愈;先处理它们,避免
|
# role_ready 订单最可能已有新观测可自愈;先处理它们,避免
|
||||||
# 大量历史 failed/manual_required 订单把固定 limit 的名额占满。
|
# 大量历史 failed/manual_required 订单把固定 limit 的名额占满。
|
||||||
case((PlatformFulfillmentTask.binding_status == "role_ready", 0), else_=1),
|
case((PlatformFulfillmentTask.binding_status == "role_ready", 0), else_=1),
|
||||||
PlatformFulfillmentTask.id.asc(),
|
# 其余状态优先收敛最近更新的订单。生产有上千条失败/待扫码历史,
|
||||||
|
# 按 id 正序会把刚确认的新订单挡在启动对账窗口之外。
|
||||||
|
PlatformFulfillmentTask.updated_at.desc(),
|
||||||
|
PlatformFulfillmentTask.id.desc(),
|
||||||
)
|
)
|
||||||
.limit(max(1, min(limit, 2000)))
|
.limit(max(1, min(limit, 2000)))
|
||||||
.all()
|
.all()
|
||||||
|
|||||||
@@ -1508,7 +1508,11 @@ export default function PlatformFulfillmentPage() {
|
|||||||
{task.account && task.bindingStatus === 'failed' ? (
|
{task.account && task.bindingStatus === 'failed' ? (
|
||||||
<Tag color="orange">账号保留中</Tag>
|
<Tag color="orange">账号保留中</Tag>
|
||||||
) : null}
|
) : null}
|
||||||
<Text ellipsis title={customerRole || '未填写'}>
|
<Text
|
||||||
|
ellipsis
|
||||||
|
title={customerRole || '未填写'}
|
||||||
|
copyable={customerRole ? { text: customerRole } : false}
|
||||||
|
>
|
||||||
客户提交角色:{customerRole || '未填写'}
|
客户提交角色:{customerRole || '未填写'}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
@@ -1516,6 +1520,7 @@ export default function PlatformFulfillmentPage() {
|
|||||||
style={{ fontSize: 12 }}
|
style={{ fontSize: 12 }}
|
||||||
ellipsis
|
ellipsis
|
||||||
title={scannedRole ? (scannedChannel ? `${scannedRole} (${scannedChannel})` : scannedRole) : '未识别'}
|
title={scannedRole ? (scannedChannel ? `${scannedRole} (${scannedChannel})` : scannedRole) : '未识别'}
|
||||||
|
copyable={scannedRole ? { text: scannedRole } : false}
|
||||||
>
|
>
|
||||||
扫码绑定角色:{scannedRole || '未识别'}
|
扫码绑定角色:{scannedRole || '未识别'}
|
||||||
{scannedRole && scannedChannel ? ` · ${scannedChannel}` : ''}
|
{scannedRole && scannedChannel ? ` · ${scannedChannel}` : ''}
|
||||||
@@ -2103,7 +2108,18 @@ export default function PlatformFulfillmentPage() {
|
|||||||
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
||||||
<Descriptions bordered size="small" column={2}>
|
<Descriptions bordered size="small" column={2}>
|
||||||
<Descriptions.Item label="客户角色" span={2}>
|
<Descriptions.Item label="客户角色" span={2}>
|
||||||
{selected.customerProfile.roleName || '未填写'}
|
{selected.customerProfile.roleName ? (
|
||||||
|
<Text
|
||||||
|
copyable={{
|
||||||
|
text: selected.customerProfile.roleName,
|
||||||
|
tooltips: ['复制客户角色', '已复制'],
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{selected.customerProfile.roleName}
|
||||||
|
</Text>
|
||||||
|
) : (
|
||||||
|
'未填写'
|
||||||
|
)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="登录方式">
|
<Descriptions.Item label="登录方式">
|
||||||
{CUSTOMER_PLATFORM_LABELS[selected.customerProfile.platform] || selected.customerProfile.platform || '-'}
|
{CUSTOMER_PLATFORM_LABELS[selected.customerProfile.platform] || selected.customerProfile.platform || '-'}
|
||||||
@@ -2112,7 +2128,18 @@ export default function PlatformFulfillmentPage() {
|
|||||||
{CUSTOMER_SYSTEM_LABELS[selected.customerProfile.system] || selected.customerProfile.system || '-'}
|
{CUSTOMER_SYSTEM_LABELS[selected.customerProfile.system] || selected.customerProfile.system || '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="平台当前角色">
|
<Descriptions.Item label="平台当前角色">
|
||||||
{selected.customerProfile.platformRoleName || '未识别'}
|
{selected.customerProfile.platformRoleName ? (
|
||||||
|
<Text
|
||||||
|
copyable={{
|
||||||
|
text: selected.customerProfile.platformRoleName,
|
||||||
|
tooltips: ['复制平台当前角色', '已复制'],
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{selected.customerProfile.platformRoleName}
|
||||||
|
</Text>
|
||||||
|
) : (
|
||||||
|
'未识别'
|
||||||
|
)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="平台渠道">
|
<Descriptions.Item label="平台渠道">
|
||||||
{selected.customerProfile.platformChannel || '-'}
|
{selected.customerProfile.platformChannel || '-'}
|
||||||
@@ -2742,6 +2769,36 @@ export default function PlatformFulfillmentPage() {
|
|||||||
message="请对照客户主页截图核对并修正"
|
message="请对照客户主页截图核对并修正"
|
||||||
description="修改后会同步写入时间线和订单侧;若正在扫码中会立即按新角色名重算。"
|
description="修改后会同步写入时间线和订单侧;若正在扫码中会立即按新角色名重算。"
|
||||||
/>
|
/>
|
||||||
|
<div>
|
||||||
|
<Text strong>平台当前角色</Text>
|
||||||
|
<Space wrap size={8} style={{ marginTop: 8 }}>
|
||||||
|
{profileEditTarget?.customerProfile?.platformRoleName ? (
|
||||||
|
<>
|
||||||
|
<Text
|
||||||
|
copyable={{
|
||||||
|
text: profileEditTarget.customerProfile.platformRoleName,
|
||||||
|
tooltips: ['复制平台当前角色', '已复制'],
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{profileEditTarget.customerProfile.platformRoleName}
|
||||||
|
</Text>
|
||||||
|
<Button
|
||||||
|
size="small"
|
||||||
|
icon={<CopyOutlined />}
|
||||||
|
onClick={() =>
|
||||||
|
setProfileEditRole(
|
||||||
|
profileEditTarget.customerProfile?.platformRoleName || '',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
填入当前角色
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Text type="secondary">暂未识别</Text>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Text strong>客户游戏角色名</Text>
|
<Text strong>客户游戏角色名</Text>
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
Reference in New Issue
Block a user