🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 计算订单价格 >[danger]接口认证:**需要认证** ##### 响应说明 | 字段名 | 字段类型 | 字段说明 | | --- | --- | --- | | shipping_fee_format | string | 运费(已格式化) | | shipping_fee | int | 运费(分) | | pay_tye | int | 支付类型id | | pay_type_format | string | 支付类型 | | total_fee| int | 总价(分) | | total_fee_format | string | 总价(已格式化好) | | goods | array[object] | 商品集合 | | goods.goods_id | int | 商品id | | goods.goods_sku_id | int | 一个规格商品的id | | goods.goods_image | string | 商品主图 | | goods.goods_name | string | 商品名 | | goods.sku_name | string | 规格 | | goods.goods_price | int | 价格(分) | | goods.goods_price_format | string | 价格(格式化好的) | | goods.goods_number | int | 商品数量 | | address | object | 地址对象 | | address .id | int | 地址id | | address .consignee | string | 收货人 | | address .province | int | 省代号| | address .city | int | 市代号 | | address .district | int | 区代号 | | address .address | string | 收货地址 | | address .full_address | string | 拼接好的完整地址 | | address .mobile | string | 手机号 | | address .is_default | int | 是否默认,1:默认,0:不是默认 | | address .province_name | string | 省 | | address .city_name | string | 市 | | address .district_name | string | 区 | ## 示例 ~~~[api] get:/order/calculate *string:sku_info=[{"goods_sku_ref_id":"19","num":"2"},{"goods_sku_ref_id":"34","num":"3"}]#下单的商品规格数量json串 is_group_by=0#是不是团购订单,0为普通1为团购,会影响商品价格,默认0 <<< success { "code": 200, "msg": "成功", "data": { "goods": [ { "goods_id": 22, "goods_sku_id": 19, "goods_image": "http://noobcoder.oss-cn-hangzhou.aliyuncs.com/letao/20220110/goods_image-61db97c188010.jpg", "goods_name": "0元-爱啡仕蓝山三合一速溶咖啡粉 ", "sku_name": "", "goods_price": 0, "goods_number": 2, "goods_price_format": "0.00" }, { "goods_id": 30, "goods_sku_id": 34, "goods_image": "http://noobcoder.oss-cn-hangzhou.aliyuncs.com/letao/20220112/goods_image-61de4c71a8374.png", "goods_name": "普通-衣服-规格 m 白", "sku_name": "m 白", "goods_price": 5400, "goods_number": 3, "goods_price_format": "54.00" } ], "shipping_fee_format": "31.00", "shipping_fee": 3100, "pay_tye": 0, "pay_type_format": "在线支付", "total_fee": 19300, "total_fee_format": "193.00", "address": { "id": 14, "consignee": "收货人", "province": 130000, "city": 130100, "district": 130107, "address": "我觉得剧情内一个小时换一个合集比较好,", "full_address": "河北省 石家庄市 井陉矿区 我觉得剧情内一个小时换一个合集比较好,", "mobile": "13245124587", "is_default": 1, "province_name": "河北省", "city_name": "石家庄市", "district_name": "井陉矿区" } } } <<< error 这里填写错误的返回码 以此类推,每个状态使用 <<< 分割, 第一行添加状态名称 ~~~ ## 可能出现的错误码 > 不包含常见的请求方式错误,参数丢失,用户权限验证失败