打卡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 = () => {
if ("geolocation" in navigator) {
console.log(navigator.geolocation, "navigator.geolocation");
navigator.geolocation.getCurrentPosition(
(pos) => {
console.log(pos.coords, "pos");
if (pos.coords) {
var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude;

View File

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