话不多说,直接上代码。

$.ajax({
                    type: "get",
                    url: 'https://api.jisuapi.com/shouji/query?appkey=06d97****fd0bb5&shouji='+this.tel,  //这个appkey自己申请就好
                    dataType: "jsonp",
                    jsonp: "callback",
                    success: function(data) {
                        console.log(data);
                        this.province = data.result.province;
                        this.city = data.result.city;
                        let company = data.result.company;
                        let bigPlace = this.province + this.city;
                        $(".place-item").html(bigPlace)
                        $(".topUp-company").html(company);
                    }
                });
Last modification:November 21st, 2019 at 07:24 pm
来杯coffee吧