xungengdetails.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // pages/xungengdetails/xungengdetails.js
  2. import http from '../../base/httputil'
  3. const app = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. id: null,
  10. host: app.globalData.host,
  11. //店铺经纬度
  12. latitude: 43.8691319,
  13. longitude: 125.3504459,
  14. //标记点
  15. markers: [{
  16. id: 0,
  17. name: "编程小石头",
  18. address: "长春首佳科技有限公司",
  19. latitude: 43.8691319,
  20. longitude: 125.3504459,
  21. width: 35,
  22. height: 50
  23. }]
  24. },
  25. /**
  26. * 生命周期函数--监听页面加载
  27. */
  28. onLoad(options) {
  29. console.log("@@@",options.id)
  30. this.setData({
  31. id:options.id
  32. })
  33. this.getDetails(options.id)
  34. },
  35. getDetails(id){
  36. let obj = new Object();
  37. obj.id = this.data.id
  38. http.post("/system/AppEnterpriseController/getEnterpriseDetails", obj, this.getDetailsSuccess)
  39. },
  40. getDetailsSuccess(res){
  41. },
  42. /**
  43. * 生命周期函数--监听页面初次渲染完成
  44. */
  45. onReady() {
  46. },
  47. /**
  48. * 生命周期函数--监听页面显示
  49. */
  50. onShow() {
  51. },
  52. /**
  53. * 生命周期函数--监听页面隐藏
  54. */
  55. onHide() {
  56. },
  57. /**
  58. * 生命周期函数--监听页面卸载
  59. */
  60. onUnload() {
  61. },
  62. /**
  63. * 页面相关事件处理函数--监听用户下拉动作
  64. */
  65. onPullDownRefresh() {
  66. },
  67. /**
  68. * 页面上拉触底事件的处理函数
  69. */
  70. onReachBottom() {
  71. },
  72. /**
  73. * 用户点击右上角分享
  74. */
  75. onShareAppMessage() {
  76. }
  77. })