sub.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // pages/element/button/foot.js
  2. Page({
  3. data: {
  4. ctype: '',
  5. clist: [],
  6. glo_is_load: true
  7. },
  8. onLoad: function (options) {
  9. var that = this
  10. var ctype = options.ctype;
  11. that.setData({
  12. ctype: ctype,
  13. })
  14. var this_title = '';
  15. if (ctype == 'foot') {
  16. this_title = '固定在底部'
  17. } else if (ctype == 'fixed') {
  18. this_title = '悬浮按钮'
  19. }
  20. wx.setNavigationBarTitle({
  21. title: this_title
  22. })
  23. },
  24. /**
  25. * 生命周期函数--监听页面初次渲染完成
  26. */
  27. onReady: function () {
  28. },
  29. /**
  30. * 生命周期函数--监听页面显示
  31. */
  32. onShow: function () {
  33. },
  34. /**
  35. * 生命周期函数--监听页面隐藏
  36. */
  37. onHide: function () {
  38. },
  39. /**
  40. * 生命周期函数--监听页面卸载
  41. */
  42. onUnload: function () {
  43. },
  44. /**
  45. * 页面相关事件处理函数--监听用户下拉动作
  46. */
  47. onPullDownRefresh: function () {
  48. },
  49. /**
  50. * 页面上拉触底事件的处理函数
  51. */
  52. onReachBottom: function () {
  53. },
  54. /**
  55. * 用户点击右上角分享
  56. */
  57. onShareAppMessage: function () {
  58. }
  59. })