12345678910111213141516171819202122232425262728293031323334353637 |
- // index.js
- // 获取应用实例
- const app = getApp()
- const {
- formatTime
- } = require('../../utils/util')
- function add(x, y) {
- return x + y
- }
- Page({
- data: {
- x: 1,
- y: 1,
- address: {
- province: '黑龙江',
- city: '哈尔滨',
- district: '松北',
- community: '地中海'
- },
- color: 'hotpink',
- fontSize: '20px',
- time: formatTime(new Date()),
- total: add(x, y)
- },
- onLoad() {
- // var newTime = formatTime(new Date())
- // console.log(newTime)
- // this.setData({
- // time: newTime
- // })
- },
- })
|