修改 劳务管理-移动考勤-实时 时间显示

This commit is contained in:
yjl 2023-03-15 11:51:14 +08:00
parent c767304ce2
commit fe2aaabf6c
9 changed files with 53 additions and 48 deletions

12
App.vue
View File

@ -12,10 +12,10 @@
if (uni.getStorageSync('ipPort')) {
this.globalData.siteUrl = uni.getStorageSync('ipPort') + '/'
} else {
// this.globalData.siteUrl = 'http://182.90.224.147:100/' //
this.globalData.siteUrl = 'http://182.90.224.147:100/' //
// this.globalData.siteUrl = 'http://124.71.178.44:8012/' //
// this.globalData.siteUrl = 'http://182.90.224.237:7000/' //广西
this.globalData.siteUrl = 'http://124.71.67.160:8088/' //
// this.globalData.siteUrl = 'http://124.71.67.160:8088/' //
// this.globalData.siteUrl = 'http://192.168.34.148:6023/' //广西/
// this.globalData.siteUrl = 'http://8.142.139.165:7080/' //
// this.globalData.siteUrl = "http://58.34.63.88:9090/"
@ -31,7 +31,7 @@
// this.globalData.siteUrl = 'http://192.168.34.116:6023/'//
// Vue.prototype.url_config = 'http://124.71.87.250/'
// this.globalData.siteUrl = 'http://58.250.210.4:9090/'
// this.globalData.siteUrl = 'http://182.90.224.147:18170/'//
// this.globalData.siteUrl = 'http://182.90.224.147:18170'//
}
} else {
@ -41,11 +41,11 @@
this.globalData.siteUrl = uni.getStorageSync('ipPort') + '/'
} else {
// this.globalData.siteUrl = 'http://8.142.139.165:7080/' //
// this.globalData.siteUrl = 'http://182.90.224.147:100/' //
this.globalData.siteUrl = 'http://182.90.224.147:100/' //
// this.globalData.siteUrl = 'http://124.71.178.44:8012/' //
// this.globalData.siteUrl = 'http://192.168.34.148:6023/' //广西/
// this.globalData.siteUrl = 'http://182.90.224.237:7000/' //广西
this.globalData.siteUrl = 'http://124.71.67.160:8088/' //
// this.globalData.siteUrl = 'http://124.71.67.160:8088/' //
// this.globalData.siteUrl = "http://58.34.63.88:9090/"
// this.globalData.siteUrl = 'http://124.71.178.44:9000/'
// Vue.prototype.url_config = 'http://192.168.34.125:6023/'
@ -59,7 +59,7 @@
// this.globalData.siteUrl = 'http://192.168.34.116:6023/'//
// Vue.prototype.url_config = 'http://124.71.87.250/'
// Vue.prototype.url_config = 'http://58.250.210.4:9090/'
// this.globalData.siteUrl = 'http://182.90.224.147:18170/'//
// this.globalData.siteUrl = 'http://182.90.224.147:18170'//
}
}

12
main.js
View File

@ -22,7 +22,7 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = 'http://139.9.66.234:8/'
// Vue.prototype.url_config = 'http://192.168.34.125:6023/'
// Vue.prototype.url_config = 'http://182.90.224.237:7000/' //广西联通
Vue.prototype.url_config = 'http://124.71.67.160:8088/'//中建四局
// Vue.prototype.url_config = 'http://124.71.67.160:8088/'//中建四局
// Vue.prototype.url_config = 'http://192.168.34.148:6023' //广西联通/本地
// Vue.prototype.url_config = 'http://223.82.100.80:9000/'
// Vue.prototype.url_config = 'http://120.236.247.200:9000/'
@ -37,9 +37,9 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = 'http://124.71.178.44:8/'
// Vue.prototype.url_config = 'http://124.71.87.250/'
// Vue.prototype.url_config = 'http://124.71.178.44:8012' // 河南
// Vue.prototype.url_config = 'http://182.90.224.147:100/' //演示平台
Vue.prototype.url_config = 'http://182.90.224.147:100/' //演示平台
// this.globalData.siteUrl = 'http://192.168.34.116:6023/'//邱平毅本地
// this.globalData.siteUrl = 'http://182.90.224.147:18170/'//瑞士恒通
// this.globalData.siteUrl = 'http://182.90.224.147:18170'//瑞士恒通
}
} else {
@ -48,13 +48,13 @@ if (process.env.NODE_ENV === 'development') {
if (uni.getStorageSync('ipPort')) {
Vue.prototype.url_config = uni.getStorageSync('ipPort') + '/'
} else {
// Vue.prototype.url_config = 'http://182.90.224.147:100/' //演示平台
Vue.prototype.url_config = 'http://182.90.224.147:100/' //演示平台
// Vue.prototype.url_config ='http://124.71.178.44:8012/' // 河南
// Vue.prototype.url_config = 'http://8.142.139.165:7080/' //湖里
// Vue.prototype.url_config = 'http://139.9.66.234:8/'
// Vue.prototype.url_config = 'http://192.168.34.125:6023/'
// Vue.prototype.url_config = 'http://182.90.224.237:7000/' //广西联通
Vue.prototype.url_config = 'http://124.71.67.160:8088/' //中建四局
// Vue.prototype.url_config = 'http://124.71.67.160:8088/' //中建四局
// Vue.prototype.url_config = 'http://192.168.34.148:6023' //广西联通/本地
// Vue.prototype.url_config = 'http://223.82.100.80:9000/'
// Vue.prototype.url_config = 'http://120.236.247.200:9000/'
@ -68,7 +68,7 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = "http://36.137.53.203:9090/"
// Vue.prototype.url_config = 'http://124.71.87.250/'
// this.globalData.siteUrl = 'http://192.168.34.116:6023/'//邱平毅本地
// this.globalData.siteUrl = 'http://182.90.224.147:18170/'//瑞士恒通
// this.globalData.siteUrl = 'http://182.90.224.147:18170'//瑞士恒通
}
}

View File

@ -1,5 +1,5 @@
{
"name" : "智慧工地app",
"name" : "智慧工地",
"appid" : "__UNI__7B68D44",
"description" : "",
"versionName" : "1.2.4",
@ -27,7 +27,8 @@
"SQLite" : {},
"FaceID" : {},
"Fingerprint" : {},
"Speech" : {}
"Speech" : {},
"Push" : {}
},
/* */
"distribute" : {

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "中建四局app",
"name": "智慧工地云",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -51,7 +51,7 @@
{{!attendenceData.enterTime?'上班':!attendenceData.outTime?'下班':'更新'}}打卡
</view>
<view class="time">
{{currentTime}}
{{nowTime}}
</view>
</view>
<view class="address" v-if="canClick">
@ -89,7 +89,11 @@
timer:null,
realName:'',
phoneClockImageType:0,
faceScore:0
faceScore:0,
timer: '', //
nowTime: '',
}
},
computed:{
@ -110,9 +114,14 @@
}
}
},
destroyed() {
clearInterval(this.timer)
},
created() {
this.getTime()
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer)
}
},
onLoad() {
this.statusBarHeight=uni.getStorageSync('systemInfo').statusBarHeight
this.screenHeight=uni.getStorageSync('systemInfo').screenHeight
@ -124,10 +133,6 @@
this.getAttendenceData()
this.getNowTime()
this.getAttendenceTypeFn()
// this.timer=setInterval(()=>{
// this.getNowTime()
// this.GetLOcation()
// },1000)
},
onShow(){
if(this.phoneClockImageType==1&&this.photoUrl){
@ -151,25 +156,24 @@
}
})
},
//
getNowTime: function () {
let dateTime
// let yy = new Date().getFullYear()
// let mm = new Date().getMonth() + 1
// let dd = new Date().getDate()
let hh = new Date().getHours()
let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
:
new Date().getMinutes()
let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
:
new Date().getSeconds()
dateTime = hh + ':' + mf + ':' + ss
// dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
// console.log(dateTime)
// return dateTime
this.currentTime=dateTime
},
getTime() {
this.timer = setInterval(() => {
let timeDate = new Date()
let year = timeDate.getFullYear()
let mounth = timeDate.getMonth() + 1
let day = timeDate.getDate()
let hours = timeDate.getHours()
hours = hours >= 10 ? hours : '0' + hours
let minutes = timeDate.getMinutes()
minutes = minutes >= 10 ? minutes : '0' + minutes
let seconds = timeDate.getSeconds()
seconds = seconds >= 10 ? seconds : '0' + seconds
let week = timeDate.getDay()
let weekArr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.nowTime = ` ${hours}:${minutes}:${seconds}`
}, 1000)
},
//
getAttendenceData(){
var that = this

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7B68D44","name":"智慧工地app","version":{"name":"1.2.4","code":124},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Maps":{"coordType":"gcj02"},"VideoPlayer":{},"Bluetooth":{},"SQLite":{},"FaceID":{},"Fingerprint":{},"Push":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"light","background":"#F0AD4E"},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"compatible":{"ignoreVersion":true},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"android":{"hdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png","xhdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png","xxhdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png"},"iosStyle":"common","ios":{"storyboard":"D:/work/JXJ2/unpackage/CustomStoryboard.zip","iphone":{"portrait-896h@3x":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png"}},"useOriginalMsgbox":false,"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_CHECKIN_PROPERTIES\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_PRIVILEGED\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.CALL_PRIVILEGED\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"maps":{"amap":{"appkey_ios":"9510eb01b56e6428646b256cc379f695","appkey_android":"fdc95509666dff9deb22e57dedd29550"}},"ad":{},"geolocation":{},"speech":{"ifly":{}},"push":{"unipush":{}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"nativePlugins":{},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.6.18","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7B68D44","name":"智慧工地","version":{"name":"1.2.4","code":124},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Maps":{"coordType":"gcj02"},"VideoPlayer":{},"Bluetooth":{},"SQLite":{},"FaceID":{},"Fingerprint":{},"Speech":{},"Push":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"light","background":"#F0AD4E"},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"compatible":{"ignoreVersion":true},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"android":{"hdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png","xhdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png","xxhdpi":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png"},"iosStyle":"common","ios":{"storyboard":"D:/work/JXJ2/unpackage/CustomStoryboard.zip","iphone":{"portrait-896h@3x":"C:/Users/86173/Desktop/6d9e3eaea01d7138ad9cffaf4739cf0.png"}},"useOriginalMsgbox":false,"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_CHECKIN_PROPERTIES\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_PRIVILEGED\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.CALL_PRIVILEGED\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"maps":{"amap":{"appkey_ios":"9510eb01b56e6428646b256cc379f695","appkey_android":"fdc95509666dff9deb22e57dedd29550"}},"ad":{},"geolocation":{},"speech":{"ifly":{}},"push":{"unipush":{}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"nativePlugins":{},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.6.18","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}}