From dbb166f62385c54d7a80ed34ee2a7c4d4cb602e3 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 21 Mar 2024 11:06:44 +0800
Subject: [PATCH] 更新

---
 mixin/uploadMixinPicCheck.js |   35 ++++++++++++++++++-----------------
 pages/home/index.vue         |   10 +++++-----
 2 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/mixin/uploadMixinPicCheck.js b/mixin/uploadMixinPicCheck.js
index 8953cd2..9d89848 100644
--- a/mixin/uploadMixinPicCheck.js
+++ b/mixin/uploadMixinPicCheck.js
@@ -66,20 +66,19 @@
 							}, 1000)
 						} else {
 							// if (checkResult.errcode == '87014') {
-							wx.hideLoading();
-							wx.showModal({
-								content: '存在敏感内容,请更换图片',
-								showCancel: false,
-								confirmText: '明白了'
-							})
-							// } else {
-							// 	wx.hideLoading();
-							// 	wx.showModal({
-							// 		content: '其他错误,稍后再试',
-							// 		showCancel: false,
-							// 		confirmText: '明白了'
-							// 	})
-							// }
+							uni.hideLoading();
+							if (data.code == 201) {
+								uni.showModal({
+									title: '提示!',
+									content: '存在敏感内容,请更换图片',
+									showCancel: false,
+									confirmText: '明白了'
+								})
+								resolve(data)
+							} else {
+								this.$showTips(data.msg)
+							}
+
 						}
 					}
 				});
@@ -88,13 +87,10 @@
 
 		//上传成功后对返回数据进行处理
 		async afterReadImg(event, key = "images") {
-			// console.log(key)
-			// console.log(this.form[key]);
 			this.showLoading()
 			var that = this;
 			// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
 			let lists = [].concat(event.file)
-			console.log("form====>", this.form);
 			let fileListLen = this.form[key].length
 			lists.map((item) => {
 				this.form[key].push({
@@ -105,6 +101,11 @@
 			})
 			for (let i = 0; i < lists.length; i++) {
 				const result = await this.uploadFilePromise(lists[i].url)
+				console.log("result", result);
+				if (result.code != 200) { //移除上传失败的图片
+					that.form[key].splice(i, 1)
+					return
+				};
 				that.form[key].splice(fileListLen, 1, Object.assign({}, {
 					url: result.data.link,
 					name: result.data.name
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 5509c2a..79672ea 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -422,11 +422,11 @@
 								path: "/subPackage/bs/views/zhsb",
 								icon: "/static/icon/nav-04.png"
 							},
-							{
-								text: "居住证申请",
-								path: "/subPackage/reside/edit",
-								icon: "/static/icon/nav-04.png"
-							}
+							// {
+							// 	text: "居住证申请",
+							// 	path: "/subPackage/reside/edit",
+							// 	icon: "/static/icon/nav-04.png"
+							// }
 						]
 					},
 					{

--
Gitblit v1.9.3