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) {