|
|
@@ -90,8 +90,8 @@ Page({
|
|
|
async click() {
|
|
|
const data = await this.location()
|
|
|
if (this.data.clockType === 1 && !this.data.wsPunchClockId) {
|
|
|
- // this.clock(data.longitude, data.latitude)
|
|
|
- this.clock(120.353312, 31.535582)
|
|
|
+ this.clock(data.longitude, data.latitude)
|
|
|
+ // this.clock(120.353312, 31.535582)
|
|
|
}
|
|
|
if (this.data.clockType === 1 && this.data.wsPunchClockId) {
|
|
|
wx.showModal({
|
|
|
@@ -117,54 +117,6 @@ Page({
|
|
|
showCancel: false,
|
|
|
})
|
|
|
}
|
|
|
- // switch (this.data.status) {
|
|
|
- // case 0:
|
|
|
- // wx.showModal({
|
|
|
- // title: '提示',
|
|
|
- // content: '超出范围,请刷新页面获取当前位置',
|
|
|
- // showCancel: false,
|
|
|
- // })
|
|
|
- // break;
|
|
|
- // case 1:
|
|
|
- // this.setData({
|
|
|
- // statusImage: `${imgServerUrl}/images/clock/clock-out-disabled.png`,
|
|
|
- // statusIcon: `${imgServerUrl}/images/clock/clock-waring.png`,
|
|
|
- // statusMessage: `上班X小时候才能进行下班打卡`,
|
|
|
- // status: 2
|
|
|
- // })
|
|
|
- // setTimeout(() => {
|
|
|
- // this.setData({
|
|
|
- // statusImage: `${imgServerUrl}/images/clock/clock-out.png`,
|
|
|
- // statusIcon: `${imgServerUrl}/images/clock/clock-can.png`,
|
|
|
- // statusMessage: `已进入考勤打卡范围`,
|
|
|
- // status: 3
|
|
|
- // })
|
|
|
- // }, 2000)
|
|
|
- // wx.navigateTo({
|
|
|
- // url: './clock-success/clock-success?status=3'
|
|
|
- // })
|
|
|
- // break;
|
|
|
- // case 2:
|
|
|
- // wx.showModal({
|
|
|
- // title: '提示',
|
|
|
- // content: '未到下班时间,请刷新页面获取最新状态',
|
|
|
- // showCancel: false,
|
|
|
- // })
|
|
|
- // break;
|
|
|
- // case 3:
|
|
|
- // this.setData({
|
|
|
- // statusImage: `${imgServerUrl}/images/clock/clock-done.png`,
|
|
|
- // statusMessage: `今日打卡已完成`,
|
|
|
- // status: 4
|
|
|
- // })
|
|
|
- // wx.navigateTo({
|
|
|
- // url: './clock-success/clock-success?status=4'
|
|
|
- // })
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // break;
|
|
|
- // }
|
|
|
-
|
|
|
},
|
|
|
clock(longitude, latitude) {
|
|
|
savePunchClock({ longitude, latitude, clockType: this.data.clockType }).then(data => {
|
|
|
@@ -204,9 +156,8 @@ Page({
|
|
|
},
|
|
|
async load() {
|
|
|
const data = await this.location()
|
|
|
- console.log(data)
|
|
|
- // punchClockNeedInfo({ longitude: data.longitude, latitude: data.latitude }).then(data => {
|
|
|
- punchClockNeedInfo({ longitude: 120.353312, latitude: 31.535582 }).then(data => {
|
|
|
+ punchClockNeedInfo({ longitude: data.longitude, latitude: data.latitude }).then(data => {
|
|
|
+ // punchClockNeedInfo({ longitude: 120.353312, latitude: 31.535582 }).then(data => {
|
|
|
let {
|
|
|
authenticationStatus,
|
|
|
startPunch,
|