search.js 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import http from '../../base/httputil'
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 组件的初始数据
  6. */
  7. data: {
  8. host: app.globalData.host,
  9. enterpriseList: [],
  10. },
  11. onLoad() {
  12. this.list(null)
  13. },
  14. // 搜索结果跳页
  15. bindViewSearchEnd() {
  16. wx.navigateTo({
  17. url: '../search/search'
  18. })
  19. },
  20. // 企业详细页
  21. bindViewDetails(e) {
  22. let busEnterpriseId = e.currentTarget.dataset.enterpriseid
  23. wx.navigateTo({
  24. url: '../details/details?busEnterpriseId='+busEnterpriseId
  25. })
  26. },
  27. searchEnterprise(e) {
  28. var obj = new Object()
  29. obj.businessName = e.detail.value
  30. this.list(obj)
  31. },
  32. list(data) {
  33. http.post("/system/AppEnterpriseController/getInitEnterpriseList", data, this.getQiyeEnterpriseListSuccess)
  34. },
  35. getQiyeEnterpriseListSuccess(res) {
  36. this.setData({
  37. enterpriseList: res.rows
  38. })
  39. }
  40. })