微信小程序app.js 调用pages页面里 指定js里面的方法

在app.js里面的globalData定义参数 之后在apply-voucher.js里面的成功回调函数里面写上 app.globalData.indexJS = that 然后在app.js里面的回调函数里面写上 that.globalData.indexJS.方法名即可调用其它页面的方法 例如 that.globalData.indexJS.checkDingYue(codeId) 这样就调
相关文章
相关标签/搜索