后期输出的差异

时间:2019-05-10 08:26:43

标签: javascript ajax

我有两个脚本,一个是Prestashop DHL标签创建者,另一个是我们公司的内部销售应用程序。我试图将两者结合在一起,以便我们可以从应用程序生成DHL标签,而无需访问商店的管理面板。现在到了问题的核心。 Prestashop DHL模块发送带有以下参数的POST:

  

Receiver:Address:HouseNumber:#value

并且我们的内部销售应用发送的POST带有如下所示的参数:

  

收件人[地址] [门牌号]:#value

这可能是一个愚蠢的问题,但是有什么区别?

以下是在我们的应用中生成POST的代码

function generateDHLLabel()
{
    jQuery.post("prestashop_link", { 
        DhlShipmentId:'',   
        DhlOrderId  :'',
        DhlShipmentCreationDateTime:'',
        ShipmentPreset:{ldelim}ShipmentPresetId :   1{rdelim},
        ServiceType:    'AH',
        DropOffType:    'REGULAR_PICKUP',
        LabelType:  'BLP',
        Content:    'content',
        Comment :'',
        Reference:  5508,
        ShippingPaymentType:    'SHIPPER',
        PaymentType:    'BANK_TRANSFER',
        BillingAccountNumber    :'',
        CostsCenter :'',
        ShipmentDate:   '2019-05-09',
        ShipmentStartHour:  '09:00',
        ShipmentEndHour:    '19:00',
        ParcelIdent :'',
        Postnummer  :'',
        ParcelPostalCode :'',   
        Receiver:{ldelim}
            Address:{ldelim}Name:   'Name+Surname',
                            Street: 'Street+1',
                            HouseNumber:'',
                            ApartmentNumber:'', 
                            OriginalAddressString:  'Name+Surname,+Street+1,+00-000+City,+Country',
                            ParseAlert:'',
                            PostalCode: '00000',
                            City:   'CITY',
                            Country:    'PL'{rdelim},
            Contact:{ldelim}Name:   'Name+Surname',
                            Phone:  '000000000',
                            Email:  'mail@domain.com'{rdelim}{rdelim},
        Package:{ldelim}Type:   'PACKAGE',
                        Weight: '4',
                        Width:  '30',
                        Height: '30',
                        Length: '20',
                        Quantity:   '1'{rdelim},
        SpecialServices:{ldelim}S_UBEZP:    '1',
                                UBEZP_Value:    '123.49',
                                UBEZP_CurrencyUnitAlert :'',
                                S_COD:  '1',
                                COD_Value:  '123.49',
                                COD_CurrencyUnitAlert:'',
                                ROD_Instruction :'',
                                OriginalCurrencyUnit:   'PLN'{rdelim},
        Neighbour:{ldelim}Name:'',
                            Street:'',
                            HouseNumber:'',
                            ApartmentNumber:'',
                            PostalCode:'',
                            City:'',
                            Phone:'',
                            Email:''{rdelim},






        Action:'Send'


    }, function(data) {
        window.location.href = '{site_url()}app/packing/order-packing/{$this->uri->segment(4)}';
    });

}

1 个答案:

答案 0 :(得分:1)

一个名称中带有方括号。另一个名称中带有冒号。就这样。

读取请求的软件可能会在意您使用的软件。