|
|
|
|
13
|
const url = location.origin + location.pathname
|
13
|
const url = location.origin + location.pathname
|
14
|
request(`https://api.h5.njyunzhi.com/mp/jssdk?url=${encodeURIComponent(url)}`).then((res) => {
|
14
|
request(`https://api.h5.njyunzhi.com/mp/jssdk?url=${encodeURIComponent(url)}`).then((res) => {
|
15
|
window.wx.config({
|
15
|
window.wx.config({
|
16
|
- debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
|
|
16
|
+ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
17
|
appId: res.appId, // 必填,公众号的唯一标识
|
17
|
appId: res.appId, // 必填,公众号的唯一标识
|
18
|
timestamp: res.timestamp, // 必填,生成签名的时间戳
|
18
|
timestamp: res.timestamp, // 必填,生成签名的时间戳
|
19
|
nonceStr: res.nonceStr, // 必填,生成签名的随机串
|
19
|
nonceStr: res.nonceStr, // 必填,生成签名的随机串
|