V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
killersdz

小程序如何在别的地方执行 A 页面的 onLoad 方法

  •  
  •   killersdz · Feb 13, 2019 · 3550 views
    This topic created in 2642 days ago, the information mentioned may be changed or developed.
    我现在有个需求,就是先弹出个弹窗,按确定后当前页面刷新,因为这个弹窗很多地方都用到,所以我把 wx.showModal 弹窗方法写到 pages 外的 util.js 页面里,但是后来发现怎样在 util.js 里怎么调用 引用页的 onLoad 方法,有大神可以指教一下吗
    1 replies    2019-02-13 16:32:52 +08:00
    imgss
        1
    imgss  
       Feb 13, 2019
    onLoad 是个生命周期方法,哪有手动调用的,另外,在[社区]( https://developers.weixin.qq.com/)问不是更好吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2680 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 15:49 · PVG 23:49 · LAX 08:49 · JFK 11:49
    ♥ Do have faith in what you're doing.