index.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // nova-tourism/pages/my/my-order/my-refund/refund-good/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. statusBarHeight: 0,
  8. screenHeight: 0,
  9. customHeight: 0,
  10. bottomNavHeight: 0,
  11. contentHeight: 0,
  12. text: '',
  13. // 图片
  14. fileList: [],
  15. uptokenURL: '',
  16. domain: '',
  17. uploadURL: '',
  18. },
  19. /**
  20. * 生命周期函数--监听页面加载
  21. */
  22. onLoad(options) {
  23. const systemInfo = wx.getSystemInfoSync();
  24. const statusBarHeight = systemInfo.statusBarHeight || 0;
  25. const screenHeight = systemInfo.screenHeight || 0;
  26. const custom = wx.getMenuButtonBoundingClientRect();
  27. const customHeight = custom.height + 10 + 2 || 0;
  28. const bottomNavHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom || 0;
  29. const contentHeight = (screenHeight - bottomNavHeight - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth;
  30. this.setData({
  31. statusBarHeight,
  32. screenHeight,
  33. customHeight,
  34. bottomNavHeight,
  35. contentHeight
  36. });
  37. },
  38. /**
  39. * 生命周期函数--监听页面初次渲染完成
  40. */
  41. onReady() {
  42. },
  43. /**
  44. * 生命周期函数--监听页面显示
  45. */
  46. onShow() {
  47. },
  48. /**
  49. * 生命周期函数--监听页面隐藏
  50. */
  51. onHide() {
  52. },
  53. /**
  54. * 生命周期函数--监听页面卸载
  55. */
  56. onUnload() {
  57. },
  58. /**
  59. * 页面相关事件处理函数--监听用户下拉动作
  60. */
  61. onPullDownRefresh() {
  62. },
  63. /**
  64. * 页面上拉触底事件的处理函数
  65. */
  66. onReachBottom() {
  67. },
  68. /**
  69. * 用户点击右上角分享
  70. */
  71. onShareAppMessage() {
  72. }
  73. })