| | |
| | | //去打卡 |
| | | goClock() { |
| | | var that = this; |
| | | axios({ |
| | | method: "POST", |
| | | url: this.$store.state.piAPI + `/attendance/AppSave`, |
| | | params: { |
| | | number: this.$store.state.puserID, |
| | | name: this.name, |
| | | clockTime: this.getNowTime(1), |
| | | jd: this.jd, |
| | | wd: this.wd, |
| | | address: this.address |
| | | }, |
| | | }).then((resdata) => { |
| | | //不在考勤范围内 |
| | | if (resdata.data.code == 400) { |
| | | layui.use('layer', function() { |
| | | var layer = layui.layer; |
| | | layer.msg('打卡失败,不在考勤范围', { |
| | | icon: 0 |
| | | }); |
| | | }); |
| | | } |
| | | //打卡成功 |
| | | if (resdata.data.code == 200) { |
| | | layui.use('layer', function() { |
| | | var layer = layui.layer; |
| | | layer.msg('打卡成功!', { |
| | | icon: 1 |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + `/attendance/AppSave`, |
| | | method: "POST", |
| | | data:{ |
| | | number: this.$store.state.puserID, |
| | | name: this.name, |
| | | clockTime: this.getNowTime(1), |
| | | jd: this.jd, |
| | | wd: this.wd, |
| | | address: this.address |
| | | }, |
| | | success(resdata) { |
| | | //不在考勤范围内 |
| | | if (resdata.data.code == 400) { |
| | | uni.showToast({ |
| | | title: '不在考勤范围,打卡失败!', |
| | | icon:'none', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | //打卡成功 |
| | | if (resdata.data.code == 200) { |
| | | uni.showToast({ |
| | | title: '打卡成功!', |
| | | icon:'success', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //获取当前时间 |
| | |
| | | height: 6rem; |
| | | border-radius: 100px; |
| | | color: #FFFFFF; |
| | | background-image: linear-gradient(to bottom,#65CBA9,#66D0AC); |
| | | background-image: linear-gradient(to bottom,#0FD0E1,#0FD0E1); |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |