修复了定位bug
This commit is contained in:
parent
ca9dd3db6f
commit
32ff09e5fd
@ -84,8 +84,8 @@
|
||||
default: ''
|
||||
},
|
||||
sale_type: {
|
||||
type: String,
|
||||
default: ''
|
||||
type: [Number,String],
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -628,7 +628,7 @@
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
let town = res.data.address_reference.town.title
|
||||
let street_id = street_id = res.data.address_reference.town.id
|
||||
let street_id = res.data.address_reference.town.id
|
||||
this.street = res.data.address_reference.town.title;
|
||||
this.$store.commit('setAddress', {
|
||||
street_id: street_id,
|
||||
@ -637,6 +637,19 @@
|
||||
uni.$emit('getLocation_succees', {
|
||||
street_id,
|
||||
});
|
||||
uni.$emit('changeAddress', {
|
||||
addr:{
|
||||
address: res.data.address,
|
||||
location: `${res.data.location.lat},${res.data.location.lng}`
|
||||
},
|
||||
area: res.data.ad_info.adcode,
|
||||
latitude: res.data.location.lat,
|
||||
longitude: res.data.location.lng,
|
||||
street:{
|
||||
code: street_id,
|
||||
name: town
|
||||
}
|
||||
})
|
||||
this.where.location = `${latitude},${longitude}`;
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
|
@ -339,7 +339,8 @@ const open = (id = null) => {
|
||||
uniMP: true,
|
||||
token: token,
|
||||
avatar: avatar,
|
||||
}
|
||||
},
|
||||
// path: '/pages/index/index?unimp=true'
|
||||
}, (ret) => {
|
||||
uni.hideLoading();
|
||||
if (0 != ret.code) {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
uniMPgetLocation,
|
||||
test
|
||||
} from "@/utils/uniMPfunction.js"
|
||||
console.log(123)
|
||||
|
||||
export const initEvent = () => {
|
||||
mp.onUniMPEventReceive(async (ret) => {
|
||||
console.log('小程序事件: ', ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user