C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.4 KiB

  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. market:app.globalData.market,
  10. imgUrls: [
  11. 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
  12. 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
  13. 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
  14. ],
  15. swiperCurrent: 0,
  16. scrollTop: 0
  17. },
  18. swiperChange: function (e) {
  19. this.setData({
  20. swiperCurrent: e.detail.current
  21. })
  22. },
  23. //页面滚动执行方式
  24. onPageScroll(event) {
  25. // console.log(event.scrollTop);
  26. // this.setData({
  27. // scrollTop: event.scrollTop
  28. // })
  29. },
  30. /**
  31. * 生命周期函数--监听页面加载
  32. */
  33. onLoad: function (options) {
  34. },
  35. /**
  36. * 生命周期函数--监听页面初次渲染完成
  37. */
  38. onReady: function () {
  39. },
  40. /**
  41. * 生命周期函数--监听页面显示
  42. */
  43. onShow: function () {
  44. },
  45. /**
  46. * 生命周期函数--监听页面隐藏
  47. */
  48. onHide: function () {
  49. },
  50. /**
  51. * 生命周期函数--监听页面卸载
  52. */
  53. onUnload: function () {
  54. },
  55. /**
  56. * 页面相关事件处理函数--监听用户下拉动作
  57. */
  58. onPullDownRefresh: function () {
  59. },
  60. /**
  61. * 页面上拉触底事件的处理函数
  62. */
  63. onReachBottom: function () {
  64. },
  65. /**
  66. * 用户点击右上角分享
  67. */
  68. onShareAppMessage: function () {
  69. }
  70. })