更新 pages/sys/msg/index.vue

This commit is contained in:
2025-08-21 14:22:30 +08:00
parent d927f79768
commit f1c1e9d905

View File

@@ -53,7 +53,6 @@
</view>
<!-- 被访人信息 -->
<view class="section-title">被访人信息</view>
<view class="form-item">
@@ -372,12 +371,7 @@
this.formData.visitingBeginTime = `${this.formData.visitingBeginDate} ${this.formData.visitingBeginTime}`;
this.formData.visitingEndTime = `${this.formData.visitingEndDate} ${this.formData.visitingEndTime}`;
// 准备提交数据
const submitData = {
...this.formData,
bookingParkingSpace: this.formData.bookingParkingSpace ? 0 : 1
};
console.log(submitData)
// 显示加载提示
uni.showLoading({
@@ -410,19 +404,44 @@
formData: {
'code': this.formData.qrCodeId // 示例:其他表单字段
},
// 上传进度回调
onProgressUpdate: (res) => {
this.progress = res.progress;
console.log('上传进度:' + res.progress);
},
// // 上传进度回调
// onProgressUpdate: (res) => {
// this.progress = res.progress;
// console.log('上传进度:' + res.progress);
// },
// 上传成功回调
success: (res) => {
console.log('上传成功', res);
this.uploadResult = res.data;
// this.formData.facePictures = res.data.ossId;
// 准备提交数据
const submitData = {
...this.formData,
bookingParkingSpace: this.formData.bookingParkingSpace ? 0 : 1
};
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'
});
title: "提交成功,请等待审核!",
icon: "success"
})
}
})
// uni.showToast({
// title: '上传成功',
// icon: 'success'
// });
},
// 上传失败回调
fail: (err) => {
@@ -454,20 +473,7 @@
});
this.$u.api.fksub(submitData).then(res => {
console.log(res)
if (res.code == 200) {
uni.showToast({
title: "提交成功,请等待审核!",
icon: "success"
})
} else {
uni.showToast({
title: "提交失败!",
icon: "error"
})
}
})
uni.hideLoading();
// 显示成功提示