@@ -9,7 +9,8 @@ | |||||
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | ||||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | <l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | ||||
确认打卡({{second}}s) | |||||
确认打卡 | |||||
<!-- ({{second}}s) --> | |||||
</l-button> | </l-button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -102,15 +103,15 @@ | |||||
() => {} | () => {} | ||||
]) | ]) | ||||
await this.fetchForm() | await this.fetchForm() | ||||
this.timer = setInterval(()=>{ | |||||
this.second-- | |||||
if(this.second>0)return | |||||
this.TOAST('拍照超时,请重新打卡') | |||||
setTimeout(()=>{ | |||||
this.NAV_BACK() | |||||
},500) | |||||
return | |||||
},1000) | |||||
// this.timer = setInterval(()=>{ | |||||
// this.second-- | |||||
// if(this.second>0)return | |||||
// this.TOAST('拍照超时,请重新打卡') | |||||
// setTimeout(()=>{ | |||||
// this.NAV_BACK() | |||||
// },500) | |||||
// return | |||||
// },1000) | |||||
this.ready = true | this.ready = true | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
@@ -140,6 +141,10 @@ | |||||
const postData = await this.getPostData(this.id) | const postData = await this.getPostData(this.id) | ||||
console.log(postData) | console.log(postData) | ||||
let strEntity = JSON.parse(postData.strEntity) | let strEntity = JSON.parse(postData.strEntity) | ||||
if(!strEntity.Img){ | |||||
this.TOAST('图片上传失败') | |||||
return | |||||
} | |||||
// let strEntity_ = {...strEntity,...this.params} | // let strEntity_ = {...strEntity,...this.params} | ||||
this.HTTP_POST('learun/adms/attendance/clockin', JSON.stringify(strEntity), '打卡失败').then(success => { | this.HTTP_POST('learun/adms/attendance/clockin', JSON.stringify(strEntity), '打卡失败').then(success => { | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
@@ -177,7 +182,7 @@ | |||||
}, | }, | ||||
}, | }, | ||||
destroyed() { | destroyed() { | ||||
clearInterval(this.timer) | |||||
// clearInterval(this.timer) | |||||
} | } | ||||
} | } | ||||
</script> | </script> |
@@ -9,7 +9,8 @@ | |||||
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | ||||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | <l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | ||||
确认打卡({{second}}s) | |||||
确认打卡 | |||||
<!-- ({{second}}s) --> | |||||
</l-button> | </l-button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -102,15 +103,15 @@ | |||||
() => {} | () => {} | ||||
]) | ]) | ||||
await this.fetchForm() | await this.fetchForm() | ||||
this.timer = setInterval(()=>{ | |||||
this.second-- | |||||
if(this.second>0)return | |||||
this.TOAST('拍照超时,请重新打卡') | |||||
setTimeout(()=>{ | |||||
this.NAV_BACK() | |||||
},500) | |||||
return | |||||
},1000) | |||||
// this.timer = setInterval(()=>{ | |||||
// this.second-- | |||||
// if(this.second>0)return | |||||
// this.TOAST('拍照超时,请重新打卡') | |||||
// setTimeout(()=>{ | |||||
// this.NAV_BACK() | |||||
// },500) | |||||
// return | |||||
// },1000) | |||||
this.ready = true | this.ready = true | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
@@ -140,6 +141,10 @@ | |||||
const postData = await this.getPostData(this.id) | const postData = await this.getPostData(this.id) | ||||
console.log(postData) | console.log(postData) | ||||
let strEntity = JSON.parse(postData.strEntity) | let strEntity = JSON.parse(postData.strEntity) | ||||
if(!strEntity.Img){ | |||||
this.TOAST('图片上传失败') | |||||
return | |||||
} | |||||
// let strEntity_ = {...strEntity,...this.params} | // let strEntity_ = {...strEntity,...this.params} | ||||
this.HTTP_POST('learun/adms/attendance/clockinTeacher', JSON.stringify(strEntity), '打卡失败').then(success => { | this.HTTP_POST('learun/adms/attendance/clockinTeacher', JSON.stringify(strEntity), '打卡失败').then(success => { | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
@@ -177,7 +182,7 @@ | |||||
}, | }, | ||||
}, | }, | ||||
destroyed() { | destroyed() { | ||||
clearInterval(this.timer) | |||||
// clearInterval(this.timer) | |||||
} | } | ||||
} | } | ||||
</script> | </script> |