123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <template>
- <view class="content">
- <view id="map" class="map">
- <map @updated='mapChange' id="map_1" ref='map_1' style="width:750rpx; height: 600rpx" :latitude="latitude"
- :longitude="longitude" ></map>
- </view>
- </view>
- </template>
- <script>
- import {
- getcomAddress
-
-
- } from '@/api/index.js';
- export default{
- data() {
- return{
-
-
-
-
- }
- },
- onLoad() {
-
-
- window.location.href = `https://apis.map.qq.com/tools/locpicker?search=1&type=0&backurl=http://3gimg.qq.com/lightmap/components/locationPicker2/back.html&key=yourkey&referer=myapp`
- console.log(window.location.href)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this.loadData()
- },
- methods:{
-
- mapChange(e) {
- console.log(e);
- },
- async loadData() {
- let obj = this;
-
- console.log('进入loadData')
- getcomAddress({
- longitude:39.909,
- latitude: 116.39742,
- common_address:'首都'
- }).then((res) => {
- console.log(res)
- console.log('进入getcomAddress的成功')
- let data = res.data;
- uni.hideLoading();
- console.log('请求数据', data);
-
-
-
-
-
-
-
- }).catch(err => {
- console.log('进入getcomAddress的失败')
- console.log(err);
- uni.hideLoading();
- uni.showModal({
- title: '失败',
- content: JSON.stringify()
- });
- });
- },
- }
- }
- </script>
- <style>
- </style>
|