daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest May 16th, 2018 90 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
Top