refactor(order): 优化订单列表性能并移除冗余推荐人信息
- 移除经销商页面中的推荐人显示信息 - 将订单商品详情从单独接口请求改为直接从分页接口获取,避免N+1查询问题 - 添加normalizeOrderGoodsList函数实现订单商品数据结构标准化 - 统一门店名称文字颜色样式为灰色 - 简化支付工具类中的重复API端点调用
This commit is contained in:
@@ -191,9 +191,8 @@ export class PaymentHandler {
|
||||
// 后端字段可能叫 dealerId 或 storeId,这里都带上,服务端忽略未知字段即可。
|
||||
// 这里做一次路径兼容(camel vs kebab),避免接口路径不一致导致整单失败。
|
||||
const list = await this.listByCompatEndpoint<ShopStoreRider>(
|
||||
['/shop/shop-store-rider', '/shop/shop-store-rider'],
|
||||
['/shop/shop-store-rider'],
|
||||
{
|
||||
dealerId: storeId,
|
||||
storeId: storeId,
|
||||
status: 1
|
||||
}
|
||||
@@ -224,7 +223,7 @@ export class PaymentHandler {
|
||||
private static async getWarehouses(): Promise<ShopWarehouse[]> {
|
||||
if (this.warehousesCache) return this.warehousesCache;
|
||||
const list = await this.listByCompatEndpoint<ShopWarehouse>(
|
||||
['/shop/shop-warehouse', '/shop/shop-warehouse'],
|
||||
['/shop/shop-warehouse'],
|
||||
{}
|
||||
);
|
||||
const usable = (list || []).filter(w => w?.isDelete !== 1 && (w.status === undefined || w.status === 1));
|
||||
|
||||
Reference in New Issue
Block a user