diff --git a/.env.development b/.env.development index 14afb67..aaec465 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ # VITE_API_BASE_URL = http://112.29.103.165:1616 -VITE_API_BASE_URL = /api -# VITE_API_BASE_URL = http://192.168.0.14:1999/hd-realname/prod-api +# VITE_API_BASE_URL = /api +VITE_API_BASE_URL = http://192.168.0.14:1999/hd-realname/prod-api # VITE_API_BASE_URL = http://192.168.0.234:38080 diff --git a/src/components/ContractForm/index.vue b/src/components/ContractForm/index.vue index 1b6b7bc..2a038c9 100644 --- a/src/components/ContractForm/index.vue +++ b/src/components/ContractForm/index.vue @@ -114,12 +114,13 @@ multiple :maxCount="1" :name="item.name" - accept="image/*" + accept="image" :fileList="item.fileList" @delete="deletePic($event, index)" :disabled="isEditContractStatus" :deletable="!isEditContractStatus" @afterRead="afterRead($event, index)" + :capture="['album', 'camera']" /> diff --git a/src/components/KeyInfoForm/index.vue b/src/components/KeyInfoForm/index.vue index 155ae51..f8a76ef 100644 --- a/src/components/KeyInfoForm/index.vue +++ b/src/components/KeyInfoForm/index.vue @@ -92,9 +92,10 @@ multiple :maxCount="1" name="faceImg" - accept="image/*" + accept="image" @delete="deletePic" @afterRead="afterRead" + :capture="['album', 'camera']" :fileList="keyInfoForm.faceImg" /> diff --git a/src/components/WageCardForm/index.vue b/src/components/WageCardForm/index.vue index b811bf0..3e5c09d 100644 --- a/src/components/WageCardForm/index.vue +++ b/src/components/WageCardForm/index.vue @@ -69,9 +69,10 @@ diff --git a/src/pages/attendance/index.vue b/src/pages/attendance/index.vue index f40a142..907a4ec 100644 --- a/src/pages/attendance/index.vue +++ b/src/pages/attendance/index.vue @@ -39,25 +39,12 @@ import { ref, onMounted, onBeforeUnmount } from 'vue' import { useCommonStore } from '@/stores' import dayjs from 'dayjs' + const commonStore = useCommonStore() const currentTime = ref('') //获取当前的时分秒时间 const timeInterval = ref(null) //定时器 const activeProjectName = ref('') // 当前选择的工程名称 -onMounted(() => { - timeInterval.value = setInterval(() => { - // currentTime.value = new Date().toLocaleTimeString() - - // 设置时分秒 - currentTime.value = dayjs().format('HH:mm:ss') - }, 1000) -}) - -onBeforeUnmount(() => { - clearInterval(timeInterval.value) - timeInterval.value = null -}) - // 打卡记录 const onAttendanceRecord = () => { uni.navigateTo({ @@ -82,9 +69,22 @@ const onAttendanceHandle = () => { uni.$u.toast('功能正在开发中,敬请期待...') } +// onMounted生命周期 组件挂载时 onMounted(() => { + timeInterval.value = setInterval(() => { + // currentTime.value = new Date().toLocaleTimeString() + + // 设置时分秒 + currentTime.value = dayjs().format('HH:mm:ss') + }, 1000) activeProjectName.value = commonStore?.activeProjectName }) + +// onBeforeUnmount生命周期 组件卸载时 +onBeforeUnmount(() => { + clearInterval(timeInterval.value) + timeInterval.value = null +})