wangxy před 2 týdny
rodič
revize
7659c74ed0
1 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. 8 1
      pages/admin/Hetong/Hetong.vue

+ 8 - 1
pages/admin/Hetong/Hetong.vue

@@ -80,9 +80,16 @@
 	}
 
 	function getBase64(img) {
+		if (!img) {
+			uni.showToast({
+				title: '签名异常'
+			})
+			return;
+		}
+		
 		httpApi.getHetongQianming({
 			id: info.id,
-			fuzeren: img
+			fuzeren: img.replace(/^data:image\/\w+;base64,/,'')
 		}).then(res => {
 			if (res.data) {
 				uni.showToast({