cookie状态查询
This commit is contained in:
@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\</_PublishTargetUrl>
|
<_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\</_PublishTargetUrl>
|
||||||
<History>True|2025-12-01T11:27:58.0479456Z||;True|2025-12-01T19:16:02.2288214+08:00||;False|2025-12-01T19:15:56.0372115+08:00||;True|2025-12-01T19:15:16.4854821+08:00||;False|2025-12-01T19:15:06.7001019+08:00||;True|2025-12-01T17:10:38.9739466+08:00||;False|2025-12-01T17:10:18.8928139+08:00||;True|2025-12-01T17:03:59.3171589+08:00||;True|2025-12-01T17:03:12.5681656+08:00||;True|2025-12-01T16:42:51.4415025+08:00||;True|2025-12-01T01:29:59.6975567+08:00||;True|2025-12-01T01:29:45.1898652+08:00||;False|2025-12-01T01:29:33.1787721+08:00||;True|2025-12-01T01:27:33.1297605+08:00||;True|2025-12-01T01:27:27.3976862+08:00||;False|2025-12-01T01:27:20.5193052+08:00||;True|2025-12-01T01:11:11.0210582+08:00||;True|2025-12-01T01:04:04.3307782+08:00||;True|2025-12-01T00:55:49.8018864+08:00||;True|2025-12-01T00:27:25.1323561+08:00||;True|2025-11-30T23:58:20.7284116+08:00||;True|2025-11-30T23:57:58.3027622+08:00||;True|2025-11-30T23:57:43.0829614+08:00||;False|2025-11-30T23:57:33.5606716+08:00||;True|2025-11-30T23:54:29.6203368+08:00||;True|2025-11-30T23:54:27.5383120+08:00||;False|2025-11-30T23:54:17.0823982+08:00||;True|2025-11-30T22:41:11.4538820+08:00||;True|2025-11-30T22:38:19.7064566+08:00||;True|2025-11-30T22:37:35.2889186+08:00||;True|2025-11-30T21:42:31.1408314+08:00||;True|2025-11-30T21:42:19.5385333+08:00||;False|2025-11-30T21:42:13.3290237+08:00||;True|2025-11-30T21:33:28.0806806+08:00||;True|2025-11-30T21:16:56.7088027+08:00||;False|2025-11-30T21:16:46.1444944+08:00||;True|2025-11-30T20:21:24.4059664+08:00||;False|2025-11-30T20:21:17.6006098+08:00||;True|2025-11-30T20:20:08.2030141+08:00||;False|2025-11-30T20:16:12.3608968+08:00||;True|2025-11-30T20:15:35.6048313+08:00||;True|2025-11-30T19:45:18.7229552+08:00||;True|2025-11-30T19:45:08.6083368+08:00||;False|2025-11-30T19:44:54.7824905+08:00||;True|2025-11-30T19:44:17.0179491+08:00||;True|2025-11-30T19:44:06.7073484+08:00||;False|2025-11-30T19:43:58.2896556+08:00||;True|2025-11-30T19:42:08.2261927+08:00||;True|2025-11-30T19:28:15.7115077+08:00||;False|2025-11-30T19:28:10.2280725+08:00||;True|2025-11-30T19:23:31.7859158+08:00||;True|2025-11-30T19:23:20.7788277+08:00||;True|2025-11-30T19:17:11.8583296+08:00||;False|2025-11-30T19:10:41.8369574+08:00||;True|2025-11-30T19:02:08.8184758+08:00||;False|2025-11-30T19:01:59.4711045+08:00||;True|2025-11-30T18:16:01.8372242+08:00||;True|2025-11-30T14:50:31.9356543+08:00||;True|2025-11-30T14:48:27.1833064+08:00||;True|2025-11-30T02:06:06.6099669+08:00||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;True|2025-11-22T22:52:51.7203302+08:00||;True|2025-11-22T22:52:42.9620946+08:00||;True|2025-11-22T22:52:09.8257640+08:00||;True|2025-11-22T22:39:31.5894141+08:00||;</History>
|
<History>True|2025-12-01T13:18:47.2119609Z||;True|2025-12-01T20:51:19.9948301+08:00||;True|2025-12-01T20:50:36.9904697+08:00||;True|2025-12-01T20:44:10.1695142+08:00||;True|2025-12-01T19:27:58.0479456+08:00||;True|2025-12-01T19:16:02.2288214+08:00||;False|2025-12-01T19:15:56.0372115+08:00||;True|2025-12-01T19:15:16.4854821+08:00||;False|2025-12-01T19:15:06.7001019+08:00||;True|2025-12-01T17:10:38.9739466+08:00||;False|2025-12-01T17:10:18.8928139+08:00||;True|2025-12-01T17:03:59.3171589+08:00||;True|2025-12-01T17:03:12.5681656+08:00||;True|2025-12-01T16:42:51.4415025+08:00||;True|2025-12-01T01:29:59.6975567+08:00||;True|2025-12-01T01:29:45.1898652+08:00||;False|2025-12-01T01:29:33.1787721+08:00||;True|2025-12-01T01:27:33.1297605+08:00||;True|2025-12-01T01:27:27.3976862+08:00||;False|2025-12-01T01:27:20.5193052+08:00||;True|2025-12-01T01:11:11.0210582+08:00||;True|2025-12-01T01:04:04.3307782+08:00||;True|2025-12-01T00:55:49.8018864+08:00||;True|2025-12-01T00:27:25.1323561+08:00||;True|2025-11-30T23:58:20.7284116+08:00||;True|2025-11-30T23:57:58.3027622+08:00||;True|2025-11-30T23:57:43.0829614+08:00||;False|2025-11-30T23:57:33.5606716+08:00||;True|2025-11-30T23:54:29.6203368+08:00||;True|2025-11-30T23:54:27.5383120+08:00||;False|2025-11-30T23:54:17.0823982+08:00||;True|2025-11-30T22:41:11.4538820+08:00||;True|2025-11-30T22:38:19.7064566+08:00||;True|2025-11-30T22:37:35.2889186+08:00||;True|2025-11-30T21:42:31.1408314+08:00||;True|2025-11-30T21:42:19.5385333+08:00||;False|2025-11-30T21:42:13.3290237+08:00||;True|2025-11-30T21:33:28.0806806+08:00||;True|2025-11-30T21:16:56.7088027+08:00||;False|2025-11-30T21:16:46.1444944+08:00||;True|2025-11-30T20:21:24.4059664+08:00||;False|2025-11-30T20:21:17.6006098+08:00||;True|2025-11-30T20:20:08.2030141+08:00||;False|2025-11-30T20:16:12.3608968+08:00||;True|2025-11-30T20:15:35.6048313+08:00||;True|2025-11-30T19:45:18.7229552+08:00||;True|2025-11-30T19:45:08.6083368+08:00||;False|2025-11-30T19:44:54.7824905+08:00||;True|2025-11-30T19:44:17.0179491+08:00||;True|2025-11-30T19:44:06.7073484+08:00||;False|2025-11-30T19:43:58.2896556+08:00||;True|2025-11-30T19:42:08.2261927+08:00||;True|2025-11-30T19:28:15.7115077+08:00||;False|2025-11-30T19:28:10.2280725+08:00||;True|2025-11-30T19:23:31.7859158+08:00||;True|2025-11-30T19:23:20.7788277+08:00||;True|2025-11-30T19:17:11.8583296+08:00||;False|2025-11-30T19:10:41.8369574+08:00||;True|2025-11-30T19:02:08.8184758+08:00||;False|2025-11-30T19:01:59.4711045+08:00||;True|2025-11-30T18:16:01.8372242+08:00||;True|2025-11-30T14:50:31.9356543+08:00||;True|2025-11-30T14:48:27.1833064+08:00||;True|2025-11-30T02:06:06.6099669+08:00||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;</History>
|
||||||
<LastFailureDetails />
|
<LastFailureDetails />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ services:
|
|||||||
|
|
||||||
7. ✅ 将网站名称改成 "抖小云" 灵感来源于哪吒电影 驮门的那个小云云
|
7. ✅ 将网站名称改成 "抖小云" 灵感来源于哪吒电影 驮门的那个小云云
|
||||||
|
|
||||||
8. ⭕️ <span style="color: #999;">Cookie 过期提醒</span>
|
8. ✅ Cookie 过期提醒,在D音授权页可查看
|
||||||
|
|
||||||
9. ✅ 重复视频去重(一个视频同时属于收藏视频、喜欢的视频或指定的博主作品)
|
9. ✅ 重复视频去重(一个视频同时属于收藏视频、喜欢的视频或指定的博主作品)
|
||||||
|
|
||||||
|
|||||||
@@ -251,11 +251,12 @@ const getConfig = () => {
|
|||||||
dataIndex: 'userName',
|
dataIndex: 'userName',
|
||||||
width: 180,
|
width: 180,
|
||||||
},
|
},
|
||||||
{ title: '状态', dataIndex: 'status', width: 180 },
|
{ title: '同步状态', dataIndex: 'status', width: 180 },
|
||||||
{ title: '收藏路径', dataIndex: 'savePath' },
|
{ title: '收藏路径', dataIndex: 'savePath' },
|
||||||
{ title: '喜欢路径', dataIndex: 'favSavePath' },
|
{ title: '喜欢路径', dataIndex: 'favSavePath' },
|
||||||
{ title: '博主路径', dataIndex: 'upSavePath' },
|
{ title: '博主路径', dataIndex: 'upSavePath' },
|
||||||
{ title: 'Cookie', dataIndex: 'cookies' },
|
{ title: 'Cookie', dataIndex: 'cookies' },
|
||||||
|
{ title: '有效状态', dataIndex: 'statusMsg' },
|
||||||
// { title: '博主信息', dataIndex: 'upSecUserIds' },
|
// { title: '博主信息', dataIndex: 'upSecUserIds' },
|
||||||
// { title: '自己', dataIndex: 'secUserId' },
|
// { title: '自己', dataIndex: 'secUserId' },
|
||||||
{ title: '操作', dataIndex: 'edit', width: 200 },
|
{ title: '操作', dataIndex: 'edit', width: 200 },
|
||||||
@@ -274,6 +275,7 @@ const getConfig = () => {
|
|||||||
{ title: '博主路径', dataIndex: 'upSavePath' },
|
{ title: '博主路径', dataIndex: 'upSavePath' },
|
||||||
{ title: '图文视频', dataIndex: 'imgSavePath' },
|
{ title: '图文视频', dataIndex: 'imgSavePath' },
|
||||||
{ title: 'Cookie', dataIndex: 'cookies' },
|
{ title: 'Cookie', dataIndex: 'cookies' },
|
||||||
|
{ title: '有效状态', dataIndex: 'statusMsg' },
|
||||||
// { title: '博主信息', dataIndex: 'upSecUserIds' },
|
// { title: '博主信息', dataIndex: 'upSecUserIds' },
|
||||||
// { title: '自己', dataIndex: 'secUserId' },
|
// { title: '自己', dataIndex: 'secUserId' },
|
||||||
{ title: '操作', dataIndex: 'edit', width: 200 },
|
{ title: '操作', dataIndex: 'edit', width: 200 },
|
||||||
|
|||||||
@@ -53,13 +53,6 @@
|
|||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
重新同步
|
重新同步
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- <a-button type="danger" @click="StartNow" :disabled="isSyncing" class="sync-button">
|
|
||||||
<template #icon>
|
|
||||||
<a-spin v-if="isSyncing" size="small" />
|
|
||||||
</template>
|
|
||||||
<SyncOutlined />
|
|
||||||
立即同步
|
|
||||||
</a-button> -->
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,6 +72,7 @@
|
|||||||
<span class="modal-title-with-tooltip" :title="formatFilePath(currentVideoInfo?.videoSavePath)">
|
<span class="modal-title-with-tooltip" :title="formatFilePath(currentVideoInfo?.videoSavePath)">
|
||||||
{{ playingTitle }}
|
{{ playingTitle }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<div v-if="isVideoLoading" class="loading-overlay">
|
<div v-if="isVideoLoading" class="loading-overlay">
|
||||||
@@ -95,6 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="currentVideoInfo" class="video-info-bar">
|
<div v-if="currentVideoInfo" class="video-info-bar">
|
||||||
<div class="info-container">
|
<div class="info-container">
|
||||||
|
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">同步时间:</span>
|
<span class="info-label">同步时间:</span>
|
||||||
<span class="info-value">{{ currentVideoInfo.syncTimeStr || '未知' }}</span>
|
<span class="info-value">{{ currentVideoInfo.syncTimeStr || '未知' }}</span>
|
||||||
@@ -103,6 +98,17 @@
|
|||||||
<span class="info-label">视频类型:</span>
|
<span class="info-label">视频类型:</span>
|
||||||
<span class="info-value">{{ currentVideoInfo.viedoCate || '未知' }}</span>
|
<span class="info-value">{{ currentVideoInfo.viedoCate || '未知' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<a-popover placement="bottom">
|
||||||
|
<template #content>
|
||||||
|
<p>{{formatPathSeparator(currentVideoInfo?.videoSavePath)}}</p>
|
||||||
|
</template>
|
||||||
|
<a-button type="link" size="small" @click="copyVideoPath(formatPathSeparator(currentVideoInfo?.videoSavePath))" class="copy-path-btn">
|
||||||
|
复制路径
|
||||||
|
</a-button>
|
||||||
|
</a-popover>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -335,6 +341,12 @@ const formatFilePath = (filePath?: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------- 核心工具方法 --------------------------
|
// -------------------------- 核心工具方法 --------------------------
|
||||||
|
|
||||||
|
const formatPathSeparator = (path) => {
|
||||||
|
if (!path) return path; // 处理空路径情况
|
||||||
|
// 正则表达式 /\\/g 表示全局匹配所有反斜杠
|
||||||
|
return path.replace(/\\/g, '/');
|
||||||
|
};
|
||||||
/** 格式化表格视频标题:超过20字符显示省略号 */
|
/** 格式化表格视频标题:超过20字符显示省略号 */
|
||||||
const formatVideoTitle = (title?: string) => {
|
const formatVideoTitle = (title?: string) => {
|
||||||
if (!title) return '无标题';
|
if (!title) return '无标题';
|
||||||
@@ -674,7 +686,7 @@ const handleBatchShare = () => {
|
|||||||
shareUrl += `${currentDomain}/share/${record.id}/${k}
|
shareUrl += `${currentDomain}/share/${record.id}/${k}
|
||||||
`;
|
`;
|
||||||
});
|
});
|
||||||
copyToClipboard(shareUrl);
|
copyToClipboard(shareUrl, '分享链接已复制到剪贴板!');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('分享失败:', error);
|
console.error('分享失败:', error);
|
||||||
message.error('分享功能异常,请稍后重试');
|
message.error('分享功能异常,请稍后重试');
|
||||||
@@ -682,12 +694,12 @@ const handleBatchShare = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 复制链接到剪贴板(兼容生产环境)
|
// 复制链接到剪贴板(兼容生产环境)
|
||||||
const copyToClipboard = async (shareUrl) => {
|
const copyToClipboard = async (shareUrl, msg) => {
|
||||||
try {
|
try {
|
||||||
// 方案1:优先使用 navigator.clipboard(现代浏览器+HTTPS环境)
|
// 方案1:优先使用 navigator.clipboard(现代浏览器+HTTPS环境)
|
||||||
if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
|
if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
|
||||||
await navigator.clipboard.writeText(shareUrl);
|
await navigator.clipboard.writeText(shareUrl);
|
||||||
message.success('分享链接已复制到剪贴板!');
|
message.success(msg);
|
||||||
} else {
|
} else {
|
||||||
// 方案2:降级使用 document.execCommand(兼容HTTP/旧浏览器)
|
// 方案2:降级使用 document.execCommand(兼容HTTP/旧浏览器)
|
||||||
const textarea = document.createElement('textarea');
|
const textarea = document.createElement('textarea');
|
||||||
@@ -704,7 +716,7 @@ const copyToClipboard = async (shareUrl) => {
|
|||||||
document.body.removeChild(textarea); // 清理DOM
|
document.body.removeChild(textarea); // 清理DOM
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success('分享链接已复制到剪贴板!');
|
message.success(msg);
|
||||||
} else {
|
} else {
|
||||||
// 方案3:最终降级 - 显示链接让用户手动复制
|
// 方案3:最终降级 - 显示链接让用户手动复制
|
||||||
throw new Error('自动复制失败');
|
throw new Error('自动复制失败');
|
||||||
@@ -737,13 +749,22 @@ const handleShare = (record: DataItem) => {
|
|||||||
// 生成分享链接
|
// 生成分享链接
|
||||||
let k = CryptoJS.MD5(record.fileHash + record.authorId).toString();
|
let k = CryptoJS.MD5(record.fileHash + record.authorId).toString();
|
||||||
const shareUrl = `${currentDomain}/share/${record.id}/${k}`;
|
const shareUrl = `${currentDomain}/share/${record.id}/${k}`;
|
||||||
copyToClipboard(shareUrl);
|
copyToClipboard(shareUrl, '分享链接已复制到剪贴板!');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('分享失败:', error);
|
console.error('分享失败:', error);
|
||||||
message.error('分享功能异常,请稍后重试');
|
message.error('分享功能异常,请稍后重试');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 新增:复制视频路径方法
|
||||||
|
const copyVideoPath = (path?: string) => {
|
||||||
|
if (!path) {
|
||||||
|
message.warning('暂无视频存储路径');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
copyToClipboard(path, '视频保存路径已复制到剪贴板!');
|
||||||
|
};
|
||||||
|
|
||||||
// -------------------------- 页面初始化 --------------------------
|
// -------------------------- 页面初始化 --------------------------
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getConfig();
|
getConfig();
|
||||||
@@ -986,9 +1007,11 @@ onMounted(() => {
|
|||||||
|
|
||||||
.info-item {
|
.info-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-label {
|
.info-label {
|
||||||
@@ -1001,6 +1024,17 @@ onMounted(() => {
|
|||||||
.info-value {
|
.info-value {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 新增:复制路径按钮样式 */
|
||||||
|
.copy-path-btn {
|
||||||
|
padding: 0 6px !important;
|
||||||
|
height: 24px !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-title-link {
|
.video-title-link {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dbconn": "",
|
"dbconn": "",
|
||||||
"dbtype": "Sqlite",
|
"dbtype": "Sqlite",
|
||||||
"tagName": "beta_1.6.5"
|
"tagName": "beta_1.6.6"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace dy.net.dto
|
||||||
|
{
|
||||||
|
public class FollowErrorDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("followings")]
|
||||||
|
public object Followings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 8 - 用户未登录
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("status_code")]
|
||||||
|
public int StatusCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 用户未登录
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("status_msg")]
|
||||||
|
public string StatusMsg { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,7 +48,21 @@ namespace dy.net.job
|
|||||||
List<FollowingsItem> follows = new List<FollowingsItem>();
|
List<FollowingsItem> follows = new List<FollowingsItem>();
|
||||||
while (hasmore)
|
while (hasmore)
|
||||||
{
|
{
|
||||||
var data = await _douyinService.SyncMyFollows(count, offset, ck.SecUserId, ck.Cookies);
|
var data = await _douyinService.SyncMyFollows(count, offset, ck.SecUserId, ck.Cookies, async err =>
|
||||||
|
{
|
||||||
|
if (err.StatusCode != 0)
|
||||||
|
{
|
||||||
|
Serilog.Log.Error($"同步用户[{ck.UserName}]关注列表时发生错误,错误信息:{err.StatusMsg},状态码:{err.StatusCode}");
|
||||||
|
}
|
||||||
|
// 如果是未登录错误,则跳出循环
|
||||||
|
if (err.StatusCode == 8)
|
||||||
|
{
|
||||||
|
hasmore = false;
|
||||||
|
}
|
||||||
|
ck.StatusMsg = err.StatusCode == 8 ? "已过期" : "正 常";
|
||||||
|
ck.StatusCode = err.StatusCode;
|
||||||
|
await _dyCookieService.UpdateAsync(ck);
|
||||||
|
});
|
||||||
|
|
||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
|
|||||||
+10
-53
@@ -84,60 +84,17 @@ namespace dy.net.model
|
|||||||
[SugarColumn(Length = 500, IsNullable = true)]
|
[SugarColumn(Length = 500, IsNullable = true)]
|
||||||
public string ImgSavePath { get; set; }
|
public string ImgSavePath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 抖音返回的状态码,主要用于判断Cookie是否有效
|
||||||
|
/// 0 正常 8 - 用户未登录
|
||||||
|
/// </summary>
|
||||||
|
public int StatusCode { get; set; }
|
||||||
|
|
||||||
//[SugarColumn(IsIgnore = true)]
|
/// <summary>
|
||||||
//public List<DouyinUpSecUserIdDto> UpSecUserIdsJson
|
///
|
||||||
//{
|
/// </summary>
|
||||||
// get
|
[SugarColumn(Length = 100, IsNullable = true)]
|
||||||
// {
|
public string StatusMsg { get; set; }
|
||||||
// // 反序列化逻辑(保持不变)
|
|
||||||
// if (string.IsNullOrWhiteSpace(UpSecUserIds))
|
|
||||||
// {
|
|
||||||
// return new List<DouyinUpSecUserIdDto>();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// return JsonConvert.DeserializeObject<List<DouyinUpSecUserIdDto>>(UpSecUserIds);
|
|
||||||
// }
|
|
||||||
// catch (JsonSerializationException ex)
|
|
||||||
// {
|
|
||||||
// // 日志记录(按需添加)
|
|
||||||
// // Logger.Error($"反序列化失败:{ex.Message},原始值:{UpSecUserIds}");
|
|
||||||
// return new List<DouyinUpSecUserIdDto>();
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// // 日志记录(按需添加)
|
|
||||||
// // Logger.Error($"处理异常:{ex.Message}");
|
|
||||||
// return new List<DouyinUpSecUserIdDto>();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// // 序列化逻辑:将列表转为JSON字符串,赋值给UpSecUserIds
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// // 若传入的列表为null,直接设为空字符串(避免序列化后出现"null"字符串)
|
|
||||||
// UpSecUserIds = value == null
|
|
||||||
// ? string.Empty
|
|
||||||
// : JsonConvert.SerializeObject(value);
|
|
||||||
// }
|
|
||||||
// catch (JsonSerializationException ex)
|
|
||||||
// {
|
|
||||||
// // 捕获序列化异常(如对象循环引用、不支持的类型等)
|
|
||||||
// // Logger.Error($"序列化失败:{ex.Message},列表值:{value}");
|
|
||||||
// // 异常时默认设为空字符串,避免存储错误的JSON
|
|
||||||
// UpSecUserIds = string.Empty;
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// // 捕获其他未知异常
|
|
||||||
// // Logger.Error($"设置值异常:{ex.Message}");
|
|
||||||
// UpSecUserIds = string.Empty;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,8 +229,9 @@ namespace dy.net.service
|
|||||||
/// <param name="offset"></param>
|
/// <param name="offset"></param>
|
||||||
/// <param name="secUserId"></param>
|
/// <param name="secUserId"></param>
|
||||||
/// <param name="cookie"></param>
|
/// <param name="cookie"></param>
|
||||||
|
/// <param name="callBack"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<DouyinFollowInfo> SyncMyFollows(string count,string offset,string secUserId,string cookie)
|
public async Task<DouyinFollowInfo> SyncMyFollows(string count,string offset,string secUserId,string cookie,Action<FollowErrorDto> callBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -255,7 +256,21 @@ namespace dy.net.service
|
|||||||
if (respose.IsSuccessStatusCode)
|
if (respose.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
var data = await respose.Content.ReadAsStringAsync();
|
var data = await respose.Content.ReadAsStringAsync();
|
||||||
return JsonConvert.DeserializeObject<DouyinFollowInfo>(data);
|
var res= JsonConvert.DeserializeObject<DouyinFollowInfo>(data);
|
||||||
|
if(res.Followings==null)
|
||||||
|
{
|
||||||
|
var err= JsonConvert.DeserializeObject<FollowErrorDto>(data);
|
||||||
|
Serilog.Log.Error($"SyncMyFollows error: {err.StatusMsg}");
|
||||||
|
if (err != null)
|
||||||
|
{
|
||||||
|
callBack(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
callBack(new FollowErrorDto { StatusCode = 0 });
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace dy.net.service
|
|||||||
var jobTasks = new List<Task<bool>>
|
var jobTasks = new List<Task<bool>>
|
||||||
{
|
{
|
||||||
//关注列表
|
//关注列表
|
||||||
StartJobAsync("follow_user", expression),
|
//StartJobAsync("follow_user", expression),
|
||||||
//我收藏的作品
|
//我收藏的作品
|
||||||
StartJobAsync("collect", expression),
|
StartJobAsync("collect", expression),
|
||||||
//我喜欢的作品
|
//我喜欢的作品
|
||||||
|
|||||||
Reference in New Issue
Block a user