Bladeren bron

移动端 考勤打卡

黑龙江艺术高中职
yxq 5 maanden geleden
bovenliggende
commit
545990c785
2 gewijzigde bestanden met toevoegingen van 20 en 10 verwijderingen
  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 Bestand weergeven

@@ -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('未检测到校园网连接')
}
})
},


+ 10
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardTeacher/list.vue Bestand weergeven

@@ -40,7 +40,7 @@
<view>
{{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>
@@ -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('未检测到校园网连接')
}
})
},


Laden…
Annuleren
Opslaan