Przeglądaj źródła

移动端 考勤打卡

黑龙江艺术高中职
yxq 5 miesięcy temu
rodzic
commit
545990c785
2 zmienionych plików z 20 dodań i 10 usunięć
  1. +10
    -5
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue
  2. +10
    -5
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue

+ 10
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue Wyświetl plik

@@ -31,7 +31,7 @@
<view style="color: #666;"> <view style="color: #666;">
{{postData.ClockPlace}} {{postData.ClockPlace}}
</view> </view>
<view class="wifiCard" v-if="info.AttendanceType != 5">
<view class="wifiCard" v-if="info.AttendanceType != 5&isInternalNet">
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> 定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span>
</view> </view>
</view> </view>
@@ -96,6 +96,8 @@
postData: {}, postData: {},
isGetingLocal:false, isGetingLocal:false,
// modal:false, // modal:false,
isInternalNet:false,
} }
}, },


@@ -106,6 +108,7 @@
methods: { methods: {
// 页面初始化 // 页面初始化
async init() { async init() {
this.isInternalNetwork(false)
this.LOADING('加载数据中...') this.LOADING('加载数据中...')


this.now = this.getCurrentTime() this.now = this.getCurrentTime()
@@ -318,15 +321,17 @@
this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true) this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true)
}, },
// 判断是否学校网络 // 判断是否学校网络
isInternalNetwork(){
isInternalNetwork(TOAST=true){
this.LOADING() this.LOADING()
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{
this.HIDE_LOADING() 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:'已连接校园网'} let postData = {AIsOut:0,ClockPlace:'已连接校园网'}
this.NAV_TO(`./single_zc`,postData,true)
TOAST&&this.NAV_TO(`./single_zc`,postData,true)
}else{ }else{
this.TOAST('未检测到校园网连接')
TOAST&&this.TOAST('未检测到校园网连接')
} }
}) })
}, },


+ 10
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue Wyświetl plik

@@ -40,7 +40,7 @@
<view> <view>
{{postData.ClockPlace}} {{postData.ClockPlace}}
</view> </view>
<view class="wifiCard" v-if="info.AttendanceType != 5">
<view class="wifiCard" v-if="info.AttendanceType != 5&isInternalNet">
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> 定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span>
</view> </view>
</view> </view>
@@ -100,6 +100,8 @@
map: null, map: null,
postData: {}, postData: {},
isGetingLocal:false, isGetingLocal:false,
isInternalNet:false,
} }
}, },


@@ -110,6 +112,7 @@
methods: { methods: {
// 页面初始化 // 页面初始化
async init() { async init() {
this.isInternalNetwork(false)
this.LOADING('加载数据中...') this.LOADING('加载数据中...')


this.now = this.getCurrentTime() this.now = this.getCurrentTime()
@@ -317,15 +320,17 @@
}); });
}, },
// 判断是否学校网络 // 判断是否学校网络
isInternalNetwork(){
isInternalNetwork(TOAST=true){
this.LOADING() this.LOADING()
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{
this.HIDE_LOADING() 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:'已连接校园网'} let postData = {AIsOut:0,ClockPlace:'已连接校园网'}
this.NAV_TO(`./single_zc`,postData,true)
TOAST&&this.NAV_TO(`./single_zc`,postData,true)
}else{ }else{
this.TOAST('未检测到校园网连接')
TOAST&&this.TOAST('未检测到校园网连接')
} }
}) })
}, },


Ładowanie…
Anuluj
Zapisz