微信小程序引用同一js文件中的方法函数(function) 刺心疯 2021-06-24 82 阅读1分钟 在小程序的js文件中,有时候我们也要复用同一js的一个或多个方法。如下即可 /** * 生命周期函数–监听页面显示 */ onShow: function (options) { var that=this; that.queryCartList(); }, queryCartList:function(){ console.log(‘ok’) }