Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 抖音调试完毕
牛文政331515bc2adc
diff --git a/electron/main/plat/platforms/douyin/index.ts b/electron/main/plat/platforms/douyin/index.tsindex 7c634029..01d726a8 100644--- a/electron/main/plat/platforms/douyin/index.ts+++ b/electron/main/plat/platforms/douyin/index.ts@@ -238,9 +238,7 @@ export class Douyin extends PlatformBase {text: content,});- console.log('------ res', res);-- return false;+ return res.status === 200 && res.data.status_code === 0;}async replyComment(diff --git a/electron/main/reply/controller.ts b/electron/main/reply/controller.tsindex 889ae3ee..aef7398d 100644--- a/electron/main/reply/controller.ts+++ b/electron/main/reply/controller.ts@@ -37,6 +37,7 @@ export class ReplyController {};const res = await platController.getWorkList(account, pageInfo);+return res;}diff --git a/electron/plat/Kwai/index.ts b/electron/plat/Kwai/index.tsindex 370d771f..7efeb218 100644--- a/electron/plat/Kwai/index.ts+++ b/electron/plat/Kwai/index.ts@@ -412,7 +412,7 @@ class KwaiPub {replyTo?: number; // 798319351;},) {- return await requestNet<CommentAddResponse>({+ const res = await requestNet<CommentAddResponse>({url: 'https://cp.kuaishou.com/rest/cp/creator/comment/add?__NS_sig3=a9b9fecedad12b9d75f4f7f64ed9b1c62cc8608ce8e8eaeae5e4e7fd',method: 'POST',headers: {@@ -425,6 +425,10 @@ class KwaiPub {'kuaishou.web.cp.api_ph': '69799694cfd7e689847219cf678dec275266',},});++ console.log('---- douyin commentAdd ----', res);++ return res;}}diff --git a/electron/plat/douyin/index.ts b/electron/plat/douyin/index.tsindex d0f47453..d40c6f65 100644--- a/electron/plat/douyin/index.ts+++ b/electron/plat/douyin/index.ts@@ -2319,14 +2319,18 @@ export class DouyinService {text: string; //'哈哈哈';},) {- return await requestNet<DouyinNewCommentResponse>({+ const cookieString = CommonUtils.convertCookieToJson(cookie);+ const csrfToken = await this.getSecsdkCsrfToken(cookieString);+ const res = await requestNet<DouyinNewCommentResponse>({url: `https://creator.douyin.com/aweme/v1/creator/comment/reply/`,headers: {- cookie: CookieToString(cookie),+ cookie: cookieString,+ 'X-Secsdk-Csrf-Token': csrfToken,},method: 'POST',body: data,});+ return res;}}diff --git a/electron/plat/xiaohongshu/index.ts b/electron/plat/xiaohongshu/index.tsindex 33005268..a769cafa 100644--- a/electron/plat/xiaohongshu/index.ts+++ b/electron/plat/xiaohongshu/index.ts@@ -1371,7 +1371,7 @@ export class XiaohongshuService {a1: CookieToString(cookie),});- return await requestNet<IXHSGetWorksResponse>({+ const res = await requestNet<IXHSGetWorksResponse>({url: `https://edith.xiaohongshu.com${url}`,headers: {cookie: CookieToString(cookie),@@ -1384,6 +1384,8 @@ export class XiaohongshuService {},method: 'GET',});++ return res;}// 获取@用户列表diff --git a/src/views/reply/components/replyWorks.tsx b/src/views/reply/components/replyWorks.tsxindex eaff1a85..d47a1c0d 100644--- a/src/views/reply/components/replyWorks.tsx+++ b/src/views/reply/components/replyWorks.tsx@@ -54,6 +54,8 @@ const Com = forwardRef<ReplyWorksRef>((props: any, ref) => {imgUrl: workData?.coverUrl,});+ console.log('----- res', res);+form.setFieldsValue({content: res,});@@ -69,6 +71,7 @@ const Com = forwardRef<ReplyWorksRef>((props: any, ref) => {width={800}><Form+ form={form}name="basic"labelCol={{ span: 8 }}wrapperCol={{ span: 16 }}@@ -82,7 +85,7 @@ const Com = forwardRef<ReplyWorksRef>((props: any, ref) => {name="content"rules={[{ required: true, message: '请输入评论!' }]}>- <Input value={formData?.content} />+ <Input /></Form.Item><Form.Item wrapperCol={{ offset: 8, span: 16 }}>