feat(wechat-channel): add draft upload functionality for video channel

- Add isDraft parameter to TencentVideo class to control publishing behavior
- Modify click_publish method to click "保存草稿" instead of "发表" when isDraft is true
- Update post_video_tencent function to accept and pass is_draft parameter
- Add is_draft parameter to /postVideo API endpoint to receive frontend data
- Add "视频号上传草稿" checkbox in frontend that appears only for video channel platform
- Update defaultTabInit to include isDraft property with default value false
- Include isDraft in publishData sent to backend API
- Implement proper URL checking for draft vs publish success confirmation

The new functionality allows users to save WeChat Channel videos as drafts
instead of immediately publishing them when the checkbox is selected.
This commit is contained in:
Deroino
2025-11-13 09:12:39 +08:00
parent c0e7b64b94
commit 81b71d023d
4 changed files with 46 additions and 17 deletions
+2 -1
View File
@@ -363,6 +363,7 @@ def postVideo():
productLink = data.get('productLink', '')
productTitle = data.get('productTitle', '')
thumbnail_path = data.get('thumbnail', '')
is_draft = data.get('isDraft', False) # 新增参数:是否保存为草稿
videos_per_day = data.get('videosPerDay')
daily_times = data.get('dailyTimes')
@@ -376,7 +377,7 @@ def postVideo():
start_days)
case 2:
post_video_tencent(title, file_list, tags, account_list, category, enableTimer, videos_per_day, daily_times,
start_days)
start_days, is_draft)
case 3:
post_video_DouYin(title, file_list, tags, account_list, category, enableTimer, videos_per_day, daily_times,
start_days, thumbnail_path, productLink, productTitle)