index.js 570 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // index.js
  2. // 获取应用实例
  3. const app = getApp()
  4. const {
  5. formatTime
  6. } = require('../../utils/util')
  7. function add(x, y) {
  8. return x + y
  9. }
  10. Page({
  11. data: {
  12. x: 1,
  13. y: 1,
  14. address: {
  15. province: '黑龙江',
  16. city: '哈尔滨',
  17. district: '松北',
  18. community: '地中海'
  19. },
  20. color: 'hotpink',
  21. fontSize: '20px',
  22. time: formatTime(new Date()),
  23. total: add(x, y)
  24. },
  25. onLoad() {
  26. // var newTime = formatTime(new Date())
  27. // console.log(newTime)
  28. // this.setData({
  29. // time: newTime
  30. // })
  31. },
  32. })