@@ -224,14 +224,16 @@ export const copy = val => {
export const openLocation = (options = {}) => {
if (!options) return
const { lat, lng, name, address } = options
- wx.openLocation({
- latitude: Number(lat),
- longitude: Number(lng),
- name,
- address,
- success: () => {
- console.log('success')
- }
+ wxConfig(undefined, undefined, () => {
+ wx.openLocation({
+ latitude: Number(lat),
+ longitude: Number(lng),
+ name,
+ address,
+ success: () => {
+ console.log('success')
+ }
+ })
})
}