index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view>
  3. <map id="Mymap" class="Mymap" :longitude="my.longitude" :latitude="my.latitude" scale="16" :markers="markers"
  4. bindregionchange="" bindtap="" bindupdated="" />
  5. <view class="search-box">
  6. <My_search />
  7. </view>
  8. <My_listbox boxBackground="#fff">
  9. </My_listbox>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. my: {
  17. longitude: "",
  18. latitude: ""
  19. },
  20. markers: []
  21. }
  22. },
  23. onLoad() {
  24. this.getLocation(true).then(my => {
  25. this.my = my;
  26. console.log(my)
  27. })
  28. uni.setNavigationBarTitle({
  29. title: '地图选点'
  30. });
  31. setTimeout(() => {
  32. this.$Http.basic({
  33. id: "10030901",
  34. content: {
  35. postStr: {
  36. "yingjiType": 1,
  37. "sourceType": 0,
  38. "keyWord": "楚楚吊顶",
  39. "level": 6,
  40. "mapBound": "113.75989136166874,29.393072654041134,128.27534863832096,32.031873462231246",
  41. "queryType": "4",
  42. "start": 0,
  43. "count": 10,
  44. "queryTerminal": 10000
  45. }
  46. }
  47. }).then(res => {
  48. console.log("搜索地点", res)
  49. })
  50. }, 500)
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .Mymap {
  56. width: 100vw;
  57. height: 300px;
  58. }
  59. .search-box {
  60. width: 100vw;
  61. padding: 10px;
  62. box-sizing: border-box;
  63. background: #fff;
  64. }
  65. </style>