소스 검색

图片更新

wangxy 2 주 전
부모
커밋
7659c74ed0
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      pages/admin/Hetong/Hetong.vue

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

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