mars.js 672 Bytes
import wx from "../../utils/wx";

Page({
  data: {
    url: '',
  },
  onLoad: function(options) {
    //Do some initialize when page load.
  },
  onReady: function() {
    //Do some when page ready.
    
  },
  onShow: function() {
    //Do some when page show.
    let that = this
    wx.getStorage({
      key: 'mars',
      success: function (res) {
        if (res.data.length > 0) {
          that.setData({ url : res.data});
        }
      }
    })
  },
  onHide: function() {
    //Do some when page hide.
    
  },
  onUnload: function() {
    //Do some when page unload.
    
  },
  onPullDownRefresh: function() {
    //Do some when page pull down.
    
  }
})