From 95fc8c7fc073f66964d4e117ef68217710bbaf5e Mon Sep 17 00:00:00 2001
From: rd <1344903914@qq.com>
Date: Tue, 22 Jul 2025 18:24:24 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=88=E6=9D=83=E8=B4=A6=E6=88=B7?=
=?UTF-8?q?=E6=88=90=E5=8A=9F=E5=90=8E=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../authorized-account-modal/index.vue | 86 ++++++++++---------
1 file changed, 44 insertions(+), 42 deletions(-)
diff --git a/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue
index 774220e..5e8bffa 100644
--- a/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue
@@ -12,7 +12,7 @@
:footer="!isLoading"
@close="close"
>
-
+
+
{
return isSuccess.value ? '继续添加' : '重试';
});
-const getDaysDiffText = (lastSyncedAt) => {
- if (!lastSyncedAt) return '0天';
+// const getDaysDiffText = (lastSyncedAt) => {
+// if (!lastSyncedAt) return '0天';
- const daysDiff = dayjs().diff(dayjs(lastSyncedAt * 1000), 'day');
+// const daysDiff = dayjs().diff(dayjs(lastSyncedAt * 1000), 'day');
- if (daysDiff === 0) return '不到1天';
- return `${daysDiff}天`;
-};
+// if (daysDiff === 0) return '不到1天';
+// return `${daysDiff}天`;
+// };
const open = ({ accountId, last_synced_at = null, form = null, needSelectSubAccount = false }) => {
reset();
id.value = accountId;
- lastSyncedAt.value = last_synced_at;
+ // lastSyncedAt.value = last_synced_at;
addAccountFormData.value = form;
shouldSelectSubAccount.value = needSelectSubAccount;
visible.value = true;
@@ -154,9 +154,9 @@ const reset = () => {
failReason.value = '';
progress.value = 0;
id.value = '';
- lastSyncedAt.value = null;
- syncType.value = INITIAL_SYNC_TYPE;
- showSyncTip.value = false;
+ // lastSyncedAt.value = null;
+ // syncType.value = INITIAL_SYNC_TYPE;
+ // showSyncTip.value = false;
shouldSelectSubAccount.value = false;
addAccountFormData.value = null;
clearFakeProgressTimer();
@@ -191,6 +191,8 @@ const startStatusPolling = () => {
clearFakeProgressTimer();
clearStatusPollingTimer();
isLoading.value = false;
+
+ isSuccess.value && postPlacementAccountsSync(id.value);
}
}
}, 2000);
@@ -237,34 +239,34 @@ const clearFakeProgressTimer = () => {
}
};
-const handleSyncData = () => {
- if (!showSyncTip.value) {
- formRef.value.validate(async (errors) => {
- if (!errors) {
- showSyncTip.value = true;
- }
- });
- return;
- }
+// const handleSyncData = () => {
+// if (!showSyncTip.value) {
+// formRef.value.validate(async (errors) => {
+// if (!errors) {
+// showSyncTip.value = true;
+// }
+// });
+// return;
+// }
- if (syncType.value === INITIAL_SYNC_TYPE) {
- postPlacementAccountsSync(id.value).then((res) => {
- if (res.code === 200) {
- update();
- close();
- }
- });
- } else {
- startLoading();
- }
-};
+// if (syncType.value === INITIAL_SYNC_TYPE) {
+// postPlacementAccountsSync(id.value).then((res) => {
+// if (res.code === 200) {
+// update();
+// close();
+// }
+// });
+// } else {
+// close();
+// }
+// };
const handleOk = () => {
- // n天未同步更新
- if (lastSyncedAt.value && lastSyncedAt.value < dayjs().startOf('day').valueOf()) {
- handleSyncData();
- return;
- }
+ // // n天未同步更新
+ // if (lastSyncedAt.value && lastSyncedAt.value < dayjs().startOf('day').valueOf()) {
+ // handleSyncData();
+ // return;
+ // }
// 已完成
if (isCompleted.value) {