Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
style: 打包的类型修复
牛文政5bdf9a1a50b8
diff --git a/electron/main/plat/platforms/Kwai/index.ts b/electron/main/plat/platforms/Kwai/index.tsindex 60669e15..55595d83 100644--- a/electron/main/plat/platforms/Kwai/index.ts+++ b/electron/main/plat/platforms/Kwai/index.ts@@ -386,6 +386,20 @@ export class Kwai extends PlatformBase {}),};}++ /**+ * 点赞+ */+ dianzanDyOther(account: AccountModel, pcursor?: string): Promise<any> {+ return new Promise((resolve, reject) => {});+ }++ /**+ * 收藏+ */+ shoucangDyOther(account: AccountModel, pcursor?: string): Promise<any> {+ return new Promise((resolve, reject) => {});+ }}const kwai = new Kwai();diff --git a/electron/main/plat/platforms/wxSph/index.ts b/electron/main/plat/platforms/wxSph/index.tsindex ae994c57..e8c2f7c5 100644--- a/electron/main/plat/platforms/wxSph/index.ts+++ b/electron/main/plat/platforms/wxSph/index.ts@@ -395,6 +395,20 @@ export class WxSph extends PlatformBase {}),};}++ /**+ * 点赞+ */+ dianzanDyOther(account: AccountModel, pcursor?: string): Promise<any> {+ return new Promise((resolve, reject) => {});+ }++ /**+ * 收藏+ */+ shoucangDyOther(account: AccountModel, pcursor?: string): Promise<any> {+ return new Promise((resolve, reject) => {});+ }}const wxSph = new WxSph();diff --git a/src/router/index.tsx b/src/router/index.tsxindex fc6157e5..cf5590ac 100644--- a/src/router/index.tsx+++ b/src/router/index.tsx@@ -46,7 +46,6 @@ import UserWalletRecord from '@/views/finance/userWalletRecord';import Reply from '@/views/reply';import Replyother from '@/views/replyother';import ErrorBoundary from '../components/ErrorBoundary/ErrorBoundary';-import AutoRun from '@/views/autoRun';interface IRouterMeta {// 路由名称@@ -127,11 +126,6 @@ export const router: CustomRouteObject[] = [element: <Replyother />,meta: { name: '评他人', icon: MessageOutlined },},- {- path: '/autoRun',- element: <AutoRun />,- meta: { name: '自动化', icon: MessageOutlined },- },{path: '/statistics',element: <Statistics />,diff --git a/src/views/autoRun/comment.ts b/src/views/autoRun/comment.tsdeleted file mode 100644index 6b29fc62..00000000--- a/src/views/autoRun/comment.ts+++ /dev/null@@ -1,12 +0,0 @@-/*- * @Author: nevin- * @Date: 2025-03-18 21:08:32- * @LastEditTime: 2025-03-19 07:32:45- * @LastEditors: nevin- * @Description:- */-import { AutoRunType } from '@/icp/autoRun';--export const AutoRunNameMap = new Map<AutoRunType, string>([- [AutoRunType.ReplyComment, '自动回复评论'],-]);diff --git a/src/views/autoRun/index.tsx b/src/views/autoRun/index.tsxdeleted file mode 100644index c208e94a..00000000--- a/src/views/autoRun/index.tsx+++ /dev/null@@ -1,107 +0,0 @@-/*- * @Author: nevin- * @Date: 2025-02-10 22:20:15- * @LastEditTime: 2025-03-24 14:03:36- * @LastEditors: nevin- * @Description: 评论页面 reply- */-import { Button, Card, Col, Row } from 'antd';-import { useCallback, useState } from 'react';-import AccountSidebar from '../account/components/AccountSidebar/AccountSidebar';-import styles from './reply.module.scss';-import {- AutoRun,- AutoRunRecord,- ipcCreateAutoRunRecord,- ipcGetAutoRunList,- ipcGetAutoRunRecordList,-} from '@/icp/autoRun';-import { AutoRunNameMap } from './comment';--export default function Page() {- const [autoRunList, setAutoRunList] = useState<AutoRun[]>([]);- const [autoRunRecordList, setAutoRunRecordList] = useState<AutoRunRecord[]>(- [],- );- const [activeAccountId, setActiveAccountId] = useState<number>(-1);-- async function getAutoRunList() {- setAutoRunList([]);- const res = await ipcGetAutoRunList();- setAutoRunList(res);- }-- async function getAutoRunRecordList() {- setAutoRunRecordList([]);- const res = await ipcGetAutoRunRecordList();- setAutoRunRecordList(res);- }-- /**- * 运行- */- async function runAutoRun(data: AutoRun) {- const res = await ipcCreateAutoRunRecord(data.id);- console.log('------ res', res);- }-- return (- <div className={styles.reply}>- <Button- type="primary"- onClick={() => {- getAutoRunList();- }}- >- 获取列表- </Button>- <Row>- <Col span={4}>- <AccountSidebar- activeAccountId={activeAccountId}- onAccountChange={useCallback(- (info) => {- setActiveAccountId(info.id);- getAutoRunList();- },- [getAutoRunList],- )}- />- </Col>- <Col span={10}>- <div>- {autoRunList.map((item) => (- <Card- key={item.id}- style={{ width: 300 }}- actions={[- <Button type="primary" onClick={() => runAutoRun(item)}>- 执行- </Button>,- <Button type="primary">删除</Button>,- <Button type="primary" onClick={() => getAutoRunRecordList()}>- 查看记录- </Button>,- ]}- >- <Card.Meta- title={AutoRunNameMap.get(item.type) || '无'}- description={item.cycleType}- />- </Card>- ))}- </div>- </Col>- <Col span={10}>- <div>- {autoRunRecordList.map((item) => (- <Card key={item.id} style={{ width: 300 }}>- {item.cycleType}- </Card>- ))}- </div>- </Col>- </Row>- </div>- );-}diff --git a/src/views/autoRun/reply.module.scss b/src/views/autoRun/reply.module.scssdeleted file mode 100644index be859e55..00000000--- a/src/views/autoRun/reply.module.scss+++ /dev/null@@ -1,5 +0,0 @@-.reply {- height: 100%;- :global {- }-}\ No newline at end of filediff --git a/src/views/publish/children/pubRecord/page.tsx b/src/views/publish/children/pubRecord/page.tsxindex 7e48f4e0..658ef8bf 100644--- a/src/views/publish/children/pubRecord/page.tsx+++ b/src/views/publish/children/pubRecord/page.tsx@@ -48,10 +48,10 @@ export const ImageView = ({>{imgFile && <Image src={imgFile.imgUrl} height={height} width={width} />}<span- title={getFilePathName(prm.videoPath)}+ title={getFilePathName(prm.videoPath!)}className="pubRecord-pubCon-name">- {getFilePathName(prm.videoPath)}+ {getFilePathName(prm.videoPath!)}</span></div>);diff --git a/src/views/publish/children/videoPage/useVideoPageStore.ts b/src/views/publish/children/videoPage/useVideoPageStore.tsindex 5e85cd8d..da9f6260 100644--- a/src/views/publish/children/videoPage/useVideoPageStore.ts+++ b/src/views/publish/children/videoPage/useVideoPageStore.ts@@ -366,7 +366,7 @@ export const useVideoPageStore = create(async restartPub(pubRecordList: VideoModel[],accounts: AccountInfo[],- pubRecord: PubRecordModel,+ pubRecord?: PubRecordModel,) {set({loadingPageLoading: true,@@ -385,8 +385,8 @@ export const useVideoPageStore = create(try {methods.setOperateId();- if (pubRecord.commonCoverPath) {- const cover = await getImgFile(pubRecord.commonCoverPath);+ if (pubRecord!.commonCoverPath) {+ const cover = await getImgFile(pubRecord!.commonCoverPath);commonPubParams = {...pubRecord,cover,