liushengqiang 1 vuosi sitten
vanhempi
commit
ea5f6979c0
1 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  1. 7 2
      src/pc/component/upload-to-resources/index.tsx

+ 7 - 2
src/pc/component/upload-to-resources/index.tsx

@@ -146,8 +146,13 @@ export default defineComponent({
 			});
 		};
 		const wav2mp3 = async () => {
-			const { data } = await api_musicSheetCreationWav2mp3(props.item.filePath);
-			froms.mp3 = data;
+			try {
+				const { data } = await api_musicSheetCreationWav2mp3(props.item.filePath);
+				froms.mp3 = data;
+			} catch (error) {
+				message.error("wav转mp3失败");	
+				handleClose();
+			}
 		};
 
 		const handleClose = () => {