index.js 740 B

1234567891011121314151617181920212223242526272829303132333435
  1. Page({
  2. data: {
  3. width: 300, height: 300,
  4. renderWidth: 300, renderHeight: 300,
  5. texts: []
  6. },
  7. onShow() {
  8. wx.hideHomeButton();
  9. },
  10. onHide() {
  11. wx.showHomeButton();
  12. },
  13. onLoad() {
  14. const info = wx.getSystemInfoSync();
  15. const width = info.windowWidth;
  16. const height = info.windowHeight;
  17. const dpi = info.pixelRatio;
  18. this.setData({
  19. width, height,
  20. renderWidth: width * dpi,
  21. renderHeight: height * dpi
  22. });
  23. },
  24. handleChangeTexts: function({detail}) {
  25. this.setData({texts: detail});
  26. },
  27. handleShowNote: function({detail}) {
  28. wx.showModal({
  29. title: '最后的记录',
  30. content: detail,
  31. showCancel: false,
  32. confirmText: '放下记录'
  33. });
  34. }
  35. })