diff --git a/src/api/port/port/index.js b/src/api/port/port/index.js index 6cf4f3d..fee0964 100644 --- a/src/api/port/port/index.js +++ b/src/api/port/port/index.js @@ -37,3 +37,23 @@ export function phonePlace(tel) { method: 'GET' }) } + +export function getIpPlace(ip) { + return request({ + url: '/port/list/getIpPlace?ip='+ip, + method: 'GET' + }) +} +export function getHeadlines() { + return request({ + url: '/port/list/getHeadlines', + method: 'GET' + }) +} +export function getBirthday(data) { + return request({ + url: '/port/list/getBirthday', + method: 'post', + data:data + }) +} diff --git a/src/views/port/port/employee.vue b/src/views/port/port/employee.vue index eeb76f5..dff8371 100644 --- a/src/views/port/port/employee.vue +++ b/src/views/port/port/employee.vue @@ -15,11 +15,11 @@ {{connector.connectorPrice}}/次
测试API - 测试 - 测试 - 测试 - 测试 - 测试 + 测试API + 测试API + 测试 + 测试API + 测试 @@ -27,7 +27,7 @@ - + 省份:{{this.formInline.province}}
@@ -44,20 +44,73 @@ - - - + + + - - 省份:{{this.formInline.province}}
- 城市:{{this.formInline.city}}
- 区号:{{this.formInline.areacode}}
- 邮编:{{this.formInline.zip}}
- 运营商:{{this.formInline.company}}
+ + 国家:{{this.formIp.country}}
+ 省份:{{this.formIp.province}}
+ 城市:{{this.formIp.city}}
+ 运营商:{{this.formIp.isp}}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{this.formBirthday.years}}
+ {{this.formBirthday.months}}
+ {{this.formBirthday.days}}
+ {{this.formBirthday.animal}}
+ {{this.formBirthday.imonthcn}}
+ {{this.formBirthday.idaycn}}
+ {{this.formBirthday.cyear}}
+ {{this.formBirthday.cmonth}}
+ {{this.formBirthday.cday}}
+ {{this.formBirthday.gzyear}}
+ {{this.formBirthday.gzmonth}}
+ {{this.formBirthday.gzday}}
+ {{this.formBirthday.isleap}}
+ {{this.formBirthday.ncweek}}
+ {{this.formBirthday.isterm}}
+ {{this.formBirthday.term}}
+ {{this.formBirthday.astro}}
+ {{this.formBirthday.eightall}}
+ {{this.formBirthday.fiveall}} +
+
+
@@ -69,6 +122,9 @@ import {findConnectorList} from "@/api/port/port"; import index from "vuex"; import {phonePlace} from "@/api/port/port"; +import {getIpPlace} from "@/api/port/port"; +import {getHeadlines} from "@/api/port/port"; +import {getBirthday} from "@/api/port/port"; export default { //import引入的组件需要注入到对象中才能使用" components: {}, @@ -78,6 +134,7 @@ export default { return { connectorList:[], + gridData:[], form:{}, // 手机号查询归属地formInline formInline:{ @@ -89,9 +146,50 @@ export default { company:"", reason:"", }, + + formIp:{ + ip:"", + country:"", + province:"", + city:"", + isp:"", + reason:"", + }, + formBirthday:{ + year:"", + month:"", + day:"", + hour:"", + years:"", + months:"", + days:"", + animal:"", + imonthcn:"", + idaycn:"", + cyear:"", + cmonth:"", + cday:"", + gzyear:"", + gzmonth:"", + gzday:"", + isleap:"", + ncweek:"", + isterm:"", + term:"", + astro:"", + eightall:"", + fiveall:"", + reason:"", + }, + formNews:{ + news:"", + reason:"", + }, // IP查询归属地 dialogFormVisible:false, dialogFormVisible1:false, + dialogFormVisible2:false, + dialogTableVisible:false, }; }, //计算属性 类似于data概念", @@ -107,6 +205,57 @@ export default { watch: {}, //方法集合", methods: { + getBirthday(){ + getBirthday(this.formBirthday).then((res)=>{ + console.log(res.data); + this.formBirthday.reason=true; + this.formBirthday.years=res.data.years; + this.formBirthday.months=res.data.months; + this.formBirthday.days=res.data.days; + this.formBirthday.animal=res.data.animal; + this.formBirthday.imonthcn=res.data.imonthcn; + this.formBirthday.idaycn=res.data.idaycn; + this.formBirthday.cyear=res.data.cyear; + this.formBirthday.cmonth=res.data.cmonth; + this.formBirthday.cday=res.data.cday; + this.formBirthday.gzyear=res.data.gzyear; + this.formBirthday.gzmonth=res.data.gzmonth; + this.formBirthday.gzday=res.data.gzday; + this.formBirthday.isleap=res.data.isleap; + this.formBirthday.ncweek=res.data.ncweek; + this.formBirthday.isterm=res.data.isterm; + this.formBirthday.term=res.data.term; + this.formBirthday.astro=res.data.astro; + // this.formBirthday.eightall=res.data.eightall; + // this.formBirthday.fiveall=res.data.fiveall; + + }) + }, + testBirthdate(){ + this.dialogFormVisible2=true; + }, + testNews(){ + getHeadlines().then((res)=>{ + this.gridData=res.data; + this.dialogTableVisible=true; + }) + }, + getIpPlace(){ + getIpPlace(this.formIp.ip).then((res)=>{ + console.log(res.data); + if (200==res.code){ + this.formIp.country=res.data.country; + this.formIp.province=res.data.province; + this.formIp.city=res.data.city; + this.formIp.isp=res.data.isp; + this.formIp.reason=true; + } + }) + }, + testIP(ip){ + this.formIp.ip=ip; + this.dialogFormVisible1=true; + }, testPhone(tel){ this.formInline.tel=tel; this.dialogFormVisible=true;