|
|
@@ -398,33 +398,46 @@
|
|
|
this.changeType()
|
|
|
},
|
|
|
// 点击打卡按钮回调
|
|
|
+ // handlePunch(info) {
|
|
|
+ // if (this.flags) {
|
|
|
+ // let obj = JSON.stringify(info)
|
|
|
+ // // 如果场景照片和人脸识别都需要
|
|
|
+ // if (this.faceRecognition && this.takePicture) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pagesClockIn/location/location?obj=${obj}`
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // // 如果都不需要
|
|
|
+ // else if (!this.faceRecognition && !this.takePicture) {
|
|
|
+ // this.handleUploading()
|
|
|
+ // }
|
|
|
+ // // 如果只需要场景照片
|
|
|
+ // else if (this.takePicture) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // // 如果只需要人脸识别
|
|
|
+ // else if (this.faceRecognition) {
|
|
|
+ // // uni.navigateTo({
|
|
|
+ // // url: `/pagesClockIn/authentication/authentication?id=${this.contrastObj.id}&address=${this.address}&latitude=${this.myLat}&longitude=${this.myLng}&flag=1`
|
|
|
+ // // })
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
handlePunch(info) {
|
|
|
if (this.flags) {
|
|
|
let obj = JSON.stringify(info)
|
|
|
- // 如果场景照片和人脸识别都需要
|
|
|
- if (this.faceRecognition && this.takePicture) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesClockIn/location/location?obj=${obj}`
|
|
|
- })
|
|
|
- }
|
|
|
- // 如果都不需要
|
|
|
- else if (!this.faceRecognition && !this.takePicture) {
|
|
|
- this.handleUploading()
|
|
|
- }
|
|
|
- // 如果只需要场景照片
|
|
|
- else if (this.takePicture) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
|
|
|
- })
|
|
|
- }
|
|
|
- // 如果只需要人脸识别
|
|
|
- else if (this.faceRecognition) {
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pagesClockIn/authentication/authentication?id=${this.contrastObj.id}&address=${this.address}&latitude=${this.myLat}&longitude=${this.myLng}&flag=1`
|
|
|
- // })
|
|
|
+ // 如果需要场景照片
|
|
|
+ if (this.takePicture) {
|
|
|
uni.navigateTo({
|
|
|
url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
|
|
|
})
|
|
|
+ }else{
|
|
|
+ this.handleUploading()
|
|
|
}
|
|
|
}
|
|
|
},
|