商家工位、工时订单因接口新加字段导致的页面不能正常显示bug修复

This commit is contained in:
BAKEYi 2026-04-23 10:23:34 +08:00
parent 64dea3ff2b
commit 7a5181a638
2 changed files with 10 additions and 10 deletions

View File

@ -377,15 +377,14 @@
}) })
.then((res) => { .then((res) => {
if (this.identity == 0) { if (this.identity == 0) {
// 使使 const userSyr = res.data.user_syr || {}; // null
const provider = res.data.user_syr || res.data.user_sj || {};
this.orderInfo = res.data ? { this.orderInfo = res.data ? {
...res.data.order, ...res.data.order,
...res.data.work_seat, ...res.data.work_seat,
...provider, ...userSyr,
work_hour_id: res.data.work_seat.id, work_hour_id: res.data.work_seat.id,
order_id: res.data.order.id, order_id: res.data.order.id,
user_sj_id: provider.id, syr_id: userSyr.id, // /
} : {}; } : {};
} else if (this.identity == 1) { } else if (this.identity == 1) {
// //

View File

@ -411,13 +411,14 @@
}) })
.then((res) => { .then((res) => {
if (this.identity == 0) { if (this.identity == 0) {
const userSyr = res.data.user_syr || {}; // null
this.orderInfo = res.data ? { this.orderInfo = res.data ? {
...res.data.order, ...res.data.order,
...res.data.work_hour, ...res.data.work_hour,
...res.data.user_syr, ...userSyr, //
work_hour_id: res.data.work_hour.id, work_hour_id: res.data.work_hour.id,
order_id: res.data.order.id, order_id: res.data.order.id,
user_sj_id: res.data.user_syr.id, syr_id: userSyr.id, // ID undefined
} : {}; } : {};
console.log(this.orderInfo, '----------------------------------') console.log(this.orderInfo, '----------------------------------')
} else if (this.identity == 1) { } else if (this.identity == 1) {