比如下面的代碼我定義了一個test方法我想在頁面加載完成后自動調(diào)用可為什么無效呢?Page({data:{motto:'HelloWorld',userInfo:{},hasUserInfo:false,canIUse:wx.canIUse('button.open-type.getUserInfo')},test(){console.log(1)},onLoad:function(){this.test}})
小程序自定義方法寫在Page的哪里?各位有什么建議?
瀟瀟雨雨
2019-07-27 00:29:02