小程序
小游戏
企业微信
微信支付
扫描小程序码分享
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
参考一下,确认是不是这个问题:https://developers.weixin.qq.com/community/develop/doc/000ee0e1f7c8d824b9024298561800?jumpto=comment&commentid=0004ca90d7412889b602144d166c
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
亮代码
const _this = this
const {
err,
data
} = await this.$service.wxPayScoreConfig({
url:window.location.href.split("#")[0]
key:'jjjj'
});
if (err) return
this.$jweixin.config({
debug: true,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ["checkJsApi","getLocation","openLocation"],
openTagList: ["wx-open-launch-weapp"]
this.$jweixin.ready(function (res) {
console.log("jweixin.ready",res)
_this.$jweixin.getLocation({
type:'gcj02',
success: function (res) {
console.log('获取当前位置信息',res)
},
fail: function (err) {
console.log('获取位置失败',err)
}
})
this.$jweixin.error(function (res) {
console.log("jweixin.error", res);
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
参考一下,确认是不是这个问题:https://developers.weixin.qq.com/community/develop/doc/000ee0e1f7c8d824b9024298561800?jumpto=comment&commentid=0004ca90d7412889b602144d166c
亮代码
const _this = this
const {
err,
data
} = await this.$service.wxPayScoreConfig({
url:window.location.href.split("#")[0]
key:'jjjj'
});
if (err) return
this.$jweixin.config({
debug: true,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ["checkJsApi","getLocation","openLocation"],
openTagList: ["wx-open-launch-weapp"]
});
this.$jweixin.ready(function (res) {
console.log("jweixin.ready",res)
_this.$jweixin.getLocation({
type:'gcj02',
success: function (res) {
console.log('获取当前位置信息',res)
},
fail: function (err) {
console.log('获取位置失败',err)
}
});
})
this.$jweixin.error(function (res) {
console.log("jweixin.error", res);
});