|
@@ -17,6 +17,7 @@ Page({
|
|
|
data: {
|
|
data: {
|
|
|
approveStatus: false,
|
|
approveStatus: false,
|
|
|
showCover: true,
|
|
showCover: true,
|
|
|
|
|
+ settingVisible: false,
|
|
|
imgServerUrl,
|
|
imgServerUrl,
|
|
|
navigation: [
|
|
navigation: [
|
|
|
{
|
|
{
|
|
@@ -41,7 +42,26 @@ Page({
|
|
|
todayMoney: 0,
|
|
todayMoney: 0,
|
|
|
sumDuration: 0,
|
|
sumDuration: 0,
|
|
|
sumMoney: 0,
|
|
sumMoney: 0,
|
|
|
- wsPunchClockId: ''
|
|
|
|
|
|
|
+ wsPunchClockId: '',
|
|
|
|
|
+ actions: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '取消',
|
|
|
|
|
+ color: '#007AFF'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '确认',
|
|
|
|
|
+ color: '#007AFF',
|
|
|
|
|
+ fontWeight: 600
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ closeSettingVisible(data) {
|
|
|
|
|
+ const { index } = data.detail;
|
|
|
|
|
+ if (index === 0) {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ settingVisible: false
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
toRule() {
|
|
toRule() {
|
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
@@ -70,10 +90,15 @@ Page({
|
|
|
const info = wx.getSystemInfoSync()
|
|
const info = wx.getSystemInfoSync()
|
|
|
if (data.errMsg.indexOf('system permission denied') !== -1 || info.locationEnabled === false) {
|
|
if (data.errMsg.indexOf('system permission denied') !== -1 || info.locationEnabled === false) {
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
- content: '无法使用打卡功能',
|
|
|
|
|
- title: '微信未开启系统定位功能',
|
|
|
|
|
|
|
+ content: '请授权微信获取位置信息权限',
|
|
|
|
|
+ title: '微信未能获取位置信息',
|
|
|
showCancel: false,
|
|
showCancel: false,
|
|
|
|
|
+ confirmColor: '#007AFF',
|
|
|
|
|
+ confirmText: '确认',
|
|
|
})
|
|
})
|
|
|
|
|
+ // this.setData({
|
|
|
|
|
+ // settingVisible: true
|
|
|
|
|
+ // })
|
|
|
reject()
|
|
reject()
|
|
|
} else {
|
|
} else {
|
|
|
console.log(data)
|
|
console.log(data)
|
|
@@ -87,9 +112,12 @@ Page({
|
|
|
},
|
|
},
|
|
|
fail: () => {
|
|
fail: () => {
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
- content: '无法使用打卡功能',
|
|
|
|
|
- confirmText: '去授权',
|
|
|
|
|
- title: '位置信息未授权',
|
|
|
|
|
|
|
+ content: '',
|
|
|
|
|
+ // confirmText: '去授权',
|
|
|
|
|
+ title: '请前往设置打开用户定位权限',
|
|
|
|
|
+ confirmColor: '#007AFF',
|
|
|
|
|
+ cancelColor: '#007AFF',
|
|
|
|
|
+ confirmText: '确认',
|
|
|
success: (result) => {
|
|
success: (result) => {
|
|
|
if (result.confirm) {
|
|
if (result.confirm) {
|
|
|
wx.openSetting({})
|
|
wx.openSetting({})
|