|
@@ -43,7 +43,8 @@
|
|
|
nearestBuilding: '正在定位...',
|
|
|
address: '正在获取地址...',
|
|
|
mapCtx: null,
|
|
|
- fileList: []
|
|
|
+ fileList: [],
|
|
|
+ canClick:true
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -173,14 +174,17 @@
|
|
|
})
|
|
|
},
|
|
|
confirm() {
|
|
|
+ if(!this.canClick) return
|
|
|
if(this.fileList.length===0) return this.$showToast('请先外出签到拍照')
|
|
|
let params = { outUserId:this.outUserId };
|
|
|
params[this.isSW==1?'checkInTime':'clockOutTime'] = new Date().Format('yyyy-MM-dd hh:mm');
|
|
|
params.file = this.fileList[0].url;
|
|
|
params.position = this.address;
|
|
|
+ this.canClick = false;
|
|
|
this.$api.post(this.url,params).then(res=>{
|
|
|
if(res.data.code!==0) return this.$showToast(res.data.msg);
|
|
|
this.$showToast('外出签到成功')
|
|
|
+ this.canClick = true;
|
|
|
setTimeout(()=>{
|
|
|
uni.reLaunch({
|
|
|
url:'/pagesClockin/index'
|