From 545990c78557c56dd9f49ddaf8e5141fc9bde50c Mon Sep 17 00:00:00 2001 From: yxq Date: Fri, 7 Jun 2024 15:25:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=20=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/AttendanceCard/list.vue | 15 ++++++++++----- .../pages/AttendanceCardTeacher/list.vue | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue index 0d036038d..9ee1afd5c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue @@ -31,7 +31,7 @@ {{postData.ClockPlace}} - + 定位不精准?WIFI信息打卡 @@ -96,6 +96,8 @@ postData: {}, isGetingLocal:false, // modal:false, + + isInternalNet:false, } }, @@ -106,6 +108,7 @@ methods: { // 页面初始化 async init() { + this.isInternalNetwork(false) this.LOADING('加载数据中...') this.now = this.getCurrentTime() @@ -318,15 +321,17 @@ this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true) }, // 判断是否学校网络 - isInternalNetwork(){ + isInternalNetwork(TOAST=true){ this.LOADING() this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ this.HIDE_LOADING() - if(res.data&&['1.190.222.35','1.190.222.34'].inlcudes(res.data.client_ip)){ + let res_ = res[1] + if(res_.data&&['1.190.222.35','1.190.222.34','1.190.222.40'].includes(res_.data.client_ip)){ + this.isInternalNet = true let postData = {AIsOut:0,ClockPlace:'已连接校园网'} - this.NAV_TO(`./single_zc`,postData,true) + TOAST&&this.NAV_TO(`./single_zc`,postData,true) }else{ - this.TOAST('未检测到校园网连接') + TOAST&&this.TOAST('未检测到校园网连接') } }) }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue index af586e192..5cfa13e06 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue @@ -40,7 +40,7 @@ {{postData.ClockPlace}} - + 定位不精准?WIFI信息打卡 @@ -100,6 +100,8 @@ map: null, postData: {}, isGetingLocal:false, + + isInternalNet:false, } }, @@ -110,6 +112,7 @@ methods: { // 页面初始化 async init() { + this.isInternalNetwork(false) this.LOADING('加载数据中...') this.now = this.getCurrentTime() @@ -317,15 +320,17 @@ }); }, // 判断是否学校网络 - isInternalNetwork(){ + isInternalNetwork(TOAST=true){ this.LOADING() this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ this.HIDE_LOADING() - if(res.data&&['1.190.222.35','1.190.222.34'].inlcudes(res.data.client_ip)){ + let res_ = res[1] + if(res_.data&&['1.190.222.35','1.190.222.34','1.190.222.40'].includes(res_.data.client_ip)){ + this.isInternalNet = true let postData = {AIsOut:0,ClockPlace:'已连接校园网'} - this.NAV_TO(`./single_zc`,postData,true) + TOAST&&this.NAV_TO(`./single_zc`,postData,true) }else{ - this.TOAST('未检测到校园网连接') + TOAST&&this.TOAST('未检测到校园网连接') } }) },