daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest May 16th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //logs.js 页面逻辑
  2. const util = require('../../utils/util.js')//使用 require(path) 将公共代码引入, require 暂时不支持绝对路径
  3. Page({//进行页面的注册
  4.   data: {
  5.     logs: []
  6.   },
  7.   onLoad: function () {
  8.     this.setData({
  9.       logs: (wx.getStorageSync('logs') || []).map(log => {
  10.         return util.formatTime(new Date(log))//
  11.       })
  12.     })
  13.   }
  14. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top