我看收钱吧的码牌,微信小程序支付完成后,在支付回调界面直接拉起了半屏小程序,有人知道这个如何做到的吗
拉起半屏插件小程序拉起半屏插件小程序的同时延迟做页面的跳转,此时应为直接拉起的半屏插件小程序,为什么会出现授权弹窗
2024-03-13麻烦问下,exports.beforeRequestPayment 如何传参到控件呢
小程序插件支付功能页调用失败已按照文档说明配置,还是报 callMiniProgramFunction:fail File not found 因为插件开发,涉及源小程序和插件两个部分,很难提供代码片段,核心内容如下: 小程序中 app.json 已配置 "functionalPages": true 根目录下建立文件 functional-pages/request-payment.js 如下 [代码]exports.beforeRequestPayment = [代码][代码]function[代码][代码](paymentArgs, callback) {[代码][代码] [代码][代码]wx.login({[代码][代码] [代码][代码]success(data) {[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]method: [代码][代码]'POST'[代码][代码],[代码][代码] [代码][代码]url: [代码][代码]'https://foo.com/api/login'[代码][代码],[代码][代码] [代码][代码]data: { code: data.code },[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]method: [代码][代码]'POST'[代码][代码],[代码][代码] [代码][代码]url: [代码][代码]'https://foo.com/api/order'[代码][代码],[代码][代码] [代码][代码]data: paymentArgs,[代码][代码] [代码][代码]header: { Token: res.data.token },[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]if[代码] [代码](res.data.code == 0) {[代码][代码] [代码][代码]callback([代码][代码]null[代码][代码], res.data.data)[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]callback(res.data.message)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]callback(res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]callback(res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]callback(res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]})[代码][代码]}[代码] 插件中 [代码]<[代码][代码]functional-page-navigator[代码] [代码]version[代码][代码]=[代码][代码]"develop"[代码][代码] [代码][代码]name[代码][代码]=[代码][代码]"requestPayment"[代码][代码] [代码][代码]args[代码][代码]=[代码][代码]"{{ { fee: total, paymentArgs: paymentArgs } }}"[代码][代码] [代码][代码]bind:success[代码][代码]=[代码][代码]"paymentSuccess"[代码][代码] [代码][代码]bind:fail[代码][代码]=[代码][代码]"paymentFailed"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]button[代码] [代码]type[代码][代码]=[代码][代码]"primary"[代码][代码]>微信支付</[代码][代码]button[代码][代码]>[代码][代码]</[代码][代码]functional-page-navigator[代码][代码]>[代码]
2022-04-18