mine.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // pages/mine/mine.ts
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. // 功能菜单项
  8. menulists: [{id: 1, title: '资金资产', img: 'cart-circle', path: "/mMine/pages/assets/assets"},
  9. {id: 2, title: "交易服务", img: 'point-gift', path: "/mMine/pages/tradeserver/tradeserver"},
  10. {id: 3, title: '现货挂牌', img: 'underway', path: "/mTrade/pages/listing/listing"},
  11. {id: 4, title: '仓储服务', img: 'hot', path: "/mMine/pages/storageserver/storageserver"}],
  12. // 列表菜单项
  13. tablelists: [{id: 1, title: '实名认证', path: "/mMine/pages/realauth/realauth"},
  14. {id: 2, title: '签约解约管理', path: "/mMine/pages/bank/bank"},
  15. {id: 3, title: '我的库存', path: "/mMine/pages/myinventorys/myinventorys"},
  16. {id: 4, title: '单据查询', path: "/mMine/pages/ordersearch/ordersearch"},
  17. {id: 5, title: '我的订单', path: "/mMine/pages/myorders/myorders"},
  18. {id: 6, title: '我的报表', path: "/mMine/pages/myreports/myreports"}],
  19. /// 微信头像
  20. avatarUrl: "",
  21. /// 微信昵称
  22. nickName: ""
  23. },
  24. /**
  25. * 进入系统设置
  26. */
  27. goToSettings() {
  28. wx.navigateTo({
  29. url: '/mMine/pages/settings/settings'
  30. })
  31. },
  32. /**
  33. * 生命周期函数--监听页面加载
  34. */
  35. onLoad() {
  36. /// 获取微信头像
  37. let url = wx.getStorageSync('avatarUrl')
  38. if (url) {
  39. this.setData({
  40. avatarUrl: url
  41. })
  42. }
  43. },
  44. /**
  45. * 生命周期函数--监听页面初次渲染完成
  46. */
  47. onReady() {
  48. },
  49. /**
  50. * 生命周期函数--监听页面显示
  51. */
  52. onShow() {
  53. this.getTabBar().init()
  54. },
  55. /**
  56. * 生命周期函数--监听页面隐藏
  57. */
  58. onHide() {
  59. },
  60. /**
  61. * 生命周期函数--监听页面卸载
  62. */
  63. onUnload() {
  64. },
  65. /**
  66. * 页面相关事件处理函数--监听用户下拉动作
  67. */
  68. onPullDownRefresh() {
  69. },
  70. /**
  71. * 页面上拉触底事件的处理函数
  72. */
  73. onReachBottom() {
  74. },
  75. /**
  76. * 用户点击右上角分享
  77. */
  78. onShareAppMessage() {
  79. }
  80. })