From 5f5cce623647f323c90c16428b5c46f5769c51af Mon Sep 17 00:00:00 2001 From: chaiyapeng <3535863041@qq.com> Date: Thu, 29 Aug 2024 21:55:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E9=97=BB=E5=A4=B4=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/port/port/index.js | 13 ++++++ src/views/port/port/employee.vue | 73 ++++++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 13 deletions(-) diff --git a/src/api/port/port/index.js b/src/api/port/port/index.js index 6cf4f3d..90d4a0f 100644 --- a/src/api/port/port/index.js +++ b/src/api/port/port/index.js @@ -37,3 +37,16 @@ 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' + }) +} diff --git a/src/views/port/port/employee.vue b/src/views/port/port/employee.vue index eeb76f5..1792b22 100644 --- a/src/views/port/port/employee.vue +++ b/src/views/port/port/employee.vue @@ -15,8 +15,8 @@ {{connector.connectorPrice}}/次
测试API - 测试 - 测试 + 测试API + 测试API 测试 测试 测试 @@ -27,7 +27,7 @@ - + 省份:{{this.formInline.province}}
@@ -44,22 +44,30 @@ - - - + + + - - 省份:{{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}}
+ + + + + + + + + @@ -69,6 +77,8 @@ 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"; export default { //import引入的组件需要注入到对象中才能使用" components: {}, @@ -78,6 +88,7 @@ export default { return { connectorList:[], + gridData:[], form:{}, // 手机号查询归属地formInline formInline:{ @@ -89,9 +100,23 @@ export default { company:"", reason:"", }, + + formIp:{ + ip:"", + country:"", + province:"", + city:"", + isp:"", + reason:"", + }, + formNews:{ + news:"", + reason:"", + }, // IP查询归属地 dialogFormVisible:false, dialogFormVisible1:false, + dialogTableVisible:false, }; }, //计算属性 类似于data概念", @@ -107,6 +132,28 @@ export default { watch: {}, //方法集合", methods: { + 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; From 6121834f856b2b9ea993356479d53816dffc7276 Mon Sep 17 00:00:00 2001 From: chaiyapeng <3535863041@qq.com> Date: Fri, 30 Aug 2024 10:06:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=9F=E8=BE=B0=E5=8A=A9=E6=89=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/port/port/index.js | 7 ++ src/views/port/port/employee.vue | 108 ++++++++++++++++++++++++++++++- 2 files changed, 112 insertions(+), 3 deletions(-) diff --git a/src/api/port/port/index.js b/src/api/port/port/index.js index 90d4a0f..fee0964 100644 --- a/src/api/port/port/index.js +++ b/src/api/port/port/index.js @@ -50,3 +50,10 @@ export function 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 1792b22..dff8371 100644 --- a/src/views/port/port/employee.vue +++ b/src/views/port/port/employee.vue @@ -17,9 +17,9 @@ 测试API 测试API 测试API - 测试 - 测试 - 测试 + 测试 + 测试API + 测试 @@ -68,6 +68,51 @@
+ + + + + + + + + + + + + + + + + + + + + {{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}} +
+
+ +
@@ -79,6 +124,7 @@ 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: {}, @@ -109,6 +155,32 @@ export default { 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:"", @@ -116,6 +188,7 @@ export default { // IP查询归属地 dialogFormVisible:false, dialogFormVisible1:false, + dialogFormVisible2:false, dialogTableVisible:false, }; }, @@ -132,6 +205,35 @@ 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;