diff --git a/src/App.vue b/src/App.vue index 284188d..f9cc09d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,6 @@ export default { if (userStore.isLogin) { userStore.fetchUserInfo() } - console.log(userStore.isLogin); // #ifdef APP-PLUS if (userStore.isLogin) { plus.navigator.closeSplashscreen() diff --git a/src/components/cu-badge/index.vue b/src/components/cu-badge/index.vue index ab69b48..134c70a 100644 --- a/src/components/cu-badge/index.vue +++ b/src/components/cu-badge/index.vue @@ -1,13 +1,20 @@ diff --git a/src/pages/clockout/index.vue b/src/pages/clockout/index.vue index 8f54088..bff0ec3 100644 --- a/src/pages/clockout/index.vue +++ b/src/pages/clockout/index.vue @@ -50,7 +50,7 @@ @@ -118,7 +118,10 @@ const form = reactive({ const rules = ref({}) const noCheck = computed(() => { - return isGPS.value || !detail.enable + return !isGPS.value || !detail.value.enable +}) +const maxDistance = computed(() => { + return detail.value.maxDistance }) const timeConfirm = ({ value }) => { @@ -139,10 +142,10 @@ const getLoca = async () => { type: 'wgs84', fail: (err) => { isGPS.value = false - uni.showToast({ - icon: 'none', - title: '定位失败,请检查手机定位权限是否开启', - }) + // uni.showToast({ + // icon: 'none', + // title: '定位失败,请检查手机定位权限是否开启', + // }) }, success: (res) => { isGPS.value = true @@ -150,7 +153,7 @@ const getLoca = async () => { complete: async (e) => { position.value = { lat: e.latitude, - lng: e.longitude, + lon: e.longitude, ...e } initLo() @@ -159,7 +162,12 @@ const getLoca = async () => { } const initLo = async () => { - const resdata = await http.get('/hr/sign/info', position.value) + console.log(position.value); + const resdata = await http.get('/hr/sign/info',{ + params: { + ...position.value + } + }) detail.value = resdata form.type = resdata.type form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name @@ -203,7 +211,7 @@ const goPage = (url) => { .btn { &[disabled='true'] { - @apply opacity-70 pointer-events-none; + @apply bg-hex-999 pointer-events-none; } } diff --git a/src/pages/clockout/logs.vue b/src/pages/clockout/logs.vue index 1705bcf..144e62b 100644 --- a/src/pages/clockout/logs.vue +++ b/src/pages/clockout/logs.vue @@ -17,6 +17,12 @@ > + - - + + + + - + 昨日累计金额 @@ -82,8 +82,13 @@ import { onShow } from '@dcloudio/uni-app' import { timeFormat } from '@climblee/uv-ui/libs/function' import StoreDown from './components/store-down.vue' import { useUserStore } from '@/store/modules/user' +import cuBadge from '@/components/cu-badge/index.vue' import checkPermission from '@/utils/permission' const userStore = useUserStore() +const userInfo = computed(() => userStore.userInfo) +const unread_notifications = computed( + () => userInfo.value.unread_notifications || 0 +) const opts = { color: ['#ee2c37'], dataLabel: false, @@ -129,11 +134,13 @@ const list = ref([ const tabIndex = ref(0) const detail = ref({ yesday_ledger: {}, - current_month_ledger:{} + current_month_ledger: {}, }) const chartData = ref({}) const yesday_ledger = computed(() => detail.value.yesday_ledger || {}) -const current_month_ledger = computed(() => detail.value.current_month_ledger || {}) +const current_month_ledger = computed( + () => detail.value.current_month_ledger || {} +) const trends_of_30days = computed(() => detail.value.trends_of_30days || []) const yesterday = computed(() => { @@ -173,6 +180,7 @@ const updateData = () => { onShow(() => { getData() + userStore.fetchUserInfo() }) const getData = (e = {}) => { diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index 74eb864..be3d8b3 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -43,15 +43,15 @@ @click="goPath('/pages/clockout/index')" > - + @@ -95,6 +95,7 @@ import contractIcon from '@/static/images/contract.svg' import booksIcon from '@/static/images/books.svg' import examinationIcon from '@/static/images/examination.svg' import cuBadge from '@/components/cu-badge/index.vue' +import { onShow } from '@dcloudio/uni-app' const userStore = useUserStore() const userInfo = computed(() => userStore.userInfo) @@ -102,6 +103,10 @@ const unread_notifications = computed( () => userInfo.value.unread_notifications || 0 ) +onShow(() => { + userStore.fetchUserInfo() +}) + const opList = [ { title: '门店数据', diff --git a/src/pages/overtime/create.vue b/src/pages/overtime/create.vue index 87946c1..fe5ac03 100644 --- a/src/pages/overtime/create.vue +++ b/src/pages/overtime/create.vue @@ -43,7 +43,7 @@ - + diff --git a/src/pages/revert/index.vue b/src/pages/revert/index.vue index f03a83e..4d044e5 100644 --- a/src/pages/revert/index.vue +++ b/src/pages/revert/index.vue @@ -1,7 +1,7 @@