wx.openLocation打不开微信内置地图?也没有任何报错?

发布于 7 年前作者 machao2261 次浏览最后编辑 7 年前来自 issues

wx.checkJsApi返回success,就是没有跳转到内置地图,也没有任何抛错

wx.checkJsApi({
                debug: true,
                appId: data.appId,
                timestamp: data.timestamp,
                nonceStr: data.nonceStr,
                signature: data.signature,
                jsApiList: ['openLocation'],
                fail () {
                    Toast.error('设备不支持');
                },
                success: () => {
                    const { name = '客户', address = '客户地址未知' } = this.store;
                    Toast.success(`${longitude},${latitude},${name},${address}`)

                    wx.openLocation({
                        latitude: +latitude, 
                        longitude: +longitude,
                        name,
                        address,
                        scale: 16, 
                        infoUrl: ''
                    });
                }
            });
1 回复
lei98
lei981 楼5 年前

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)