Vue利用搜狐獲取公網ip地址

在index.html中添加代碼:html

<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>

在其餘界面輸出便可:json

console.log(returnCitySN["cip"])

便可打印出所在位置的公網ip htm

相關文章
相關標籤/搜索