|
@@ -3,6 +3,8 @@ import SectionHeading from '@/components/section-heading.vue'
|
|
|
import { scheduleCardBg } from '../../../core/libs/pngs'
|
|
|
import { group } from 'radash'
|
|
|
import dayjs from 'dayjs'
|
|
|
+import ImageEvo from '@/components/image-evo.vue'
|
|
|
+import { useRouter } from '../../../core/utils/router'
|
|
|
|
|
|
const props = withDefaults(
|
|
|
defineProps<{
|
|
@@ -27,7 +29,9 @@ const props = withDefaults(
|
|
|
items: () => [],
|
|
|
},
|
|
|
)
|
|
|
+const router = useRouter()
|
|
|
const data = ref()
|
|
|
+const imgDisplayed = ref(false)
|
|
|
const schedules = computed(() =>
|
|
|
group(props.items, (it) => dayjs(it?.travelTime).format('YYYY-MM-DD')),
|
|
|
)
|
|
@@ -39,7 +43,10 @@ const push = () => {
|
|
|
data.value = currentSchedule.value.slice(0, 2)
|
|
|
}
|
|
|
const handleClick = async () => {
|
|
|
- uni.navigateTo({ url: '/pages/home/schedule/index' })
|
|
|
+ router.push('/pages/home/schedule/index')
|
|
|
+}
|
|
|
+const handleImgDisplayed = () => {
|
|
|
+ setTimeout(() => (imgDisplayed.value = true), 300)
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
push()
|
|
@@ -86,8 +93,13 @@ onMounted(() => {
|
|
|
</template>
|
|
|
</div>
|
|
|
<view class="w-full relative bottom-7 mb--9">
|
|
|
- <wd-img :src="scheduleCardBg" width="100%" mode="widthFix"></wd-img>
|
|
|
- <view class="absolute bottom-0 left-0 right-0 px-3.5 py-7 flex flex-col items-center">
|
|
|
+ <div class="aspect-[2.55/1]">
|
|
|
+ <ImageEvo :src="scheduleCardBg" @displayed="handleImgDisplayed"></ImageEvo>
|
|
|
+ </div>
|
|
|
+ <view
|
|
|
+ class="absolute bottom-0 left-0 right-0 px-3.5 py-7 flex flex-col items-center"
|
|
|
+ v-show="imgDisplayed"
|
|
|
+ >
|
|
|
<wd-icon
|
|
|
custom-class="relative bottom-6"
|
|
|
:name="data?.length > 2 ? 'arrow-up' : 'arrow-down'"
|
|
@@ -95,7 +107,7 @@ onMounted(() => {
|
|
|
color="#4f4f4f"
|
|
|
@click="data?.length > 2 ? push() : pull()"
|
|
|
></wd-icon>
|
|
|
- <view class="w-full">
|
|
|
+ <view class="w-full duration-800">
|
|
|
<wd-button block size="large" custom-class="rd!" @click="handleClick">
|
|
|
查看全部行程
|
|
|
</wd-button>
|