错误
The page at 'https://codepen.io/iamanoopc/pen/JEjYKR?editors=0011' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?q=Lam%20Tin,HK&appid=23a5271ef6a94716ac17ec27e9f4bcd8'. This request has been blocked; the content must be served over HTTPS.
解释
错误显示得很清楚。HTTPS, but requested an insecure XMLHttpRequest
.是安全的域服务器。https
你的http调用是不安全的。出于安全原因。他们会阻止你的请求This request has been blocked; the content must be served over HTTPS
备用
尝试使用不安全的http
域服务器片段,例如 jsbin
演示_Jsbin