JXDS18FUJT 2 жил өмнө
parent
commit
8383ef9cd6

+ 13 - 10
src/views/collection/index.vue

@@ -137,14 +137,15 @@ const sendWrongSync = (column: { text: string; value: number }) => {
 					km,
 				})
 				.then((res) => {
+				
 					collectionModel
 						.getList({
 							km,
 						})
 						.then((res) => {
 							wrongList.value = res.data;
-							window.localStorage.setItem(userWrongKey, JSON.stringify(wrongList.value||[]));
-							Toast('成功同步')
+							window.localStorage.setItem(userWrongKey, JSON.stringify(wrongList.value || []));
+							Dialog.alert({ message: "合并成功" });
 						});
 				});
 			break;
@@ -155,25 +156,27 @@ const sendWrongSync = (column: { text: string; value: number }) => {
 					km,
 				})
 				.then((res) => {
+					
 					collectionModel
 						.getList({
 							km,
 						})
 						.then((res) => {
 							wrongList.value = res.data;
-							Toast('成功备份')
+							Dialog.alert({ message: "备份成功" });
 						});
 				});
 			break;
 		case 2:
+		
 			collectionModel
 				.getList({
 					km,
 				})
 				.then((res) => {
 					wrongList.value = res.data;
-					window.localStorage.setItem(userWrongKey, JSON.stringify(wrongList.value||[]));
-					Toast('成功同步')
+					window.localStorage.setItem(userWrongKey, JSON.stringify(wrongList.value || []));
+					Dialog.alert({ message: "恢复成功" });
 				});
 			break;
 	}
@@ -200,8 +203,8 @@ const sendCollectSync = (column: { text: string; value: number }) => {
 						})
 						.then((res) => {
 							collectionList.value = res.data;
-							window.localStorage.setItem(userCollectKey, JSON.stringify(collectionList.value||[]));
-							Toast('成功同步')
+							window.localStorage.setItem(userCollectKey, JSON.stringify(collectionList.value || []));
+							Dialog.alert({ message: "合并成功" });
 						});
 				});
 			break;
@@ -218,7 +221,7 @@ const sendCollectSync = (column: { text: string; value: number }) => {
 						})
 						.then((res) => {
 							collectionList.value = res.data;
-							Toast('成功备份')
+							Dialog.alert({ message: "备份成功" });
 						});
 				});
 			break;
@@ -229,8 +232,8 @@ const sendCollectSync = (column: { text: string; value: number }) => {
 				})
 				.then((res) => {
 					collectionList.value = res.data;
-					window.localStorage.setItem(userCollectKey, JSON.stringify(collectionList.value||[]));
-					Toast('成功同步')
+					window.localStorage.setItem(userCollectKey, JSON.stringify(collectionList.value || []));
+					Dialog.alert({ message: "恢复成功" });
 				});
 			break;
 	}