update
This commit is contained in:
@@ -20,17 +20,20 @@ const {data} = defineProps({
|
||||
<view style="font-size: 28rpx">
|
||||
任务编号:{{ data.uid }}
|
||||
</view>
|
||||
<view v-if="data.back_status === 1" style="font-size: 24rpx">
|
||||
<view v-if="data.back_status === 0" style="font-size: 24rpx">
|
||||
<Text class="text-[#165DFF]">{{ dayjs(data.time).format('MM-DD-HH:mm') }}</Text>
|
||||
后可开始回填
|
||||
</view>
|
||||
<x-countdown v-else-if="data.back_status === 1" :time="dayjs(data.time)">
|
||||
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">回填倒计时:</view>
|
||||
</x-countdown>
|
||||
<x-countdown v-else-if="data.back_status === 2" :time="dayjs(data.time)">
|
||||
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">审核倒计时:</view>
|
||||
</x-countdown>
|
||||
<view v-else-if="data.status === -1 || data.status === 3" class="text-[rgb(78,89,105)]"
|
||||
style="font-size: 24rpx">
|
||||
{{ data.time }}
|
||||
</view>
|
||||
<x-countdown v-else :time="dayjs(data.time)">
|
||||
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">审核倒计时:</view>
|
||||
</x-countdown>
|
||||
</view>
|
||||
|
||||
<view class="!flex gap-[26rpx] !pt-[20rpx]">
|
||||
|
||||
@@ -1,25 +1,39 @@
|
||||
<script setup>
|
||||
import {ref} from "vue";
|
||||
import {ref, watch} from "vue";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const {time} = defineProps({
|
||||
const props = defineProps({
|
||||
time: {
|
||||
type: String,
|
||||
default: dayjs(new Date()).add(20, 'minutes'),
|
||||
default: null,
|
||||
}
|
||||
});
|
||||
|
||||
const diff = ref(dayjs(time).diff(dayjs(new Date()), 'second'));
|
||||
const diff = ref(dayjs(props.time).diff(dayjs(new Date()), 'second'));
|
||||
const hours = ref(null);
|
||||
const minutes = ref(null);
|
||||
const seconds = ref(null);
|
||||
|
||||
const timer = setInterval(() => {
|
||||
diff.value = dayjs(time).diff(dayjs(new Date()), 'second');
|
||||
hours.value = Math.floor(diff.value / 3600);
|
||||
minutes.value = Math.floor((diff.value % 3600) / 60);
|
||||
seconds.value = diff.value % 60;
|
||||
}, 1000);
|
||||
let timer = null;
|
||||
|
||||
watch(
|
||||
() => props.time,
|
||||
() => {
|
||||
console.log('运行')
|
||||
clearInterval(timer);
|
||||
diff.value = dayjs(props.time).diff(dayjs(new Date()), 'second');
|
||||
hours.value = Math.floor(diff.value / 3600);
|
||||
minutes.value = Math.floor((diff.value % 3600) / 60);
|
||||
seconds.value = diff.value % 60;
|
||||
timer = setInterval(() => {
|
||||
diff.value = dayjs(props.time).diff(dayjs(new Date()), 'second');
|
||||
hours.value = Math.floor(diff.value / 3600);
|
||||
minutes.value = Math.floor((diff.value % 3600) / 60);
|
||||
seconds.value = diff.value % 60;
|
||||
}, 1000);
|
||||
},
|
||||
{deep: true, immediate: true}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -57,13 +57,13 @@ defineExpose({
|
||||
<swiper class="!size-full" :current="cur" @change="({detail:{current}})=>cur=current">
|
||||
<swiper-item v-for="src in list">
|
||||
<template v-if="!src.endsWith('.mp4')">
|
||||
<image class="!size-full" :src="src" mode="aspectFit"></image>
|
||||
<image v-if="sy" class="!size-full !absolute left-0 top-0" :src="SY_ICON"
|
||||
<image @click.stop class="!size-full" :src="src" mode="aspectFit"></image>
|
||||
<image @click.stop v-if="sy" class="!size-full !absolute left-0 top-0" :src="SY_ICON"
|
||||
mode="aspectFit"></image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="!size-full !flex items-center">
|
||||
<video class="!w-full" :src="src"></video>
|
||||
<view class="!size-full !flex items-center" @click.stop>
|
||||
<video class="!w-full" :src="src" :controls="true"></video>
|
||||
</view>
|
||||
</template>
|
||||
</swiper-item>
|
||||
|
||||
Reference in New Issue
Block a user