## 开柜码 入口:微信扫码-二维码-微信(公众号)网页-友朋自取柜开门页面 入口:微信扫码-小程序普通链接二维码-微信小程序-友朋自取柜开门页面 ``` # 开柜码-公众号 https://wx.palmnest.com/super_cloud/api/wechat/q/r/?p=2&p1=615&p2=377&_s=deviceNo%253D646dcddb4efb9500119f88d8%2526doorNum%253D1 # 开柜码-小程序 https://wx.palmnest.com/super_cloud/pcm/shortcut/service_routine_uni/?p1=615&p2=377&extParam=deviceNo%3D646dcddb4efb9500119f88d8%26doorNum%3D1 # 扫码后跳转的地址 http://wx.palmnest.com/super_cloud/wx/flashdeliver/?module=youpengGood&openId=o9oSq06JGLNbtqgdzVxIkzBxXBpk&developId=gh_bb8ab88fc77a&state=56&orgId=615&userId=56936&deviceNo=646dcddb4efb9500119f88d8&doorNum=1&userToken=f8adc85c348b35f262923c768b8ab77d&_t=1690852644242#/productList # 开门结果页面 http://localhost:8080/?module=youpengGood&openId=opqnX4lsaJ_JP5Yy_-6fe7B1S6sA&developId=gh_bb8ab88fc77a&state=56&orgId=615&userId=56936&deviceNo=646dcddb4efb9500119f88d8&doorNum=1&appid=wx6b56151bcbde1246&service=1&vconsole=show&_t=1690875122571&userToken=dfff8e82594d0808811ee86ae66f78fe#/payResult?code=SUCCESS&orderNo=LS202308011532050114&doorResCode=loading ``` ## 业务流程 - 模拟扫普通链接二维码打开【超级前台】小程序 p1(项目 ID): 615 p2(服务 ID): 友朋自取柜 extParam(扩展参数): `设备号: 180254164008` [微信普通链接二维码链接](https://wx.palmnest.com/super_cloud/pcm/shortcut/service_routine_uni/?p1=615&p2=377&extParam=deviceNo%3D180254164008) - 模拟查询微信支付分是否达标请求 - 确认开门请求 - 订单结算/订单列表 ## 小程序端 服务之窗 ``` # 扫码入口:微信扫一扫-跳转【超级前台】(北大)小程序-快速入口跳转服务(自取柜)- .... https://wx.palmnest.com/super_cloud/pcm/shortcut/service_routine_uni/xxx # 扫码入口:微信扫一扫-跳转【云卡】小程序-快速入口跳转服务(自取柜)- .... https://wx.palmnest.com/super_cloud/pcm/shortcut/cloud_card_uni/?p1=2855&p2=377&extParam=deviceNo%3D646dcddb4efb9500119f88d8%26doorNum%3D1 # 小程序原生开门页面 "condition": { "miniprogram": { "list": [ { "name": "友朋自取柜页面", "pathName": "pages/youpengGood/productList", "query": "deviceNo=646dcddb4efb9500119f88d8&doorNum=1", "launchMode": "default", "scene": null } ] } } # 小程序订阅消息-订单支付通知 "condition": { "miniprogram": { "list": [ { "name": "订阅消息-订单支付通知", "pathName": "pages/home/index", "query": "tmplId=7630q_9PMjxYb55cNaSpmMG8ktX2q_yhK-BApzm88pw&orderId=LS202308221638101282", "launchMode": "default", "scene": null } ] } } # 消息卡片-订单支付通知-跳转页面 带参示例`pages/home/index?tmplId=7630q_9PMjxYb55cNaSpmMG8ktX2q_yhK-BApzm88pw&orderId=LS202308221638101282` ``` ## 开发配置 ### 小程序后台 如果需要接收到小程序推送通知消息-自取柜扣款结果,需要以下操作(参考超级前台小程序) 1. 小程序后台-开发管理-开发设置-消息推送-启用并且填写相关配置信息 2. 小程序后台-功能-订阅消息-选用模版(订单支付通知) ### 小程序前端 1. 修改订阅消息配置,换成从后台复制的`模版ID` ```js /** * 订阅消息配置 */ subscribeMessageConfig: { '8p_a2dcQeqa4lqPuZlbyC4F1VZm5K-Y1bWhYVPLnoQ4': { jumpAddress: '/super_cloud/wx/flashdeliver/?module=youpengGood#/orderDetail', jumpQuery: { orderId: '', }, linkUrlType: '1', }, youpengGoodOpenDoor: { tmplIds: ['8p_a2dcQeqa4lqPuZlbyC4F1VZm5K-Y1bWhYVPLnoQ4'], }, }, ```