接口列表

master
chaiyapeng 2024-08-28 18:44:03 +08:00
parent 26bd851656
commit 3328439c07
2 changed files with 60 additions and 16 deletions

View File

@ -34,6 +34,6 @@ export function updateConnector(data) {
export function phonePlace(tel) { export function phonePlace(tel) {
return request({ return request({
url: '/port/list/phonePlace?tel='+tel, url: '/port/list/phonePlace?tel='+tel,
method: 'get' method: 'GET'
}) })
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-row :gutter="50"> <el-row :gutter="50">
<el-col :span="7" v-for="connector in connectorList" v-if="connectorList.length !== 0"> <el-col :span="7" v-for="connector in connectorList" :key="connector.connectorId" v-if="connectorList.length !== 0">
<el-card class="box-card" style="margin-top: 15px;width: 500px; height: 600px;" shadow="hover"> <el-card class="box-card" style="margin-top: 15px;width: 500px; height: 600px;" shadow="hover">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<h1 style="font-weight: bold">{{connector.connectorName}}</h1> <h1 style="font-weight: bold">{{connector.connectorName}}</h1>
@ -14,24 +14,50 @@
<span style="font-weight: bold;font-size: 20px">价格</span> <span style="font-weight: bold;font-size: 20px">价格</span>
{{connector.connectorPrice}}/<br> {{connector.connectorPrice}}/<br>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="dialogFormVisible=true" v-if="connector.connectorName=='手机号查询归属地'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyIP(connector)" v-if="connector.connectorName=='IP查询归属地'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP(connector)" v-if="connector.connectorName=='IP查询归属地'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyNews(connector)" v-if="connector.connectorName=='新闻头条'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews(connector)" v-if="connector.connectorName=='新闻头条'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyWeather(connector)" v-if="connector.connectorName=='气象预警'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather(connector)" v-if="connector.connectorName=='气象预警'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyBirthdate(connector)" v-if="connector.connectorName=='生辰助手'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate(connector)" v-if="connector.connectorName=='生辰助手'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyMailbox(connector)" v-if="connector.connectorName=='邮编查询'"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox(connector)" v-if="connector.connectorName=='邮编查询'"></el-button>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<!-- 手机号查询归属地-->
<el-dialog title="手机查询归属地" :visible.sync="dialogFormVisible"> <el-dialog title="手机查询归属地" :visible.sync="dialogFormVisible">
<el-form :model="formInline"> <el-form :model="formInline">
<el-form-item label="手机号" :label-width="formLabelWidth"> <el-form-item label="手机号" :label-width="formLabelWidth">
<el-input v-model="formInline.tel" autocomplete="off"></el-input> <el-input v-model="formInline.tel" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formInline.reason==true">
省份{{this.formInline.province}}<br>
城市{{this.formInline.city}}<br>
区号{{this.formInline.areacode}}<br>
邮编{{this.formInline.zip}}<br>
运营商{{this.formInline.company}}<br>
</span>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="buyPhone(tel)"></el-button> <el-button type="primary" @click="phonePlace()"></el-button>
</div>
</el-dialog>
<!--IP查询归属地-->
<el-dialog title="IP查询归属地" :visible.sync="dialogFormVisible1">
<el-form :model="formInline">
<el-form-item label="IP" :label-width="formLabelWidth">
<el-input v-model="formInline.tel" autocomplete="off"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formInline.reason==true">
省份{{this.formInline.province}}<br>
城市{{this.formInline.city}}<br>
区号{{this.formInline.areacode}}<br>
邮编{{this.formInline.zip}}<br>
运营商{{this.formInline.company}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="phonePlace()"></el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -53,8 +79,19 @@ export default {
return { return {
connectorList:[], connectorList:[],
form:{}, form:{},
formInline:{}, // formInline
formInline:{
tel:"",
province:"",
city:"",
areacode:"",
zip:"",
company:"",
reason:"",
},
// IP
dialogFormVisible:false, dialogFormVisible:false,
dialogFormVisible1:false,
}; };
}, },
// data", // data",
@ -70,13 +107,20 @@ export default {
watch: {}, watch: {},
//", //",
methods: { methods: {
buyPhone(tel){ testPhone(tel){
getPhonePlace(tel).then((res)=>{ this.formInline.tel=tel;
console.log(111); this.dialogFormVisible=true;
},
phonePlace(){
phonePlace(this.formInline.tel).then((res)=>{
console.log(res.data); console.log(res.data);
alert(res.msg);
if (200==res.code){ if (200==res.code){
this.formInline.province=res.data.province;
this.formInline.city=res.data.city;
this.formInline.areacode=res.data.areacode;
this.formInline.zip=res.data.zip;
this.formInline.company=res.data.company;
this.formInline.reason=true;
} }
}) })
}, },