| | |
| | | }); |
| | | |
| | | // Vue.prototype.$baseUrl = 'http://192.168.1.4:10011' |
| | | |
| | | _vue.default.prototype.$baseUrl = 'https://llfc.lmpro.cn/nyx_web/'; |
| | | _vue.default.prototype.$gaodeMapKey = 'e4d46c87adf151dca20060317592b1b6'; |
| | | var app = new _vue.default(_objectSpread({ |
| | | store: _index.default |
| | | }, _App.default)); |
| | |
| | | var _vuex = __webpack_require__(/*! vuex */ 37); |
| | | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } |
| | | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } |
| | | // var QQMapWX = require('@/utils/qqmap-wx-jssdk.js') |
| | | var amapFile = __webpack_require__(/*! @/utils/amap-wx.130.js */ 38); |
| | | var _default = { |
| | | computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo', 'token'])), |
| | |
| | | latitude: addr.latitude, |
| | | longitude: addr.longitude |
| | | }; |
| | | // uni.setStorageSync('address', locParam); |
| | | var address = null; |
| | | var myAmapFun = new amapFile.AMapWX({ |
| | | key: 'e4d46c87adf151dca20060317592b1b6' |
| | | key: that.$gaodeMapKey |
| | | }); |
| | | myAmapFun.getRegeo({ |
| | | location: addr.longitude + ',' + addr.latitude, |
| | |
| | | while (1) { |
| | | switch (_context3.prev = _context3.next) { |
| | | case 0: |
| | | console.log(data, '==================获取地址'); |
| | | info = data[0]; |
| | | console.log(info, '==================获取地址'); |
| | | locParam.province = info.province; |
| | | locParam.city = info.regeocodeData.addressComponent.city; |
| | | ta = info.name || '地址获取失败'; |
| | | ta = info.desc || '地址获取失败'; |
| | | locParam.address = ta; |
| | | _context3.next = 8; |
| | | return that.$u.api.getCityByName({ |
| | |
| | | that.$isResolve(); |
| | | } |
| | | }); |
| | | |
| | | // const qqmapsdk = new QQMapWX({ |
| | | // key: 'WE3BZ-HN6WS-ONDOH-62QCV-MNL6F-5NFNE' |
| | | // }); |
| | | // qqmapsdk.reverseGeocoder({ |
| | | // locParam, |
| | | // success: async function(res) { |
| | | // console.log(res, '==================获取地址'); |
| | | // let info = res.result; |
| | | // locParam.province = info.address_component.province; |
| | | // locParam.city = info.address_component.city; |
| | | // locParam.area = info.address_component.district; |
| | | // locParam.street = info.address_component.street; |
| | | // var ta = info.address || '地址获取失败' ; |
| | | // if(info.formatted_addresses && info.formatted_addresses.recommend){ |
| | | // ta =info.formatted_addresses.recommend |
| | | // } |
| | | // locParam.address =ta |
| | | // const resCity = await that.$u.api.getCityByName({ cityName: locParam.city }) |
| | | // if (resCity.code === 200) { |
| | | // locParam.cityId = resCity.data.id |
| | | // } |
| | | // that.$store.commit('setPosition',locParam) |
| | | // that.$isResolve() |
| | | // }, |
| | | // fail: (err) => { |
| | | // that.$isResolve() |
| | | // } |
| | | // }); |
| | | } |
| | | }); |
| | | }, |