1. 程式人生 > >config:fail,Error: invalid signature

config:fail,Error: invalid signature

與此同時出現的error:

getlocation:the permission value is offline verifying

 fetch(httpConfig.signature, {// signature:domain+'/wechat/jssdk/signature?url=***.com',
    method: 'GET'
  }).then(res => {
  callback(res);
  })

參與wx.config的url必須是動態生成的,如下:

httpConfig.signature+ window.location.href.split("#")[0]