index.js 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. const util = require("../../util/util.js")
  5. Page({
  6. data: {
  7. StatusBar: app.globalData.StatusBar,
  8. CustomBar: app.globalData.CustomBar,
  9. CustomRate: app.globalData.CustomRate,
  10. info:{},
  11. swiperList:[],
  12. hot_list:[],
  13. },
  14. goCamara: function (el) {
  15. wx.navigateTo({
  16. url: '../flower/identify',
  17. })
  18. },
  19. onLoad: function ( ) {
  20. this.loadData()
  21. },
  22. loadData :function( cb ){
  23. let that = this
  24. util.http("/base/getActiveAd", {}, function (err, res) {
  25. if( err == 0){
  26. that.setData({ swiperList:res})
  27. }
  28. cb && cb()
  29. });
  30. },
  31. gotoIdentify:()=>{
  32. wx.navigateTo({
  33. url: '/pages/tool/identify/index',
  34. })
  35. },
  36. onShareAppMessage: function () {
  37. }
  38. })