|
@@ -88,10 +88,7 @@
|
|
|
|
|
|
<script>
|
|
|
var that;
|
|
|
- var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk.min.js');
|
|
|
- var qqmapsdk = new QQMapWX({
|
|
|
- key: 'HQ6BZ-RMALQ-TGF5H-BXJQB-UFYN3-Q5BYM'
|
|
|
- });
|
|
|
+ var GDMapWX = require('@/js_sdk/js-amap/amap-wx.130.js');
|
|
|
|
|
|
import uniTag from '@/uni_modules/uni-tag/components/uni-tag/uni-tag.vue';
|
|
|
import MoteLinesDivide from "@/components/text-over-flow/text-over-flow.vue"
|
|
@@ -238,21 +235,36 @@
|
|
|
}
|
|
|
this.longitude = _obj.longitude
|
|
|
this.latitude = _obj.latitude
|
|
|
- qqmapsdk.reverseGeocoder({
|
|
|
- location: _obj,
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- that.detailedAddress = res.result.formatted_addresses.recommend
|
|
|
- that.mescroll.resetUpScroll()
|
|
|
- },
|
|
|
- fail: function(error) {
|
|
|
- console.error(error);
|
|
|
- },
|
|
|
- complete: function(res) {
|
|
|
- // console.log(res);
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
+ var amapPluginInstance = new GDMapWX.AMapWX({
|
|
|
+ key: '6bafe91754a563ff2b7c02542c1ef4e8'
|
|
|
+ });
|
|
|
+ amapPluginInstance.getRegeo({
|
|
|
+ success: function(res){
|
|
|
+ console.log(res)
|
|
|
+ that.detailedAddress = res[0].desc
|
|
|
+ that.mescroll.resetUpScroll()
|
|
|
+ //成功回调
|
|
|
+ },
|
|
|
+ fail: function(info){
|
|
|
+ //失败回调
|
|
|
+ console.log(info)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // qqmapsdk.reverseGeocoder({
|
|
|
+ // location: _obj,
|
|
|
+ // success: function(res) {
|
|
|
+ // console.log(res)
|
|
|
+ // that.detailedAddress = res.result.formatted_addresses.recommend
|
|
|
+ // that.mescroll.resetUpScroll()
|
|
|
+ // },
|
|
|
+ // fail: function(error) {
|
|
|
+ // console.error(error);
|
|
|
+ // },
|
|
|
+ // complete: function(res) {
|
|
|
+ // // console.log(res);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // })
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -291,9 +303,9 @@
|
|
|
that.longitude = res.longitude
|
|
|
uni.setStorageSync("findlatitude", res.latitude)
|
|
|
uni.setStorageSync("findlongitude", res.longitude)
|
|
|
- let _address = that.$helper.formatLocation(res.address)
|
|
|
- that.detailedAddress = _address.Village
|
|
|
- uni.setStorageSync("detailedAddress", _address.Village)
|
|
|
+ // let _address = that.$helper.formatLocation(res.address)
|
|
|
+ that.detailedAddress = res.name
|
|
|
+ uni.setStorageSync("detailedAddress", res.name)
|
|
|
that.$forceUpdate()
|
|
|
that.upCallback({
|
|
|
num: 1,
|