Bläddra i källkod

Merge remote-tracking branch 'origin/main'

15591641157 2 månader sedan
förälder
incheckning
419c0e9c2d

+ 1 - 1
packages/app/src/pages/home/index.vue

@@ -87,7 +87,7 @@ const handleSwiperChange = ({ detail: { current, source } }) => {
   console.log(current, source, swiperCurrent.value)
   homeBannerRef.value?.[swiperCurrent.value]?.videoContext.pause()
   swiperCurrent.value = current
-  currentBanner.value = current 
+  currentBanner.value = current
 }
 const handleLike = async (options) => {
   await handleUpvoteClick({

+ 14 - 2
packages/merchant/src/pages/agent/todo/index.vue

@@ -19,7 +19,7 @@ const current = ref(Date.now())
 const { data: list, run: setList } = useRequest(
   () =>
     getTodos({
-      brokerId: String(userInfo.value.userId)
+      brokerId: String(userInfo.value.userId),
     }),
   {
     initialData: [],
@@ -73,6 +73,7 @@ const handleDelete = async (todo: Todo) => {
   console.log('删除')
   await requestToast(() => deleteTodo(todo.id), { success: true, successTitle: '删除成功' })
   await setData()
+  await setList()
 }
 const handleClick = async ({ value }: { value: boolean }, todo: Todo) => {
   await updateTodo({ id: todo.id, status: value ? 1 : 0 })
@@ -98,8 +99,19 @@ onMounted(async () => {
 })
 </script>
 <template>
+  <div v-if="!list" v-for="(it, i) in list" :key="i" />
   <div class="flex-grow">
-    <wd-calendar-view v-model="current" @change="handleCalendarChange" :formatter="formatter" />
+    <wd-calendar-view v-model="current" @change="handleCalendarChange" :formatter="(day: any) => {
+      let date = dayjs(new Date(day.date)).format('YYYY-MM-DD')
+      console.log('--------', list)
+      for(const {executionTime} of list) {
+        let date2 = dayjs(new Date(executionTime)).format('YYYY-MM-DD')
+        if (date === date2) {
+          day.bottomInfo = '•'
+        }
+      }
+      return day
+    }" />
     <wd-floating-panel v-if="!addSheetVisible" :anchors="[260, 490]" :custom-class="'h-auto'">
       <div class="box-border p-4 flex flex-col gap-3.5">
         <div class="flex items-center gap-2.5">