更新地图选择

This commit is contained in:
weipengfei 2023-11-24 18:46:37 +08:00
parent 102ee13e26
commit 167354a8da
6 changed files with 1059 additions and 971 deletions

View File

@ -14,7 +14,7 @@
</view>
<view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="place_wrapper flex_a_c" @click="changeMap">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street||'定位中' }}</view>
<view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
@ -618,7 +618,28 @@
}
// console.log(that.userInfoData);
});
}
},
//
changeMap(){
uni.navigateTo({
url: `/pages/select_address/select_address_n`,
success:()=> {
uni.$once('changeAddress', (e)=>{
// this.street_id = e.street.code;
// this.street = e.street.name;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.longitude,
long: e.latitude,
});
}
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
})
}
})
}
}
};
</script>

View File

@ -30,7 +30,7 @@
</view>
<view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="place_wrapper flex_a_c" @click="changeMap">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{ street||'定位中' }}</view>
<view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop" color="#fff"></uni-icons></view>
@ -846,7 +846,28 @@ export default {
}
}
// #endif
}
},
//
changeMap(){
uni.navigateTo({
url: `/pages/select_address/select_address_n`,
success:()=> {
uni.$once('changeAddress', (e)=>{
// this.street_id = e.street.code;
// this.street = e.street.name;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.longitude,
long: e.latitude,
});
}
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
})
}
})
}
}
}
</script>

View File

@ -808,8 +808,14 @@
uni.$once('changeAddress', (e)=>{
this.street_id = e.street.code;
this.street = e.street.name;
this.longitude = e.longitude;
this.latitude = e.latitude;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.longitude,
long: e.latitude,
});
}
this.getStoreList(true);
})
}

View File

@ -810,8 +810,14 @@
uni.$once('changeAddress', (e)=>{
this.street_id = e.street.code;
this.street = e.street.name;
this.longitude = e.longitude;
this.latitude = e.latitude;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.longitude,
long: e.latitude,
});
}
this.getStoreList(true);
})
}

View File

@ -879,8 +879,14 @@
uni.$once('changeAddress', (e)=>{
this.street_id = e.street.code;
this.street = e.street.name;
this.longitude = e.longitude;
this.latitude = e.latitude;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.longitude,
long: e.latitude,
});
}
this.storeMerchantList();
})
}

File diff suppressed because it is too large Load Diff