程序的分享功能调用了微信的接口,但是忽然发现就报这个错误,

Uncaught ReferenceError: wx is not defined

同时下方还有这个错误

This content should also be served over HTTPS.

访问接口,网络是通的,后来想起,项目前段时间升级了一次,从http访问升级为https访问了,

想到这个地方的接口还是http的,会不会block了

解决:

在页面中加入meta头

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2021-05-07
  • 2021-06-29
  • 2022-02-18
猜你喜欢
  • 2021-04-21
  • 2021-06-30
  • 2022-12-23
  • 2021-09-16
  • 2021-06-16
  • 2021-05-28
相关资源
相似解决方案