更新 pages/sys/msg/index.vue
This commit is contained in:
parent
d927f79768
commit
f1c1e9d905
@ -53,7 +53,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 被访人信息 -->
|
<!-- 被访人信息 -->
|
||||||
<view class="section-title">被访人信息</view>
|
<view class="section-title">被访人信息</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
@ -372,12 +371,7 @@
|
|||||||
this.formData.visitingBeginTime = `${this.formData.visitingBeginDate} ${this.formData.visitingBeginTime}`;
|
this.formData.visitingBeginTime = `${this.formData.visitingBeginDate} ${this.formData.visitingBeginTime}`;
|
||||||
this.formData.visitingEndTime = `${this.formData.visitingEndDate} ${this.formData.visitingEndTime}`;
|
this.formData.visitingEndTime = `${this.formData.visitingEndDate} ${this.formData.visitingEndTime}`;
|
||||||
|
|
||||||
// 准备提交数据
|
|
||||||
const submitData = {
|
|
||||||
...this.formData,
|
|
||||||
bookingParkingSpace: this.formData.bookingParkingSpace ? 0 : 1
|
|
||||||
};
|
|
||||||
console.log(submitData)
|
|
||||||
|
|
||||||
// 显示加载提示
|
// 显示加载提示
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -410,19 +404,44 @@
|
|||||||
formData: {
|
formData: {
|
||||||
'code': this.formData.qrCodeId // 示例:其他表单字段
|
'code': this.formData.qrCodeId // 示例:其他表单字段
|
||||||
},
|
},
|
||||||
// 上传进度回调
|
// // 上传进度回调
|
||||||
onProgressUpdate: (res) => {
|
// onProgressUpdate: (res) => {
|
||||||
this.progress = res.progress;
|
// this.progress = res.progress;
|
||||||
console.log('上传进度:' + res.progress);
|
// console.log('上传进度:' + res.progress);
|
||||||
},
|
// },
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('上传成功', 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({
|
uni.showToast({
|
||||||
title: '上传成功',
|
title: "提交成功,请等待审核!",
|
||||||
icon: 'success'
|
icon: "success"
|
||||||
});
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '上传成功',
|
||||||
|
// icon: 'success'
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
// 上传失败回调
|
// 上传失败回调
|
||||||
fail: (err) => {
|
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();
|
uni.hideLoading();
|
||||||
|
|
||||||
// 显示成功提示
|
// 显示成功提示
|
||||||
|
Loading…
Reference in New Issue
Block a user