|
@@ -5,7 +5,6 @@ import Taro from '@tarojs/taro';
|
|
|
import {AtIcon, AtModal} from "taro-ui";
|
|
|
import dayjs from 'dayjs';
|
|
|
import Skeleton from 'taro-skeleton'
|
|
|
-import {radiusRange} from '../../utils/config';
|
|
|
|
|
|
import HistoricalClock from '../../components/historicalClock';
|
|
|
|
|
@@ -28,6 +27,7 @@ import {getClockState} from "../../utils/tools";
|
|
|
|
|
|
const QQMapWX = require('../../components/common/mapSDK/qqmap-wx-jssdk.min.js');
|
|
|
|
|
|
+const wxConfig = Taro.getStorageSync('wxConfig');
|
|
|
|
|
|
@connect(({ counter }) => ({
|
|
|
counter
|
|
@@ -187,7 +187,7 @@ class PunchClocks extends Component {
|
|
|
Taro.showToast({title:'当前时间不在打卡时间范围内,无法打卡',icon:'none'})
|
|
|
return ;
|
|
|
}
|
|
|
- if(!(this.state.distance <=radiusRange && this.state.distance >= 0)){
|
|
|
+ if(!(this.state.distance <=wxConfig.clockInRange && this.state.distance >= 0)){
|
|
|
Taro.hideLoading()
|
|
|
Taro.showToast({title:'当前位置未处于可打卡范围,无法打卡',icon:'none'})
|
|
|
return ;
|
|
@@ -502,13 +502,13 @@ class PunchClocks extends Component {
|
|
|
}} style={{
|
|
|
boxShadow:
|
|
|
(!isNaN(parseInt(this.state.distance)))
|
|
|
- && this.state.distance <=radiusRange && this.state.distance >= 0 &&
|
|
|
+ && this.state.distance <=wxConfig.clockInRange && this.state.distance >= 0 &&
|
|
|
!(dayjs().isBefore(this.state.dtails.releaseStarts) || dayjs().isAfter(this.state.dtails.releaseEnds)) &&
|
|
|
dtails.status !== 3
|
|
|
? (dtails.clockIn === 1 ? '1px 1px 15px 1px #3f82e8' : '1px 1px 15px 1px #659268') : '1px 1px 15px 1px #acb8ad',
|
|
|
background: (!isNaN(parseInt(this.state.distance)))
|
|
|
&&
|
|
|
- this.state.distance <=radiusRange &&
|
|
|
+ this.state.distance <=wxConfig.clockInRange &&
|
|
|
this.state.distance >= 0 &&
|
|
|
!(dayjs().isBefore(this.state.dtails.releaseStarts) || dayjs().isAfter(this.state.dtails.releaseEnds))&&
|
|
|
dtails.status !== 3
|
|
@@ -547,7 +547,7 @@ class PunchClocks extends Component {
|
|
|
longitude: this.state.addressLongitude,
|
|
|
color: '#c92ddc82',
|
|
|
fillColor: '#c92ddc82',
|
|
|
- radius: radiusRange,
|
|
|
+ radius: wxConfig.clockInRange,
|
|
|
strokeWidth: 1
|
|
|
}
|
|
|
]}
|