diff --git a/pages/shop/SellerDetail.vue b/pages/shop/SellerDetail.vue index 8d7005c..2f9ae10 100644 --- a/pages/shop/SellerDetail.vue +++ b/pages/shop/SellerDetail.vue @@ -377,15 +377,18 @@ }) .then((res) => { if (this.identity == 0) { + // 商家视角:优先使用手艺人信息,若没有则使用商家自己的信息 + const provider = res.data.user_syr || res.data.user_sj || {}; this.orderInfo = res.data ? { - ...res.data.order, - ...res.data.work_seat, - ...res.data.user_syr, - work_hour_id: res.data.work_seat.id, - order_id: res.data.order.id, - user_sj_id: res.data.user_syr.id, + ...res.data.order, + ...res.data.work_seat, + ...provider, + work_hour_id: res.data.work_seat.id, + order_id: res.data.order.id, + user_sj_id: provider.id, } : {}; } else if (this.identity == 1) { + // 手艺人视角 this.orderInfo = res.data ? { ...res.data.order, ...res.data.work_hour,