mine.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // pages/mine/mine.ts
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. // 功能菜单项
  8. menulists: [{id: 1, title: '我的库存', img: 'medal', path: "/mMine/pages/myinventorys/myinventorys"},
  9. {id: 2, title: "我的订单", img: 'invitation', path: "/mMine/pages/myorders/myorders"},
  10. {id: 3, title: '我的履约', img: 'underway', path: "/mMine/pages/myperformance/myperformance"},
  11. {id: 4, title: '我的出境', img: 'hot', path: "/mHome/pages/inspection/inspection"},
  12. {id: 5, title: '我的保税', img: 'fire-o', path: "/mHome/pages/bond/bond"}],
  13. // 列表菜单项
  14. tablelists: [{id: 1, title: '签约账户', path: "/mMine/pages/bank/bankh"},
  15. {id: 2, title: '收货地址', path: ""},
  16. {id: 3, title: '发票信息', path: ""},
  17. {id: 4, title: '账户安全', path: ""},
  18. {id: 5, title: '关于我们', path: ""}],
  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. })