Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //logs.js 页面逻辑
- const util = require('../../utils/util.js')//使用 require(path) 将公共代码引入, require 暂时不支持绝对路径
- Page({//进行页面的注册
- data: {
- logs: []
- },
- onLoad: function () {
- this.setData({
- logs: (wx.getStorageSync('logs') || []).map(log => {
- return util.formatTime(new Date(log))//
- })
- })
- }
- })
Add Comment
Please, Sign In to add comment