Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 1. 抖音发布接口换成v2。2. 抖音发布实现了:自主声明、作品活动奖励、关联热点、修复描述不显示问题
gaoSire4a84427627f
diff --git a/commont/publish/PublishEnum.ts b/commont/publish/PublishEnum.tsindex c249f32a..08cab26b 100644--- a/commont/publish/PublishEnum.ts+++ b/commont/publish/PublishEnum.ts@@ -13,20 +13,3 @@ export enum VisibleTypeEnum {// 好友可见Friend = 3,}--// 抖音自主声明-export enum DouyinDeclareEnum {- // 内容自行拍摄- Self = 1,- // 内容取材网络- Network = 2,- // 内容由AI生成- AI = 3,- // 可能引人不适- Uncomfortable = 4,- // 虚构演绎,仅供娱乐- Fiction = 5,- // 危险行为,请勿模仿- Danger = 6,-}-diff --git a/electron/db/models/video.ts b/electron/db/models/video.tsindex a5588a84..79ae204f 100644--- a/electron/db/models/video.ts+++ b/electron/db/models/video.ts@@ -7,12 +7,10 @@*/import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';import { WorkData } from './workData';-import {- DouyinDeclareEnum,- VisibleTypeEnum,-} from '../../../commont/publish/PublishEnum';+import { VisibleTypeEnum } from '../../../commont/publish/PublishEnum';import { AccountType } from '../../../commont/AccountEnum';import type { ILocationDataItem, WxSphEvent } from '../../main/plat/plat.type';+import { DeclarationDouyin } from '../../plat/douyin/common.douyin';// 包含一个name和一个value的对象export interface ILableValue {@@ -32,7 +30,7 @@ export type DiffParmasType = {// 申请关联的活动activitys?: ILableValue[];// 自主声明- selfDeclare?: DouyinDeclareEnum;+ selfDeclare?: DeclarationDouyin;};[AccountType.WxSph]?: {// 是否为原创diff --git a/electron/main/plat/platforms/douyin/index.ts b/electron/main/plat/platforms/douyin/index.tsindex 2c87312e..4a4a26d9 100644--- a/electron/main/plat/platforms/douyin/index.ts+++ b/electron/main/plat/platforms/douyin/index.ts@@ -140,14 +140,31 @@ export class Douyin extends PlatformBase {callback: VideoCallbackType,): Promise<PublishVideoResult> {return new Promise(async (resolve) => {+ const douyinParams = params.diffParams![AccountType.Douyin];+const result = await douyinService.publishVideoWorkApi(JSON.stringify(params.cookies),params.other!,params.videoPath,{+ userDeclare: douyinParams?.selfDeclare,+ activity: douyinParams?.activitys?.map((v) => {+ return {+ label: v.label,+ value: `${v.value}`,+ };+ }),+ hot_sentence: douyinParams?.hotPoint?.label,+ mentionedUserInfo: params.mentionedUserInfo?.map((v) => {+ return {+ nickName: v.label,+ uid: `${v.value}`,+ };+ }),title: params.title,topics: params.topics,+ caption: params.desc,cover: params.coverPath,timingTime: params.timingTime?.getTime(),// 可见性diff --git a/electron/plat/douyin/common.douyin.ts b/electron/plat/douyin/common.douyin.tsnew file mode 100644index 00000000..820e2c6c--- /dev/null+++ b/electron/plat/douyin/common.douyin.ts@@ -0,0 +1,15 @@+// 自主声明+export enum DeclarationDouyin {+ // 内容由AI生成+ AIGC = 'aigc',+ // 可能会引人不适+ MaybeUnsuitable = 'maybe_unsuitable',+ // 虚拟作品。仅供娱乐+ OnlyFunNew = 'only_fun_new',+ // 危险行为,请勿模仿+ DangerousBehavior = 'dangerous_behavior',+ // 内容自行拍摄+ SelfShoot = 'self_shoot',+ // 内容取材网络+ FromNetV3 = 'from_net_v3',+}diff --git a/electron/plat/douyin/index.ts b/electron/plat/douyin/index.tsindex a1525c78..a0805ef2 100644--- a/electron/plat/douyin/index.ts+++ b/electron/plat/douyin/index.ts@@ -21,6 +21,45 @@ import {} from './douyin.type';import requestNet from '../requestNet';import { jsonToQueryString } from '../../util';+import { DeclarationDouyin } from './common.douyin';++type PlatformSettingType = {+ // 自主声明+ userDeclare?: DeclarationDouyin;+ // 合集+ mixInfo?: {+ mixId: string;+ mixName: string;+ };+ // 关联热点,传热点中文名称即可+ hot_sentence?: string;+ // 活动+ activity?: {+ value: string;+ label: string;+ }[];+ // @用户+ mentionedUserInfo?: {+ nickName: string;+ uid: string;+ }[];+ // 标题+ title: string;+ // 描述+ caption?: string;+ topics?: string[];+ cover: string;+ timingTime?: number;+ // 0 公共 1 私密 2 好友+ visibility_type: 0 | 1 | 2;+ // 地址+ poiInfo?: {+ poiId: string;+ poiName: string;+ };+ // 背景音乐+ musicId?: string;+};export class DouyinService {private defaultUserAgent =@@ -39,6 +78,8 @@ export class DouyinService {private getCsrfTokenUrl ='https://creator.douyin.com/web/api/media/anchor/search';private publishUrl = 'https://creator.douyin.com/web/api/media/aweme/create/';+ private publishUrlV2 =+ 'https://creator.douyin.com/web/api/media/aweme/create_v2/';private getUploadImageProofUrl = 'https://imagex.bytedanceapi.com/';private windowName = 'douyin';private cookieCheckField = 'sessionid';@@ -466,19 +507,7 @@ export class DouyinService {cookies: string,tokens: any,filePath: string,- platformSetting: {- title: string;- topics: string[];- cover: string;- timingTime?: number;- // 0 公共 1 私密 2 好友- visibility_type: 0 | 1 | 2;- // 地址- poiInfo?: {- poiId: string;- poiName: string;- };- },+ platformSetting: PlatformSettingType,callback: (progress: number, msg?: string) => void,): Promise<any> {console.log('开始发布视频作品,参数:', platformSetting);@@ -519,13 +548,14 @@ export class DouyinService {// 发布视频参数console.log('开始获取发布参数...');- const publishVideoParams = this.getPublishPublicParams(platformSetting);+ const publishVideoParams =+ this.getPublishPublicParamsV2(platformSetting);console.log('发布参数:', publishVideoParams);callback(55, '参数获取完成');// 拼接视频封面内容- publishVideoParams.video_id = videoId;- publishVideoParams.poster = poster;+ publishVideoParams.item.common.video_id = videoId;+ publishVideoParams.item.cover.poster = poster;console.log('完整的发布参数:', publishVideoParams);// 获取csrf-token@@ -548,20 +578,21 @@ export class DouyinService {// 发布视频console.log(`[${new Date().toLocaleString()}] 开始发布视频请求...`,- this.publishUrl,+ this.publishUrlV2,);console.log(`[${new Date().toLocaleString()}] 发布参数:`,publishVideoParams,);- const publishResult = await this.makePublishRequest(this.publishUrl, {+ const publishResult = await requestNet({+ url: this.publishUrlV2,method: 'POST',headers: {Cookie: cookieString,'X-Secsdk-Csrf-Token': csrfToken,...bdTicketHeaders,},- data: publishVideoParams,+ body: publishVideoParams,});callback(100, '发布完成');console.log(@@ -578,20 +609,20 @@ export class DouyinService {}if (- !publishResult.hasOwnProperty('status_code') ||- publishResult.status_code !== 0+ !publishResult.data.hasOwnProperty('status_code') ||+ publishResult.data.status_code !== 0) {console.error(`[${new Date().toLocaleString()}] 发布失败,状态码异常:`,- publishResult.status_code,+ publishResult.data.status_code,);- reject(publishResult.status_msg || '发布失败,账号可能已掉线!');+ reject(publishResult.data.status_msg || '发布失败,账号可能已掉线!');return false;}const response = {publishTime: Math.floor(Date.now() / 1000),- publishId: publishResult.aweme.aweme_id,+ publishId: publishResult.data.item_id,shareLink: '',};console.log(@@ -704,18 +735,6 @@ export class DouyinService {publishImgParams,);- // publishImgParams = {- // text: '这是一条Test作品#立夏 #二十四节气 ',- // text_extra: [{"start":10,"type":1,"hashtag_name":"立夏","hashtag_id":0,"user_id":"","caption_start":0,"caption_end":0,"end":13},{"start":14,"type":1,"hashtag_name":"二十四节气","hashtag_id":0,"user_id":"","caption_start":0,"caption_end":0,"end":20}],- // mentions: [],- // visibility_type: 0,- // download: 1,- // images: [{"uri":"tos-cn-i-jm8ajry58r/f6048854aa284085bb9e681e1051df45","width":613,"height":348},{"uri":"tos-cn-i-jm8ajry58r/c2958370a35f483e8031b97d48375e01","width":613,"height":348}]- // }- // console.log(`[${new Date().toLocaleString()}] 完整的发布参数:`, publishImgParams);-- // return;-// 获取csrf-tokenconsole.log(`[${new Date().toLocaleString()}] 开始获取csrf-token...`);const csrfToken = await this.getSecsdkCsrfToken(cookieString);@@ -1269,7 +1288,6 @@ export class DouyinService {const cookies = await session.fromPartition(partition).cookies.get({});- console.log('获取到的cookies:', cookies);const alreadyLogin = cookies.some((item) =>item.name.includes(this.cookieCheckField),@@ -1673,14 +1691,103 @@ export class DouyinService {});}+ // 发布视频、v2 api参数处理+ private getPublishPublicParamsV2(platformSetting: PlatformSettingType) {+ console.log('platformSetting:', platformSetting);+ const parmasDisposeOK = this.getPublishPublicParams(platformSetting);++ const params = {+ item: {+ anchor: parmasDisposeOK.hasOwnProperty('poi_id')+ ? {+ anchor_content: JSON.stringify({+ is_commerce_intention: false,+ }),+ poi_id: parmasDisposeOK.poi_id,+ poi_name: parmasDisposeOK.poi_name,+ }+ : {},+ assistant: {+ is_post_assistant: 1,+ is_preview: 0,+ },+ chapter: {+ chapter: JSON.stringify({+ chapter_abstract: '',+ chapter_details: [],+ chapter_type: 0,+ chapter_tools_info: {+ chapter_recommend_detail: [],+ chapter_recommend_abstract: '',+ chapter_source: 2,+ chapter_recommend_type: -2,+ create_date: 1741767807,+ is_pc: '1',+ is_pre_generated: '0',+ is_syn: '1',+ },+ }),+ },+ common: {+ // 活动+ activity: parmasDisposeOK.activity,+ text: parmasDisposeOK.text,+ item_title: parmasDisposeOK.item_title,+ text_extra: JSON.stringify(parmasDisposeOK.text_extra),+ // 挑战+ challenges: JSON.stringify([]),+ creation_id: '',+ // 是否允许下载+ download: 1,+ hashtag_source: 'recommend/recommend/recommend',+ // 热点中文+ hot_sentence: platformSetting.hot_sentence,+ // 标题+ media_type: 4,+ mentions: JSON.stringify(parmasDisposeOK.mentions),+ music_id: '',+ video_id: '',+ music_source: 0,+ // 定时,+ timing: parmasDisposeOK.timing,+ // 可见性+ visibility_type: platformSetting['visibility_type'],+ },+ cover: {+ cover_text: null,+ cover_text_uri: null,+ cover_tools_extend_info: '{}',+ cover_tools_info: JSON.stringify({}),+ poster: '',+ poster_delay: 0,+ },+ declare: platformSetting.userDeclare+ ? {+ user_declare_info: JSON.stringify({+ // 内容由AI生成+ choose_value: platformSetting.userDeclare,+ }),+ }+ : {},+ mix: {},+ open_platform: {},+ sync: {+ should_sync: false,+ sync_to_toutiao: 0,+ },+ },+ };+ return params;+ }+/*** 获取视频|图文公共发布参数* @param platformSetting 平台设置参数*/- private getPublishPublicParams(platformSetting: any): any {+ private getPublishPublicParams(platformSetting: PlatformSettingType): any {console.log('开始处理发布参数...');- // 处理标题- let text = platformSetting['title'] ?? '';+ // 处理描述+ let text = `${platformSetting['title'] || ''} ${platformSetting['caption'] || ''}`;// 标题扩展属性const textExtra = [];// @好友参数@@ -1688,11 +1795,14 @@ export class DouyinService {// 处理话题if (- platformSetting.hasOwnProperty('topics') &&- platformSetting.topics?.length > 0+ (platformSetting.topics && platformSetting.topics?.length > 0) ||+ (platformSetting.activity && platformSetting.activity?.length > 0)) {console.log('处理话题标签...');- for (const topic of platformSetting.topics) {+ for (const topic of [+ ...(platformSetting.topics || []),+ ...(platformSetting.activity?.map((v) => v.label) || []),+ ]) {// 扩展属性追加话题位置const extraItem = {start: text.length,@@ -1716,6 +1826,7 @@ export class DouyinService {// 处理@好友if (platformSetting.hasOwnProperty('mentionedUserInfo') &&+ platformSetting.mentionedUserInfo &&platformSetting.mentionedUserInfo?.length > 0) {console.log('处理@好友...');@@ -1732,10 +1843,10 @@ export class DouyinService {caption_end: 0,};// 标题追加@好友- text += `@${userInfo.nickName} `;+ text += ` @${userInfo.nickName}`;// 计算话题结束位置// @ts-ignore- extraItem.end = text.length - 1;+ extraItem.end = text.length;// 追加到扩展属性textExtra.push(extraItem);// 追加到@好友@@ -1747,12 +1858,15 @@ export class DouyinService {// 整合发布参数const publishParams = {item_title: platformSetting['title'] ?? '',- text: text,+ text,text_extra: textExtra,mentions: mentions,// 0 公共 1 私密 2 好友visibility_type: platformSetting['visibility_type'],download: 1,+ activity: JSON.stringify(+ platformSetting.activity?.map((v) => v.value) || [],+ ),};// 处理合集@@ -1794,6 +1908,7 @@ export class DouyinService {// 处理定时if (platformSetting.hasOwnProperty('timingTime') &&+ platformSetting.timingTime &&platformSetting.timingTime > Date.now()) {console.log('处理定时发布...');diff --git a/electron/plat/requestNet.ts b/electron/plat/requestNet.tsindex 93d15441..d8869d26 100644--- a/electron/plat/requestNet.ts+++ b/electron/plat/requestNet.ts@@ -48,7 +48,7 @@ const requestNet = <T = any>({parsedData = JSON.parse(data);} catch (e) {parsedData = undefined as any;- console.error(e);+ console.log(e);}resolve({status: response.statusCode,diff --git a/package-lock.json b/package-lock.jsonindex 48d451a1..8b0fd191 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,11 +1,11 @@{- "name": "ktt-app",+ "name": "att","version": "0.1.2","lockfileVersion": 2,"requires": true,"packages": {"": {- "name": "ktt-app",+ "name": "att","version": "0.1.2","license": "MIT","dependencies": {@@ -30,6 +30,7 @@"events": "^3.3.0","ffprobe-static": "^3.1.0","fluent-ffmpeg": "^2.1.3",+ "fs": "^0.0.1-security","image-size": "^1.2.0","lodash": "^4.17.21","mime-types": "^2.1.35",@@ -6405,6 +6406,12 @@"node": ">= 0.6"}},+ "node_modules/fs": {+ "version": "0.0.1-security",+ "resolved": "https://registry.npmmirror.com/fs/-/fs-0.0.1-security.tgz",+ "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==",+ "license": "ISC"+ },"node_modules/fs-constants": {"version": "1.0.0","resolved": "https://registry.npmmirror.com/fs-constants/-/fs-constants-1.0.0.tgz",@@ -17926,6 +17933,11 @@"resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz","integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="},+ "fs": {+ "version": "0.0.1-security",+ "resolved": "https://registry.npmmirror.com/fs/-/fs-0.0.1-security.tgz",+ "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="+ },"fs-constants": {"version": "1.0.0","resolved": "https://registry.npmmirror.com/fs-constants/-/fs-constants-1.0.0.tgz",diff --git a/src/components/WebView/index.tsx b/src/components/WebView/index.tsxindex 566414fd..2685e6bf 100644--- a/src/components/WebView/index.tsx+++ b/src/components/WebView/index.tsx@@ -50,7 +50,8 @@ const WebView: React.FC<WebViewProps> = ({ url, cookieParams }) => {<Spin spinning={loading} tip="加载中..."><webviewref={webviewRef}- src={!loading ? url : 'www.baidu.com'}+ src={url}+ key={loading ? 0 : 1}webpreferences="sandbox"style={{ width: '100%', height: '100%' }}partition={partitionId.current}diff --git a/src/icp/publish.ts b/src/icp/publish.tsindex 513a5ebd..5189f506 100644--- a/src/icp/publish.ts+++ b/src/icp/publish.ts@@ -47,6 +47,7 @@ export async function icpCreatePubRecord(pubRecord: Partial<PubRecordModel>) {* @param pubRecord*/export async function icpCreateVideoPubRecord(pubRecord: Partial<VideoPul>) {+ console.log(pubRecord);const { topics, cleanedString } = parseTopicString(pubRecord.desc || '');pubRecord.topics = [...new Set(pubRecord.topics?.concat(topics))];pubRecord.desc = cleanedString;diff --git a/src/views/account/components/AccountSidebar/AccountSidebar.tsx b/src/views/account/components/AccountSidebar/AccountSidebar.tsxindex 759e4711..2c62c9c0 100644--- a/src/views/account/components/AccountSidebar/AccountSidebar.tsx+++ b/src/views/account/components/AccountSidebar/AccountSidebar.tsx@@ -16,7 +16,11 @@ import {} from '../../../../icp/account';import AddAccountModal from '../AddAccountModal';import { AccountStatus } from '../../../../../commont/AccountEnum';-import { CheckCircleOutlined, WarningOutlined } from '@ant-design/icons';+import {+ CheckCircleOutlined,+ UserOutlined,+ WarningOutlined,+} from '@ant-design/icons';import useCssVariables from '../../../../hooks/useCssVariables';import { onAccountLoginFinish } from '../../../../icp/receiveMsg';import PubAccountDetModule, {@@ -157,6 +161,7 @@ const AccountSidebar = memo(style={{ margin: '10px 0' }}onClick={() => setIsAccountModalOpen(true)}>+ <UserOutlined />添加账号</Button></div>diff --git a/src/views/publish/children/pubRecord/page.tsx b/src/views/publish/children/pubRecord/page.tsxindex ea856d84..25f9e88f 100644--- a/src/views/publish/children/pubRecord/page.tsx+++ b/src/views/publish/children/pubRecord/page.tsx@@ -84,6 +84,7 @@ export default function Page() {const res = await icpGetPubVideoRecord(prm.id);setRecordLoaidng(false);setPubRecordList(res);+ console.log(res);}}>详情diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsxindex 6100fb53..30dc5492 100644--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx@@ -225,7 +225,7 @@ const VideoPubSetModal = memo(条,失败 {okRes.length - successList.length} 条</>),- duration: 10000,+ showProgress: true,btn: (<Space><Buttondiff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsxindex d469f103..ebb1c6b6 100644--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsx+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsx@@ -10,10 +10,10 @@ import {IVideoPubSetModalChildProps,IVideoPubSetModalChildRef,} from '@/views/publish/children/videoPage/components/VideoPubSetModal/videoPubSetModal.type';-import { Button, Input, Modal, Radio, Select, Spin } from 'antd';+import { Button, Input, Modal, Radio, Select, Spin, Tooltip } from 'antd';import { useVideoPageStore } from '@/views/publish/children/videoPage/useVideoPageStore';import { useShallow } from 'zustand/react/shallow';-import { DouyinDeclareEnum, VisibleTypeEnum } from '@@/publish/PublishEnum';+import { VisibleTypeEnum } from '@@/publish/PublishEnum';import TopicSelect from '@/views/publish/children/videoPage/components/VideoPubSetModal/components/TopicSelect';import LocationSelect from '@/views/publish/children/videoPage/components/VideoPubSetModal/components/LocationSelect';import { AccountType } from '@@/AccountEnum';@@ -40,6 +40,8 @@ import { describeNumber } from '@/utils';import { onAccountLoginFinish } from '@/icp/receiveMsg';import UserSelect from '../components/UserSelect';import { AccountPlatInfoMap } from '../../../../../../account/comment';+import { DeclarationDouyin } from '../../../../../../../../electron/plat/douyin/common.douyin';+import { QuestionCircleOutlined } from '@ant-design/icons';const { TextArea } = Input;@@ -70,7 +72,12 @@ const HotspotSelect = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {return (<>- <h1>申请关联热点</h1>+ <h1>+ 申请关联热点+ <Tooltip title="你可以申请和一个热点做关联,如果视频确实和热点非常相关,将会进入抖音热点榜,若不相关则不会生效。">+ <QuestionCircleOutlined style={{ marginLeft: '2px' }} />+ </Tooltip>+ </h1><SelectshowSearchallowClear@@ -91,7 +98,7 @@ const HotspotSelect = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {return (<div className={styles.hotspotSelect}><div className="hotspotSelect-left">- <img src={data.word_cover.url_list[0]} />+ <img src={data.word_cover?.url_list[0]} /><span>{data.word}</span></div><div className="hotspotSelect-right">@@ -213,7 +220,12 @@ const ActivitySelect = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {</Spin></Modal>- <h1>活动奖励</h1>+ <h1>+ 活动奖励+ <Tooltip title="添加活动将有机会获得流量奖励">+ <QuestionCircleOutlined style={{ marginLeft: '2px' }} />+ </Tooltip>+ </h1><SelectshowSearch={false}allowClear@@ -274,6 +286,11 @@ const ActivitySelect = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {currChooseAccount.pubParams!.diffParams![AccountType.Douyin]!.activitys}+ onDropdownVisibleChange={() => {+ if (options.length === 0 && currChooseAccount.account?.status === 0) {+ init();+ }+ }}onChange={(newValue) => {const newDiffParams = currChooseAccount.pubParams.diffParams!;newDiffParams[AccountType.Douyin]!.activitys = newValue;@@ -285,6 +302,9 @@ const ActivitySelect = ({ currChooseAccount }: IVideoPubSetModalChildProps) => {);}}/>+ <p className="videoPubSetModal_con-tips">+ 活动奖励 + 话题 最多不能超过五个。+ </p><VideoPubRestartLogin currChooseAccount={currChooseAccount} /></>);@@ -352,6 +372,7 @@ const VideoPubSetModal_KWAI = memo(currChooseAccount={currChooseAccount}tips="最多可添加5个话题(包含活动奖励)"/>+ <ActivitySelect currChooseAccount={currChooseAccount} /><UserSelectcurrChooseAccount={currChooseAccount}@@ -360,8 +381,6 @@ const VideoPubSetModal_KWAI = memo(title="@好友"/>- <ActivitySelect currChooseAccount={currChooseAccount} />-<LocationSelect currChooseAccount={currChooseAccount} /><HotspotSelect {...props} />@@ -382,27 +401,27 @@ const VideoPubSetModal_KWAI = memo(options={[{label: '内容自行拍摄',- value: DouyinDeclareEnum.Self,+ value: DeclarationDouyin.SelfShoot,},{label: '内容取材网络',- value: DouyinDeclareEnum.Network,+ value: DeclarationDouyin.FromNetV3,},{label: '内容由AI生成',- value: DouyinDeclareEnum.AI,+ value: DeclarationDouyin.AIGC,},{label: '可能引人不适',- value: DouyinDeclareEnum.Uncomfortable,+ value: DeclarationDouyin.MaybeUnsuitable,},{label: '虚构演绎,仅供娱乐',- value: DouyinDeclareEnum.Fiction,+ value: DeclarationDouyin.OnlyFunNew,},{label: '危险行为,请勿模仿',- value: DouyinDeclareEnum.Danger,+ value: DeclarationDouyin.DangerousBehavior,},]}onChange={(newValue: any) => {diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsxindex 131bf77c..243d01f3 100644--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx@@ -165,12 +165,7 @@ const VideoPubSetModal_KWAI = memo(onChange={(newValue) => {setOnePubParams({- topics: (newValue as any[]).map((v) => {- return {- label: v.label,- value: v.value,- };- }),+ topics: newValue,},currChooseAccount.id,);diff --git a/src/views/publish/children/videoPage/useVideoPageStore.ts b/src/views/publish/children/videoPage/useVideoPageStore.tsindex d687dec6..48769ee2 100644--- a/src/views/publish/children/videoPage/useVideoPageStore.ts+++ b/src/views/publish/children/videoPage/useVideoPageStore.ts@@ -360,16 +360,19 @@ export const useVideoPageStore = create(const account = accounts[i];const video = await getVideoFile(pubRecord.videoPath!);const cover = await getImgFile(pubRecord.coverPath!);+ const pubParams = {+ ...pubRecord,+ cover: cover,+ describe: pubRecord.desc,+ };+ pubParams.id = undefined;+ pubParams.failMsg = '';videoListChoose.push({id: generateUUID(),account,video,- pubParams: {- ...pubRecord,- cover: cover,- describe: pubRecord.desc,- },+ pubParams,});}diff --git a/yarn.lock b/yarn.lockindex 14a611ec..cb21e170 100644--- a/yarn.lock+++ b/yarn.lock@@ -3097,6 +3097,11 @@ fs.realpath@^1.0.0:resolved "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz"integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==+fs@^0.0.1-security:+ version "0.0.1-security"+ resolved "https://registry.npmmirror.com/fs/-/fs-0.0.1-security.tgz"+ integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==+function-bind@^1.1.2:version "1.1.2"resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz"