1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view>
- <map id="Mymap" class="Mymap" :longitude="my.longitude" :latitude="my.latitude" scale="16" :markers="markers"
- bindregionchange="" bindtap="" bindupdated="" />
- <view class="search-box">
- <My_search />
- </view>
- <My_listbox boxBackground="#fff">
- </My_listbox>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- my: {
- longitude: "",
- latitude: ""
- },
- markers: []
- }
- },
- onLoad() {
- this.getLocation(true).then(my => {
- this.my = my;
- console.log(my)
- })
- uni.setNavigationBarTitle({
- title: '地图选点'
- });
- setTimeout(() => {
- this.$Http.basic({
- id: "10030901",
- content: {
- postStr: {
- "yingjiType": 1,
- "sourceType": 0,
- "keyWord": "楚楚吊顶",
- "level": 6,
- "mapBound": "113.75989136166874,29.393072654041134,128.27534863832096,32.031873462231246",
- "queryType": "4",
- "start": 0,
- "count": 10,
- "queryTerminal": 10000
- }
- }
- }).then(res => {
- console.log("搜索地点", res)
- })
- }, 500)
- }
- }
- </script>
- <style lang="scss" scoped>
- .Mymap {
- width: 100vw;
- height: 300px;
- }
- .search-box {
- width: 100vw;
- padding: 10px;
- box-sizing: border-box;
- background: #fff;
- }
- </style>
|