diff --git a/pages/sys/msg/index.vue b/pages/sys/msg/index.vue index 03b524a..a8674ad 100644 --- a/pages/sys/msg/index.vue +++ b/pages/sys/msg/index.vue @@ -269,7 +269,7 @@ const { qrCodeId, visitorName, - visitorUnit, + visitorUnit, idCard, visitorPhone, visitingReason, @@ -402,21 +402,27 @@ }; const parsedData = JSON.parse(res.data); - - // 第二步:从解析后的数据中获取ossId - const ossId = parsedData.data.ossId; - console.log("ossId", ossId) - submitData.facePictures = ossId; - console.log(submitData) - this.$u.api.fksub(submitData).then(res => { - console.log(res) - if (res.code == 200) { - uni.showToast({ - title: "提交成功,请等待审核!", - icon: "success" - }) - } - }) + if (parsedData.code == 200) { + // 第二步:从解析后的数据中获取ossId + const ossId = parsedData.data.ossId; + console.log("ossId", ossId) + submitData.facePictures = ossId; + console.log(submitData) + this.$u.api.fksub(submitData).then(res => { + console.log(res) + if (res.code == 200) { + uni.showToast({ + title: "提交成功,请等待审核!", + icon: "success" + }) + } + }) + }else{ + uni.showToast({ + title: '上传失败', + icon: 'none' + }); + } // uni.showToast({