Skip to content

Let's use AI to Earn!

feat: 1. 账户添加一键登录检测。 2. 检测登录状态弹框支持在此弹框重新登录。 3. 小红书话题问题处理:所有平台话题统一处理,发布时将合并去重处理。

gaoSir3ef87e80a4d6
diff --git a/electron/db/models/video.ts b/electron/db/models/video.ts
index d9e5c8a8..a5588a84 100644
--- a/electron/db/models/video.ts
+++ b/electron/db/models/video.ts
@@ -19,20 +19,13 @@ export interface ILableValue {
label: string;
value: string | number;
}
-export type TopicsArrType = ILableValue[];
/**
* 不同平台的差异化参数
* 每个平台有相同点,有不同点,这不同点都在这个参数下集合
*/
export type DiffParmasType = {
- [AccountType.Xhs]?: {
- // 小红书的话题格式
- topicsDetail?: {
- topicId: string;
- topicName: string;
- }[];
- };
+ [AccountType.Xhs]?: {};
[AccountType.Douyin]?: {
// 申请关联的热点
hotPoint?: ILableValue;
@@ -92,7 +85,7 @@ export class VideoModel extends WorkData {
// 话题
@Column({ type: 'json', nullable: true, comment: '话题' })
- topics?: TopicsArrType;
+ topics?: string[];
// 位置
@Column({ type: 'json', nullable: true, comment: '位置' })
diff --git a/electron/main/plat/platforms/xhs/index.ts b/electron/main/plat/platforms/xhs/index.ts
index 575e6caf..115ae424 100644
--- a/electron/main/plat/platforms/xhs/index.ts
+++ b/electron/main/plat/platforms/xhs/index.ts
@@ -153,7 +153,10 @@ export class Xhs extends PlatformBase {
desc: params.desc,
title: params.title,
topicsDetail:
- params.diffParams?.[AccountType.Xhs]?.topicsDetail || [],
+ params.topics?.map((v) => ({
+ topicId: v,
+ topicName: v,
+ })) || [],
timingTime: params.timingTime?.getTime(),
privacy: params.visibleType !== VisibleTypeEnum.Public,
// 位置
diff --git a/electron/main/plat/pub/PubItemVideo.ts b/electron/main/plat/pub/PubItemVideo.ts
index af82b409..7aea6ab3 100644
--- a/electron/main/plat/pub/PubItemVideo.ts
+++ b/electron/main/plat/pub/PubItemVideo.ts
@@ -49,7 +49,7 @@ export class PubItemVideo extends PubItemBase {
desc: this.videoModel.desc!,
videoPath: this.videoModel.videoPath!,
title: this.videoModel.title || '',
- topics: this.videoModel.topics?.map((v) => v.label) || [],
+ topics: this.videoModel.topics || [],
coverPath: this.videoModel.coverPath || '',
visibleType: this.videoModel.visibleType || VisibleTypeEnum.Private,
diffParams: this.videoModel.diffParams,
diff --git a/src/icp/publish.ts b/src/icp/publish.ts
index 8b19e189..513a5ebd 100644
--- a/src/icp/publish.ts
+++ b/src/icp/publish.ts
@@ -29,6 +29,7 @@ import {
} from '../../electron/plat/douyin/douyin.type';
import { IRequestNetResult } from '../../electron/plat/requestNet';
import { WeChatVideoApiResponse } from '../../electron/plat/shipinhao/wxShp.type';
+import { parseTopicString } from '../utils';
// 创建发布记录
export async function icpCreatePubRecord(pubRecord: Partial<PubRecordModel>) {
@@ -39,8 +40,16 @@ export async function icpCreatePubRecord(pubRecord: Partial<PubRecordModel>) {
return res;
}
-// 创建视频发布记录
+/**
+ * 创建视频发布记录
+ * 这个函数中做了一些处理
+ * 1. 将描述中的标题取出,并且放到话题字段,再去重
+ * @param pubRecord
+ */
export async function icpCreateVideoPubRecord(pubRecord: Partial<VideoPul>) {
+ const { topics, cleanedString } = parseTopicString(pubRecord.desc || '');
+ pubRecord.topics = [...new Set(pubRecord.topics?.concat(topics))];
+ pubRecord.desc = cleanedString;
const res: VideoPul = await window.ipcRenderer.invoke(
'ICP_PUBLISH_CREATE_VIDEO_PUL',
pubRecord,
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 5d2c81f6..6ada15f7 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -60,3 +60,26 @@ export function describeNumber(value: number): string {
return value.toString();
}
}
+
+// 去除字符串中的话题
+export function parseTopicString(input: string): {
+ topics: string[];
+ cleanedString: string;
+} {
+ // 使用正则表达式提取字符串中的部分
+ const extractedParts = input.match(/#(\S+)\s/g) || [];
+
+ // 在原始输入中用空字符串替换提取的部分
+ let cleanedString = input;
+ extractedParts.forEach((part) => {
+ cleanedString = cleanedString.replace(part, '').trim();
+ });
+
+ // 创建提取的话题数组
+ const topics = extractedParts.map((part) => {
+ const match = part.match(/#(\S+)\s/);
+ return match ? match[1] : '';
+ });
+
+ return { topics, cleanedString };
+}
diff --git a/src/var.css b/src/var.css
index 2c845c37..a2905c21 100644
--- a/src/var.css
+++ b/src/var.css
@@ -4,6 +4,8 @@
--darkGreyColor: #555;
/* 浅灰色 */
--lightGreyColor: #888;
+ /* 超浅灰色 */
+ --superLightGreyColor: #d2d2d2;
/* 超大号字 */
--fs-xl: 20px;
diff --git a/src/views/account/components/AccountSidebar.module.scss b/src/views/account/components/AccountSidebar/AccountSidebar.module.scss
similarity index 86%
rename from src/views/account/components/AccountSidebar.module.scss
rename to src/views/account/components/AccountSidebar/AccountSidebar.module.scss
index b6ec821e..e550951b 100644
--- a/src/views/account/components/AccountSidebar.module.scss
+++ b/src/views/account/components/AccountSidebar/AccountSidebar.module.scss
@@ -1,21 +1,37 @@
.accountSidebar {
- border-right: 1px solid var(--lightGreyColor);
+ border-right: 1px solid var(--superLightGreyColor);
width: 200px;
flex-shrink: 0;
+ display: flex;
+ flex-direction: column;
p {
margin: 0;
}
:global {
+ .accountSidebar-top {
+ flex-shrink: 0;
+ padding: 0 10px;
+ button {
+ width: 100%;
+ }
+ }
+
+ .accountSidebar-footer {
+ padding: 5px 0;
+ border-top: 1px solid var(--superLightGreyColor);
+ }
+
.accountList {
width: 100%;
+ height: 100%;
min-width: 0;
display: flex;
flex-direction: column;
white-space: nowrap;
- overflow: hidden;
text-overflow: ellipsis;
+ overflow: auto;
&-item {
width: 100%;
min-width: 0;
diff --git a/src/views/account/components/AccountSidebar.tsx b/src/views/account/components/AccountSidebar/AccountSidebar.tsx
similarity index 80%
rename from src/views/account/components/AccountSidebar.tsx
rename to src/views/account/components/AccountSidebar/AccountSidebar.tsx
index a00b553c..759e4711 100644
--- a/src/views/account/components/AccountSidebar.tsx
+++ b/src/views/account/components/AccountSidebar/AccountSidebar.tsx
@@ -1,17 +1,27 @@
-import { ForwardedRef, forwardRef, memo, useEffect, useState } from 'react';
+import {
+ ForwardedRef,
+ forwardRef,
+ memo,
+ useEffect,
+ useRef,
+ useState,
+} from 'react';
import styles from './AccountSidebar.module.scss';
-import { AccountInfo, AccountPlatInfoMap } from '@/views/account/comment';
+import { AccountInfo, AccountPlatInfoMap } from '../../comment';
import { Avatar, Button, message, Popover } from 'antd';
import {
accountLogin,
acpAccountLoginCheck,
icpGetAccountList,
-} from '@/icp/account';
-import AddAccountModal from '@/views/account/components/AddAccountModal';
-import { AccountStatus } from '../../../../commont/AccountEnum';
+} from '../../../../icp/account';
+import AddAccountModal from '../AddAccountModal';
+import { AccountStatus } from '../../../../../commont/AccountEnum';
import { CheckCircleOutlined, WarningOutlined } from '@ant-design/icons';
-import useCssVariables from '@/hooks/useCssVariables';
-import { onAccountLoginFinish } from '@/icp/receiveMsg';
+import useCssVariables from '../../../../hooks/useCssVariables';
+import { onAccountLoginFinish } from '../../../../icp/receiveMsg';
+import PubAccountDetModule, {
+ IPubAccountDetModuleRef,
+} from '../../../publish/components/PubAccountDetModule';
export interface IAccountSidebarRef {}
@@ -104,6 +114,7 @@ const AccountSidebar = memo(
) => {
const [accountList, setAccountList] = useState<AccountInfo[]>([]);
const [isAccountModalOpen, setIsAccountModalOpen] = useState(false);
+ const pubAccountDetModuleRef = useRef<IPubAccountDetModuleRef>(null);
/**
* 获取账户列表
@@ -128,18 +139,27 @@ const AccountSidebar = memo(
return (
<>
+ <PubAccountDetModule
+ title="账号检测"
+ tips="所有平台在线"
+ ref={pubAccountDetModuleRef}
+ accounts={accountList}
+ isFooter={false}
+ />
<AddAccountModal
open={isAccountModalOpen}
onClose={() => setIsAccountModalOpen(false)}
onAddSuccess={getAccountList}
/>
<div className={styles.accountSidebar}>
- <Button
- style={{ margin: '10px 0' }}
- onClick={() => setIsAccountModalOpen(true)}
- >
- 添加账号
- </Button>
+ <div className="accountSidebar-top">
+ <Button
+ style={{ margin: '10px 0' }}
+ onClick={() => setIsAccountModalOpen(true)}
+ >
+ 添加账号
+ </Button>
+ </div>
<ul className="accountList">
{accountList.map((account) => {
const platInfo = AccountPlatInfoMap.get(account.type)!;
@@ -188,6 +208,17 @@ const AccountSidebar = memo(
);
})}
</ul>
+
+ <div className="accountSidebar-footer">
+ <Button
+ type="link"
+ onClick={() => {
+ pubAccountDetModuleRef.current?.startDet();
+ }}
+ >
+ 一键检测登录状态
+ </Button>
+ </div>
</div>
</>
);
diff --git a/src/views/account/index.tsx b/src/views/account/index.tsx
index 1feabba4..2bbed37a 100644
--- a/src/views/account/index.tsx
+++ b/src/views/account/index.tsx
@@ -9,7 +9,7 @@
import React, { useCallback, useState } from 'react';
import styles from './account.module.scss';
-import AccountSidebar from '@/views/account/components/AccountSidebar';
+import AccountSidebar from './components/AccountSidebar/AccountSidebar';
import WebView from '@/components/WebView';
import { AccountInfo, AccountPlatInfoMap } from '@/views/account/comment';
diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx
index a0212fb9..6100fb53 100644
--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx
+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx
@@ -173,6 +173,7 @@ const VideoPubSetModal = memo(
}, [currChooseAccountId, videoListChoose]);
const pubCore = async () => {
+ setLoading(false);
const err = () => {
setLoading(false);
message.error('网络繁忙,请稍后重试!');
@@ -284,6 +285,11 @@ const VideoPubSetModal = memo(
onPubClick={() => {
pubCore();
}}
+ onRestartLoginFinish={(account) => {
+ updateAccounts({
+ accounts: [account],
+ });
+ }}
onDetFinish={(accounts) => {
updateAccounts({
accounts,
@@ -292,6 +298,7 @@ const VideoPubSetModal = memo(
/>
<Modal
width={900}
+ maskClosable={false}
title="预览/发布配置"
open={videoPubSetModalOpen}
onOk={handleOk}
diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/TopicSelect.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/TopicSelect.tsx
index 4a992bd3..8dec4122 100644
--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/TopicSelect.tsx
+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/TopicSelect.tsx
@@ -5,7 +5,7 @@ import { useVideoPageStore } from '@/views/publish/children/videoPage/useVideoPa
import { useShallow } from 'zustand/react/shallow';
import { IVideoChooseItem } from '@/views/publish/children/videoPage/videoPage';
import { icpGetTopic } from '@/icp/publish';
-import { AccountStatus, AccountType } from '@@/AccountEnum';
+import { AccountStatus } from '@@/AccountEnum';
import { ipcUpdateAccountStatus } from '@/icp/account';
import useDebounceFetcher from '@/views/publish/children/videoPage/components/VideoPubSetModal/components/useDebounceFetcher';
import { VideoPubRestartLogin } from '@/views/publish/children/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon';
@@ -16,14 +16,17 @@ interface DebounceSelectProps<ValueType = any>
currChooseAccount: IVideoChooseItem;
}
+type ValueType = {
+ label: string;
+ value: string | number;
+};
+
// 话题选择器
-export default function TopicSelect<
- ValueType extends {
- key?: string;
- label: React.ReactNode;
- value: string | number;
- } = any,
->({ currChooseAccount, tips, ...props }: DebounceSelectProps<ValueType>) {
+export default function TopicSelect({
+ currChooseAccount,
+ tips,
+ ...props
+}: DebounceSelectProps<ValueType>) {
const { fetching, options, debounceFetcher } = useDebounceFetcher<ValueType>(
async (keyword: string): Promise<ValueType[]> => {
const topics = await icpGetTopic(currChooseAccount.account!, keyword);
@@ -68,28 +71,16 @@ export default function TopicSelect<
notFoundContent={fetching ? <Spin size="small" /> : null}
{...props}
options={options}
- value={currChooseAccount.pubParams!.topics as ValueType[]}
+ value={currChooseAccount.pubParams!.topics!.map((v) => {
+ return {
+ value: v,
+ label: v,
+ };
+ })}
onChange={(newValue) => {
- // 小红书话题特殊处理
- if (currChooseAccount.account?.type === AccountType.Xhs) {
- currChooseAccount.pubParams.diffParams![
- AccountType.Xhs
- ]!.topicsDetail =
- (newValue as any[]).map((v) => {
- return {
- topicId: `${v.value}`,
- topicName: v.label,
- };
- }) || [];
- }
setOnePubParams(
{
- topics: (newValue as any[]).map((v) => {
- return {
- label: v.label,
- value: v.value,
- };
- }),
+ topics: (newValue as ValueType[]).map((v) => v.label),
diffParams: {
...currChooseAccount.pubParams.diffParams,
},
diff --git a/src/views/publish/children/videoPage/useVideoPageStore.ts b/src/views/publish/children/videoPage/useVideoPageStore.ts
index 3dabb0c7..d687dec6 100644
--- a/src/views/publish/children/videoPage/useVideoPageStore.ts
+++ b/src/views/publish/children/videoPage/useVideoPageStore.ts
@@ -45,9 +45,7 @@ const store: IVideoPageStore = {
topics: [],
timingTime: undefined,
diffParams: {
- [AccountType.Xhs]: {
- topicsDetail: [],
- },
+ [AccountType.Xhs]: {},
[AccountType.Douyin]: {
hotPoint: undefined,
selfDeclare: undefined,
diff --git a/src/views/publish/children/videoPage/videoPage.d.ts b/src/views/publish/children/videoPage/videoPage.d.ts
index e4fc7463..deeddead 100644
--- a/src/views/publish/children/videoPage/videoPage.d.ts
+++ b/src/views/publish/children/videoPage/videoPage.d.ts
@@ -5,7 +5,6 @@ import { VisibleTypeEnum } from '@@/publish/PublishEnum';
import {
DiffParmasType,
ILableValue,
- TopicsArrType,
} from '../../../../../electron/db/models/video';
import { ILocationDataItem } from '../../../../../electron/main/plat/plat.type';
@@ -19,7 +18,7 @@ export interface IPubParams {
// 查看权限
visibleType?: VisibleTypeEnum;
// 视频话题
- topics?: TopicsArrType;
+ topics?: string[];
// 每个平台的差异性参数
diffParams?: DiffParmasType;
// 位置
diff --git a/src/views/publish/components/PubAccountDetModule.tsx b/src/views/publish/components/PubAccountDetModule.tsx
index 54a8f49f..5cfa97b2 100644
--- a/src/views/publish/components/PubAccountDetModule.tsx
+++ b/src/views/publish/components/PubAccountDetModule.tsx
@@ -7,11 +7,11 @@ import {
useState,
} from 'react';
import styles from './pubAccountDetModule.module.scss';
-import { Alert, Avatar, Button, Modal, Tooltip } from 'antd';
-import { CloseCircleOutlined } from '@ant-design/icons';
+import { Alert, Avatar, Button, Checkbox, message, Modal, Tooltip } from 'antd';
+import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { AccountInfo, AccountPlatInfoMap } from '@/views/account/comment';
import { LoadingOutlined } from '@ant-design/icons';
-import { acpAccountLoginCheck } from '@/icp/account';
+import { accountLogin, acpAccountLoginCheck } from '@/icp/account';
import { AccountStatus } from '../../../../commont/AccountEnum';
export interface IPubAccountDetModuleRef {
@@ -23,21 +23,36 @@ export interface IPubAccountDetModuleProps {
// 待检测的账户
accounts: AccountInfo[];
// 弹框关闭
- onClose: () => void;
+ onClose?: () => void;
// 发布
- onPubClick: () => void;
+ onPubClick?: () => void;
/**
* 检测完成
* @param accounts 检测过后的账户数据
*/
- onDetFinish: (accounts: AccountInfo[]) => void;
+ onDetFinish?: (accounts: AccountInfo[]) => void;
+ // 重新登录完成事件
+ onRestartLoginFinish?: (accounts: AccountInfo) => void;
+ title?: string;
+ tips?: string;
+ // 是否需要footer操作栏
+ isFooter?: boolean;
}
// 发布用户检测
const PubAccountDetModule = memo(
forwardRef(
(
- { accounts, onClose, onPubClick, onDetFinish }: IPubAccountDetModuleProps,
+ {
+ onRestartLoginFinish,
+ accounts,
+ onClose,
+ onPubClick,
+ onDetFinish,
+ title = '发布检测',
+ tips = '以下账号将发布至平台',
+ isFooter = true,
+ }: IPubAccountDetModuleProps,
ref: ForwardedRef<IPubAccountDetModuleRef>,
) => {
const [open, setOpen] = useState(false);
@@ -46,38 +61,57 @@ const PubAccountDetModule = memo(
const [disabledIdSet, setDisabledIdSet] = useState<Set<number>>(
new Set([]),
);
+ const [progress, setProgress] = useState(0);
+ const [isFilterAccountOl, setIsFilterAccountOl] = useState(false);
useEffect(() => {
if (open) {
setDisabledIdSet(new Set([]));
+ setIsFilterAccountOl(false);
}
}, [open]);
+ useEffect(() => {
+ if (disabledIdSet.size === 0) {
+ setIsFilterAccountOl(false);
+ }
+ }, [disabledIdSet]);
+
const close = () => {
if (detLoading) return;
setOpen(false);
- onClose();
+ if (onClose) onClose();
+ };
+
+ const retLoginStatusCore = async (account: AccountInfo) => {
+ const res = await acpAccountLoginCheck(account.type, account.uid);
+ setProgress((prevProgress) => prevProgress + 1);
+ return res;
};
const imperative: IPubAccountDetModuleRef = {
async startDet() {
+ setDisabledIdSet(new Set([]));
setOpen(true);
setDetLoading(true);
const tasks: Promise<AccountInfo>[] = [];
for (let i = 0; i < accounts.length; i++) {
const account = accounts[i];
- tasks.push(acpAccountLoginCheck(account.type, account.uid));
+ tasks.push(retLoginStatusCore(account));
}
const res = await Promise.all(tasks);
- onDetFinish(res);
- setDetLoading(false);
+ setTimeout(() => {
+ if (onDetFinish) onDetFinish(res);
+ setDetLoading(false);
- const disabledIdSet = new Set<number>([]);
- res.map((v) =>
- v.status === AccountStatus.DISABLE ? disabledIdSet.add(v.id) : '',
- );
- setDisabledIdSet(disabledIdSet);
+ const disabledIdSet = new Set<number>([]);
+ res.map((v) =>
+ v.status === AccountStatus.DISABLE ? disabledIdSet.add(v.id) : '',
+ );
+ setDisabledIdSet(disabledIdSet);
+ setProgress(0);
+ }, 100);
},
};
useImperativeHandle(ref, () => imperative);
@@ -85,7 +119,7 @@ const PubAccountDetModule = memo(
return (
<Modal
width={500}
- title="发布检测"
+ title={title}
maskClosable={false}
open={open}
onCancel={close}
@@ -95,68 +129,111 @@ const PubAccountDetModule = memo(
<div className="pubAccountDetModule-tips">
{!detLoading ? (
disabledIdSet.size === 0 ? (
- `以下账号将发布至平台`
+ `${tips}`
) : (
- <Alert message="账号登录状态失效" type="error" showIcon />
+ <Alert
+ message={
+ <div className={styles.loginStatusDisable}>
+ <span>账号登录状态失效,点击账户重新登录</span>
+ <Checkbox
+ checked={isFilterAccountOl}
+ onChange={(e) =>
+ setIsFilterAccountOl(e.target.checked)
+ }
+ >
+ 过滤在线账户
+ </Checkbox>
+ </div>
+ }
+ type="error"
+ showIcon
+ />
)
) : (
<>
- 正在检测发布状态
+ 正在检测账号状态 {progress} / {accounts.length}
<LoadingOutlined />
</>
)}
</div>
<div className="pubAccountDetModule-accounts">
- {accounts.map((v) => {
- return (
- <div
- className="pubAccountDetModule-accounts-account"
- key={v.id}
- >
- <div className="pubAccountDetModule-accounts-avatar">
- <Avatar src={v.avatar} />
- <img
- className="pubAccountDetModule-accounts-avatar-plat"
- src={AccountPlatInfoMap.get(v.type)?.icon}
- />
- </div>
- <Tooltip title={v.nickname}>
- <div
- className={[
- 'pubAccountDetModule-accounts-name',
- disabledIdSet.has(v.id)
- ? 'pubAccountDetModule-accounts-disable'
- : '',
- ].join(' ')}
- >
- <div className="pubAccountDetModule-accounts-name-wrapper">
- <CloseCircleOutlined />
- <span>{v.nickname}</span>
- </div>
+ {accounts
+ .filter((v) =>
+ isFilterAccountOl
+ ? disabledIdSet.has(v.id) && !detLoading
+ : true,
+ )
+ .map((v) => {
+ return (
+ <div
+ className="pubAccountDetModule-accounts-account"
+ style={{
+ cursor: disabledIdSet.has(v.id) ? 'pointer' : 'auto',
+ }}
+ key={v.id}
+ onClick={async () => {
+ if (disabledIdSet.has(v.id)) {
+ const res = await accountLogin(v.type);
+ if (!res) return;
+ message.success('登录成功!');
+ if (onRestartLoginFinish) onRestartLoginFinish(res);
+ setDisabledIdSet((prevState) => {
+ const newState = new Set<number>(prevState);
+ newState.delete(res.id);
+ return newState;
+ });
+ }
+ }}
+ >
+ <div className="pubAccountDetModule-accounts-avatar">
+ <Avatar src={v.avatar} />
+ <img
+ className="pubAccountDetModule-accounts-avatar-plat"
+ src={AccountPlatInfoMap.get(v.type)?.icon}
+ />
</div>
- </Tooltip>
- </div>
- );
- })}
+ <Tooltip title={v.nickname}>
+ <div
+ className={[
+ 'pubAccountDetModule-accounts-name',
+ disabledIdSet.has(v.id) &&
+ 'pubAccountDetModule-accounts-disable',
+ !disabledIdSet.has(v.id) &&
+ !detLoading &&
+ 'pubAccountDetModule-accounts-ol',
+ ].join(' ')}
+ >
+ <div className="pubAccountDetModule-accounts-name-wrapper">
+ <CloseCircleOutlined className="pubAccountDetModule-accounts-disable-icon" />
+ <CheckCircleOutlined className="pubAccountDetModule-accounts-ol-icon" />
+ <span>{v.nickname}</span>
+ </div>
+ </div>
+ </Tooltip>
+ </div>
+ );
+ })}
</div>
</div>
- <div style={{ display: 'flex', justifyContent: 'right' }}>
- <Button style={{ marginRight: '10px' }} onClick={close}>
- 取消
- </Button>
- <Button
- type="primary"
- loading={detLoading}
- disabled={disabledIdSet.size !== 0}
- onClick={() => {
- setOpen(false);
- onPubClick();
- }}
- >
- 发布至平台
- </Button>
- </div>
+ {isFooter && (
+ <div style={{ display: 'flex', justifyContent: 'right' }}>
+ <Button style={{ marginRight: '10px' }} onClick={close}>
+ 取消
+ </Button>
+ <Button
+ type="primary"
+ loading={detLoading}
+ disabled={disabledIdSet.size !== 0}
+ onClick={() => {
+ setOpen(false);
+ if (onPubClick) onPubClick();
+ }}
+ >
+ 发布至平台
+ </Button>
+ </div>
+ )}
</Modal>
);
},
diff --git a/src/views/publish/components/pubAccountDetModule.module.scss b/src/views/publish/components/pubAccountDetModule.module.scss
index 47ebd429..5f3838e8 100644
--- a/src/views/publish/components/pubAccountDetModule.module.scss
+++ b/src/views/publish/components/pubAccountDetModule.module.scss
@@ -50,11 +50,22 @@
}
}
&-disable {
- color: #ff4d4f;
- .anticon {
+ color: var(--errerColor);
+ .pubAccountDetModule-accounts-disable-icon {
+ display: inline-block;
+ }
+ }
+ &-ol {
+ color: var(--successColor);
+ .pubAccountDetModule-accounts-ol-icon {
display: inline-block;
}
}
}
}
-}
\ No newline at end of file
+}
+
+.loginStatusDisable {
+ display: flex;
+ justify-content: space-between;
+}