feat(huya): 精英宝典账号支持转入外部单协作
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* 3. **内联编辑必须带 `expected_version`**:别人先改过会 409,绝不静默覆盖(Excel 最痛的点)。
|
||||
*/
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Alert, App, Badge, Button, Card, Checkbox, Col, Descriptions, Divider, Drawer, Dropdown,
|
||||
Empty, Form, Image, Input, InputNumber, Modal, Popconfirm, Popover, Progress, Radio, Row, Select, Space, Statistic,
|
||||
@@ -499,6 +500,8 @@ function ImageSlotEditor({
|
||||
export default function HuyaCollabPage() {
|
||||
const { modal } = App.useApp();
|
||||
const { can, user } = usePermissions();
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const canEdit = can('huya:collab:edit');
|
||||
const canManage = can('huya:collab:manage');
|
||||
// 单行复制与批量导出共用这个权限点(默认运营和客服都有)
|
||||
@@ -819,6 +822,23 @@ export default function HuyaCollabPage() {
|
||||
[runCkPreview],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const state = location.state as { transferCk?: string } | null;
|
||||
const transferCk = state?.transferCk?.trim();
|
||||
if (!transferCk) return;
|
||||
|
||||
setCreateOpen(true);
|
||||
setCkPreview(null);
|
||||
setPreviewing(false);
|
||||
setGiftHint('');
|
||||
setDraftRestoredAt(null);
|
||||
previewSeq.current += 1;
|
||||
createForm.resetFields();
|
||||
createForm.setFieldsValue({ ck_text: transferCk });
|
||||
scheduleCkPreview(transferCk, true);
|
||||
navigate(location.pathname, { replace: true, state: null });
|
||||
}, [createForm, location.pathname, location.state, navigate, scheduleCkPreview]);
|
||||
|
||||
const isArchiveView = filters.archive_scope === 'archived';
|
||||
const selectedRows = useMemo(
|
||||
() => rows.filter((row) => selectedIds.includes(row.id)),
|
||||
|
||||
Reference in New Issue
Block a user