zhengkaixin 2 سال پیش
والد
کامیت
6608b663ec
2فایلهای تغییر یافته به همراه25 افزوده شده و 10 حذف شده
  1. 0 1
      pagesFinance/user/withdrawal/applicationForWithdrawal.vue
  2. 25 9
      pagesFinance/user/withdrawal/signReceipt.vue

+ 0 - 1
pagesFinance/user/withdrawal/applicationForWithdrawal.vue

@@ -220,7 +220,6 @@
 					}
 					this.info.signUrl=img
 					
-					
 										
 					if(!this.info.accountName){
 							uni.showToast({

+ 25 - 9
pagesFinance/user/withdrawal/signReceipt.vue

@@ -91,8 +91,8 @@
 		</view>
 	
 	    <button :class="{
-			submit:this.url,
-			submitNo:!this.url
+			submit:true,
+		
 		}" @click="submit()">提交确认单</button>
 	</view>
 </template>
@@ -184,13 +184,29 @@
 				 
 			},
 			submit(){
-				if(this.url){
-					this.uploadpic()
-				}else{
-					uni.showToast({
-						title: "请签字后,点击保存"
-					})
-				}
+				this.$refs.signatureRef.canvasToTempFilePath({
+					success: (res) => {
+						// 是否为空画板 无签名
+						console.log(res.isEmpty)
+						if(res.isEmpty){
+							this.url ="";
+						}else{
+							this.url = res.tempFilePath
+							
+						}
+						if(this.url){
+							this.uploadpic()
+						}else{
+							uni.showToast({
+								title: "请签字后提交"
+							})
+						}
+						// 生成图片的临时路径
+						// app | H5 | 微信小程序 生成的是base64
+					}
+				})
+				
+				
 					
 			},
 			onClick(type) {