打卡bug

This commit is contained in:
13684185576
2025-11-06 11:42:56 +08:00
parent 5c7efdd1e8
commit 6538af0c59
2 changed files with 10 additions and 5 deletions

View File

@ -104,10 +104,8 @@ onMounted(() => {
}); });
const getLocation = () => { const getLocation = () => {
if ("geolocation" in navigator) { if ("geolocation" in navigator) {
console.log(navigator.geolocation, "navigator.geolocation");
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
(pos) => { (pos) => {
console.log(pos.coords, "pos");
if (pos.coords) { if (pos.coords) {
var latitude = pos.coords.latitude; var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude; var longitude = pos.coords.longitude;

View File

@ -151,6 +151,7 @@ const { formattedTime, isExpired, expirationTime, start, stop } =
// 删除打卡图片 // 删除打卡图片
const clearImage = () => { const clearImage = () => {
baseUrl.value = ""; baseUrl.value = "";
fileId.value = "";
}; };
// 浏览图片 // 浏览图片
@ -436,6 +437,8 @@ const handleClick = async () => {
if (res) { if (res) {
hintToast(`打卡成功`); hintToast(`打卡成功`);
baseUrl.value = ""; //打卡成功需要把图片删除掉
fileId.value = "";
await getData(); await getData();
start(); start();
} }
@ -461,7 +464,7 @@ onMounted(() => {
<top-nav navTitle="打卡" :showLeft="true" /> <top-nav navTitle="打卡" :showLeft="true" />
<div class="clockInWrapper"> <div class="clockInWrapper">
<van-tabs v-model:active="active" :active="active" @click="onChange"> <van-tabs v-model:active="active" @click="onChange">
<template v-for="(item, index) in data.patroObj?.bddList" :key="index"> <template v-for="(item, index) in data.patroObj?.bddList" :key="index">
<van-tab :title="item.bddMc" /> <van-tab :title="item.bddMc" />
</template> </template>
@ -645,8 +648,8 @@ onMounted(() => {
.image_box { .image_box {
position: relative; position: relative;
width: 42.67vw; width: 40vw;
height: 26.67vw; height: 24vw;
.close_icon { .close_icon {
position: absolute; position: absolute;
@ -721,6 +724,9 @@ onMounted(() => {
} }
::v-deep { ::v-deep {
.van-tabs__nav {
flex-wrap: wrap;
}
.van-tabs__nav--line { .van-tabs__nav--line {
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }
@ -744,6 +750,7 @@ onMounted(() => {
flex-shrink: 0; flex-shrink: 0;
border-radius: 2vw; border-radius: 2vw;
margin-right: 2vw; margin-right: 2vw;
margin-bottom: 4px;
&:last-child { &:last-child {
margin-right: 0 !important; margin-right: 0 !important;