Browse Source

pc 上选择文件错误提示

jwyu 3 years ago
parent
commit
e723c39428
3 changed files with 25 additions and 0 deletions
  1. 9 0
      pages-approve/contract/detail.vue
  2. 8 0
      pages-approve/seal/detail.vue
  3. 8 0
      utils/uploadFile.js

+ 9 - 0
pages-approve/contract/detail.vue

@@ -335,6 +335,7 @@
 		methods: {
 		methods: {
 			// 点击上传回签附件
 			// 点击上传回签附件
 			handleUploadCheckFile(){
 			handleUploadCheckFile(){
+				const _this=this
 				wx.chooseMessageFile({
 				wx.chooseMessageFile({
 					count:1,
 					count:1,
 					type:'file',
 					type:'file',
@@ -358,6 +359,14 @@
 						}
 						}
 
 
 						this.showUpload=true
 						this.showUpload=true
+					},
+					fail:(error)=>{
+						if(error.errMsg.indexOf('not supported')){
+							uni.showToast({
+								title:'请通过手机上传附件',
+								icon:'none'
+							})
+						}
 					}
 					}
 				})
 				})
 			},
 			},

+ 8 - 0
pages-approve/seal/detail.vue

@@ -303,6 +303,14 @@
 						}
 						}
 
 
 						this.showConfirmCheckBackfile=true
 						this.showConfirmCheckBackfile=true
+					},
+					fail:(error)=>{
+						if(error.errMsg.indexOf('not supported')){
+							uni.showToast({
+								title:'请通过手机上传附件',
+								icon:'none'
+							})
+						}
 					}
 					}
 				})
 				})
 
 

+ 8 - 0
utils/uploadFile.js

@@ -65,6 +65,14 @@ const asyncChooseFiles=({count,type})=>{
 			type:type,
 			type:type,
 			success:(res)=>{
 			success:(res)=>{
 				resolve(res.tempFiles)
 				resolve(res.tempFiles)
+			},
+			fail:(error)=>{
+				if(error.errMsg.indexOf('not supported')){
+					uni.showToast({
+						title:'请通过手机上传附件',
+						icon:'none'
+					})
+				}
 			}
 			}
 		})
 		})
 	})
 	})