微信物流服务
微信同城配送配送费充值如何按总账户充值? 目前只能按单门店一个店一个店充值,比较麻烦,如何按总账号进行充值 [图片]
地址:湖北省潜江市园林街道章华中路10号
同城配送沙箱环境查询运费是正常的,但是删除use_sandbox后,preadd order fail detail: [DADA Errmsg: |SFTC Errmsg: 没有匹配的计价规则或计价规则已失效] { wx_store_id: '4000000000015820045', user_lng: '120.1756947157118', user_lat: '30.2410986328125', user_address: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx', user_name: '123', user_phone: 'xxxxxxxxx', cargo: { cargo_name: 'xxxxxx', cargo_type: 32, cargo_num: 1, cargo_price: 198, cargo_weight: 1000 } }这是传的参数
小程序已开通 快递服务 -> 查询组件,预览异常 plugin.openWaybillTracking({waybillToken: waybillToken}); message:预览 Error: 非法的插件版本,ERR: invalid provider[wx932b738226a7c7c9] version[2.1.5] for plugin[logisticsPlugin] [20250414 15:23:56][wx932b738226a7c7c9] appid: wx932b738226a7c7c9 openid: o6zAJs-kZyGV_uywcz7j1lhkSzy0 ideVersion: 1.06.2409140 osType: darwin-arm64 time: 2025-04-14 15:24:11
[图片]
错误码:934001 address info can not convert to id rid: 67fc807a-31824e78-14a24c25 调用微信同城配送中的“创建门店”接口,尝试新疆的其他地址能成功调用,相关传值如下,猜测这个地址的area有问题但是不清楚应该传什么值,辛苦看一下 { "out_store_id": "xxxxxxxxxxx", "store_name": "九九九1", "address_info": { "province": "新疆维吾尔自治区", "city": "双河市", "area": "双河市", "house": "城东街(双河市福宁新城B区(城东街西100米))", "lat": 44.885799154091266, "lng": 82.08995002512108, "phone": "17876666666" }, "order_pattern": 1 }
小程序被要求接入订单管理 其中发货信息入录准备通过接口进行处理 但参数中有个物流公司ID的参数,需要通过"查询物流公司编码列表"接口查询,但这个接口没有调用权限,怎么处理?
开发需求是:使用了微信物流服务 如何调整 打印面单 的格式,目前默认格式超出一页了,并且有非必要的数据,微信自带的 打单软件无法运行,推荐的第三方 打单软件 无法绑定,现在只能尝试用 获取运单数据 接口 返回的print_html 面单html字段,但是格式有问题
使用城市为辽宁省葫芦岛市兴城市 当地有顺丰同城服务,但下单后返回如下提示,这种情况是需要申请开通吗
这个云函数调用的时候一直报错: 云函数返回结果: {errMsg: "cloud.callFunction:ok", result: {…}, requestID: "7cd07d46-2454-4024-934f-6a37a34b364b"}errMsg: "cloud.callFunction:ok"requestID: "7cd07d46-2454-4024-934f-6a37a34b364b"result: {success: false, error: "invalid url rid: 67f8b07c-55bea4f6-516feb3b", errorCode: 40066}__proto__: Object index.js? [sm]:755 获取 waybillToken 失败: {success: false, error: "invalid url rid: 67f8b07c-55bea4f6-516feb3b", errorCode: 40066}(env: Windows,mp,1.06.2503281; lib: 3.7.12) (anonymous) @ index.js? [sm]:755 Promise.then (async) getWaybillToken @ index.js? [sm]:728 (anonymous) @ index.js? [sm]:613 Promise.then (async) checkLogistics @ index.js? [sm]:564 index.js? [sm]:761 错误信息: invalid url rid: 67f8b07c-55bea4f6-516feb3b(env: Windows,mp,1.06.2503281; lib: 3.7.12) 下面是云函数代码: // 云函数 getwaybilltoken/index.js const cloud = require('wx-server-sdk'); cloud.init({ env: 'xxxxxxxxxxxxxxxx' }); // 引入请求库 const rp = require('request-promise'); exports.main = async (event, context) => { console.log('接收到的参数:', event); try { // 获取access_token const tokenRes = await cloud.callFunction({ name: 'getaccesstoken' }); const accessToken = tokenRes.result.accessToken; console.log('获取到的accessToken:', accessToken); if (!accessToken) { console.log('未获取到有效的accessToken'); return { success: false, error: 'Failed to get access_token' }; } // 获取当前用户的openid const openid = event.openid || cloud.getWXContext().OPENID; console.log('使用的openid:', openid); // 处理商品信息,确保图片URL有效 let detailList = []; const goods = event.goods; const defaultImgUrl = "https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg"; // 微信官方示例图片 // 准备商品数据 if (goods && Array.isArray(goods) && goods.length > 0) { // 临时存储需要转换的云文件ID const cloudFileIDs = []; const goodsItemsMap = {}; // 用于关联云文件ID和商品项 goods.forEach((item, index) => { const imgUrl = item.image_url || item.image || ''; // 检查是否是云存储路径 if (imgUrl && imgUrl.startsWith('cloud://')) { cloudFileIDs.push(imgUrl); goodsItemsMap[imgUrl] = index; } }); // 如果有云存储路径,先转换为临时URL if (cloudFileIDs.length > 0) { try { console.log('开始转换云文件URL,文件数:', cloudFileIDs.length); const tempFileResult = await cloud.getTempFileURL({ fileList: cloudFileIDs }); console.log('获取临时文件URL结果:', tempFileResult); // 处理临时URL结果 if (tempFileResult && tempFileResult.fileList) { tempFileResult.fileList.forEach(fileItem => { if (fileItem.tempFileURL && goodsItemsMap[fileItem.fileID] !== undefined) { const index = goodsItemsMap[fileItem.fileID]; goods[index].convertedImageUrl = fileItem.tempFileURL; } }); } } catch (fileErr) { console.error('获取临时文件URL失败:', fileErr); } } // 构建最终的商品详情列表 detailList = goods.map(item => { // 优先使用转换后的URL,然后是原始URL,最后是默认URL let finalImgUrl = item.convertedImageUrl || item.image_url || item.image || ''; // 如果URL仍然不是http/https开头,使用默认URL if (!finalImgUrl || !finalImgUrl.startsWith('http')) { finalImgUrl = defaultImgUrl; } return { goods_name: item.name || '商品', goods_img_url: finalImgUrl }; }); } // 如果没有有效的商品信息,使用默认 if (detailList.length === 0) { detailList = [{ goods_name: item.name || '商品', goods_img_url: finalImgUrl }]; } // 构建请求参数 const waybillId = event.waybillId; const deliveryId = event.deliveryId; const receiverPhone = event.receiverPhone || ''; const transId = event.transId || ''; console.log('构建请求参数:', { waybillId, deliveryId, receiverPhone, transId, detailList: detailList }); // 构建请求体 const requestData = { waybill_id: waybillId, delivery_id: deliveryId, openid: openid, version: 1, goods_info: detailList, receiver_phone: receiverPhone || '', trans_id: transId || '' }; console.log('完整请求数据:', JSON.stringify(requestData)); // 调用微信物流API const result = await rp({ method: 'POST', url: `https://api.weixin.qq.com/cgi-bin/express/business/logistics/getpath?access_token=${accessToken}`, body: requestData, json: true }); console.log('物流API返回结果:', result); // 处理API响应 if (result.errcode === 0) { return { success: true, waybillToken: result.waybill_token }; } else { console.error('物流API返回错误:', result); return { success: false, error: result.errmsg || '获取物流路径失败', errorCode: result.errcode }; } } catch (error) { console.error('云函数执行异常:', error); return { success: false, error: error.message || '云函数执行异常' }; }};
物流API报"invalid url"错误:因为您的代码中使用了微信云开发的云存储路径(以"cloud://"开头),而物流API需要标准的HTTP/HTTPS URL。
// 显示加载中 wx.showLoading({ title: '加载物流信息...', mask: true }); // 查询订单信息,获取物流信息 const db = wx.cloud.database(); db.collection('orders').doc(orderId).get().then(res => { const orderData = res.data; // 确保有物流信息 if (!orderData.productLogistics || orderData.productLogistics.length === 0) { if (orderData.logistics && orderData.logistics.waybill_id) { // 使用旧版本物流信息 this.getWaybillToken(orderData.logistics.waybill_id, orderData.logistics.delivery_id || 'SF', orderData._openid, orderData.address.phone, orderData); } else { wx.hideLoading(); wx.showToast({ title: '暂无物流信息', icon: 'none' }); this.setData({ isButtonClick: false }); } return; } [图片] 查看物流 是调用的查询物流组件,不知道为什么卡在这里了
使用服务商模式授权的小程序,在调用创建配送单接口时,在小程序后台api安全中没有开启配置,也没有设置密钥,但是调用接口时,提示:{"errcode":934011,"errmsg":"signature is needed, please refer document for help [https:\/\/developers.weixin.qq.com\/miniprogram\/dev\/OpenApiDoc\/getting_started\/api_signature.html] rid: 67f5e82b-29c14bd8-4e78e84f"}。 然后在小程序后台api安全中设置了对称密钥和非对称密钥,接口请求也加密和加签,调用接口时,提示:{"errcode":40237,"errmsg":"invalid Wechatmp-Appid match request rid: 67f76dd9-0f13c6f3-2aad5cc3"} 然后又依照提示,将调用接口请求头中的Wechatmp-Appid换成了服务商的component_appid,提示:{"errcode":40238,"errmsg":"developer secret sym serial not existed rid: 67f77e53-7fbafcd7-44b46a23"} 请问下后面要如何处理,是要在服务商appid上设置对称密钥么?或者有没有办法关闭微信同城配送的加密加签?
在物流查询组件中,查询运单接口trace_waybill需要trans_id 微信支付单号) https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/express_search.html 请问这个微信支付单号如何获取?
rt
[图片] [图片] [图片] 小程序管理后台未开启api加密,微信同城配送接口报错934011,如何解决? {"errcode":934011,"errmsg":"signature is needed, please refer document for help [https:\/\/developers.weixin.qq.com\/miniprogram\/dev\/OpenApiDoc\/getting_started\/api_signature.html] rid: 67f5e82b-29c14bd8-4e78e84f"}
小程序想要申请 交易与支付 - 物流服务 但是接入这个组件需要有支付行为,但是我的小程序的支付业务都是线下汇款的,我想要接入这个组件,还有什么办法
1)仅支持查询「引用查询组件的小程序」产生的购物订单的物流运单。 2)仅支持给「已订阅微信快递服务」且订单实际购买者下发消息。 若违反监管条理,进行相应处罚,包括但不限于降低调用频次、禁用插件能力等 是只要小程序引用了这个插件就可以用,还是说这个快递得是通过微信快递接口发货的才能用这个查询组件进行查询?
请问一下,小程序后台的物流轨迹这块是免费使用吗,是直接到我做的小程序里就能查询吗还是要到小程序通知里去查询[图片][图片]
微信小程序包含宠物托运没有符合的物流公司怎么发货
可以查下API接口的格式有没有按规范写。