瀏覽代碼

图片更新

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