|
|
@@ -31,7 +31,7 @@ |
|
|
|
<view style="color: #666;"> |
|
|
|
{{postData.ClockPlace}} |
|
|
|
</view> |
|
|
|
<view class="wifiCard" v-if="info.AttendanceType != 5"> |
|
|
|
<view class="wifiCard" v-if="info.AttendanceType != 5&isInternalNet"> |
|
|
|
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@@ -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('未检测到校园网连接') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|