Browse Source

随时讲地图修改

master
juwei001 1 year ago
parent
commit
a8c85d45c2
  1. 16
      yt_suishijiang/pages/index/index.vue

16
yt_suishijiang/pages/index/index.vue

@ -22,7 +22,7 @@
/> />
</view> </view>
<view class="tools-box"> <view class="tools-box">
<view class="item-box" @click="handleLocation"> <view class="item-box" @click="choosePlace">
<view class="location-btn"> <view class="location-btn">
<image <image
mode="scaleToFill" mode="scaleToFill"
@ -146,6 +146,20 @@ export default {
_this.init(); _this.init();
}, },
methods: { methods: {
choosePlace() {
let that = this;
uni.chooseLocation({
success: function (res) {
that.setData({
curAddress: res.address+'('+res.name+')',
locations: {
lng: res.longitude,
lat: res.latitude,
},
})
},
});
},
init() { init() {
let userInfo = userTools.getStoreUserInfo(); let userInfo = userTools.getStoreUserInfo();
let gridInfo = userTools.getStoreGridInfo(); let gridInfo = userTools.getStoreGridInfo();

Loading…
Cancel
Save