物流下单fail Invalid request param 可是参数没有问题啊?
发布于 8 年前 作者 fzou 11745 次浏览 来自 官方Issues

const deliveryInfo = {

openid: order._openid,

sender: {

name: ‘xxx’,

mobile: ‘xxx’,

company: ‘xx’,

province: ‘广东省’,

city: ‘广州市’,

area: ‘越秀区’,

address: ‘xxxx’,

postCode: ‘510010’

},

receiver: {

name: order.userAddress.userName,

mobile: order.userAddress.telNumber,

province: order.userAddress.provinceName,

city: order.userAddress.cityName,

area: order.userAddress.countyName,

address: order.userAddress.detailInfo,

postCode: order.userAddress.postalCode

},

//商品信息,会展示到物流服务通知中,当add_source=2时无需填写(不发送物流服务通知)

shop: {

wxaPath: ‘/pages/mypackages/mypackages’,

imgUrl: https://pmo9fd3be-pic14.websiteonline.cn/upload/SESH_LOGO_n7tv.jpeg,

goodsName: ‘xxx’,

goodsCount: order.payCount

},

//包裹信息,将传递给快递公司

cargo: {

count: order.payCount,

weight: 1,

spaceX: 20,

spaceY: 10,

spaceZ: 2 * order.payCount,

detailList: [{

name: ‘xxx’,

count: order.payCount

}]

},

//保价信息 不保价

insured: {

useInsured: 0,

insuredValue: 0

},

service: {

serviceType: 0,

serviceName: ‘标准快递’

},

//订单来源,0为小程序订单,2为App或H5订单,填2则不发送物流服务通知

addSource: 0,

//订单ID,须保证全局唯一,不超过512字节

orderId: “123123123”,

//快递公司ID,参见getAllDelivery

deliveryId: ‘SF’,

//快递客户编码或者现付编码

bizId: ‘xxxxxxxx’,

//快递备注信息,比如"易碎物品",不超过1024字节

// customRemark: ‘’

}

console.log(deliveryInfo);

const result = await cloud.openapi.logistics.addOrder(deliveryInfo)

console.log(result);

我这样addOrder就说我参数有问题  我看了半天也没有啊

权限我也弄了,求大神能给我指点一下 很急,谢谢了,谢谢了~

1 回复

麻烦提供下appid以及完整的json数据

回到顶部