(vue)前端获取ip方法
data(){return:{
ipAddress:"",}},mounted(){
this.getIPAddress();},//获取ipgetIPAddress(){const url ="http://api.ipify.org?format=json";
this.axios.get(url).then((response)=>{
this.ipAddress = response.data.ip;
console.log(this.ipAddress);});},
本文转载自: https://blog.csdn.net/qq_44754635/article/details/130969896
版权归原作者 nyf_unknown 所有, 如有侵权,请联系我们删除。
版权归原作者 nyf_unknown 所有, 如有侵权,请联系我们删除。