Forráskód Böngészése

feat: 优化消息卡片和待办事项列表的渲染逻辑,修复用户ID类型转换

EvilDragon 1 hónapja
szülő
commit
6cc8b9c9de

+ 2 - 0
packages/app/src/pages/messages/components/message-card.vue

@@ -70,10 +70,12 @@ onMounted(async () => {
       </div>
       <div class="row-start-2 col-start-2 col-end-4">
         <div class="my-3 text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[25px]">
+          <!-- {{ options.detailBody }} -->
           <div
             v-if="options.messageType === MessageType.Integral"
             v-html="options.detailBody"
           ></div>
+          <div v-html="options.detailBody"></div>
           <div class="grid grid-cols-[auto_1fr] gap-x-5 gap-y-4.5">
             <template v-if="options.messageSubType === 31 && options.isRead !== '1'">
               <div

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

@@ -20,7 +20,7 @@ const current = ref(Date.now())
 const { data, run: setData } = useRequest(
   () =>
     getTodos({
-      brokerId: userInfo.value.userId.toString(),
+      brokerId: String(userInfo.value.userId),
       executionTime: [
         dayjs(current.value).startOf('days').format('YYYY-MM-DD HH:mm:ss'),
         dayjs(current.value).endOf('days').format('YYYY-MM-DD HH:mm:ss'),

+ 40 - 6
packages/merchant/src/pages/home/index.vue

@@ -121,12 +121,45 @@ onShareAppMessage(() => ({}))
           </div>
           <Card>
             <div>
-              <!-- <wd-steps :active="1" vertical>
-                <wd-step description="注册1个账号" />
-                <wd-step description="登录账号并绑定手机" />
-                <wd-step description="完善个人信息" />
-              </wd-steps> -->
-              <PageHelperEvo :request="getTodoPage" :query="todosQuery"></PageHelperEvo>
+              <PageHelperEvo :request="getTodoPage" :query="todosQuery">
+                <template #default="{ source }">
+                  <div class="flex flex-col py-6">
+                    <template v-for="(it, index) in source?.list" :key="index">
+                      <div>
+                        <div class="flex items-center gap-4">
+                          <div
+                            class="w-14 text-end text-black text-base font-normal font-['PingFang SC'] leading-none"
+                          >
+                            {{ dayjs(it.executionTime).format('HH:mm') }}
+                          </div>
+                          <div class="w-3 h-3 relative">
+                            <div
+                              class="w-3 h-3 left-0 top-0 absolute rounded-full"
+                              :class="`${it.status === 1 ? 'bg-[#517df8]/10' : 'bg-[#5e5e5e]/10'}`"
+                            ></div>
+                            <div
+                              class="w-1.5 h-1.5 left-[3px] top-[3px] absolute rounded-full"
+                              :class="`${it.status === 1 ? 'bg-[#517df8]' : 'bg-[#a8a8a8]'}`"
+                            ></div>
+                          </div>
+                          <div
+                            class="text-black/60 text-sm font-normal font-['PingFang SC'] leading-none"
+                          >
+                            {{ it.content }}
+                          </div>
+                        </div>
+                        <div v-if="index < (source?.list?.length ?? 0) - 1" class="flex gap-4">
+                          <div class="w-14"></div>
+                          <div class="w-3 flex justify-center">
+                            <div class="w-.25 h-10 bg-[#EDEDED]"></div>
+                          </div>
+                          <div></div>
+                        </div>
+                      </div>
+                    </template>
+                  </div>
+                </template>
+              </PageHelperEvo>
               <div
                 class="flex items-center justify-center b-t b-t-solid b-t-[#f6f6f6] pt-3.5"
                 @click="router.push('/pages/agent/todo/index')"
@@ -150,6 +183,7 @@ onShareAppMessage(() => ({}))
             <Card v-if="!tasks.list.length">
               <wd-status-tip image="search" tip="当前暂无未开始/进行中的任务" />
             </Card>
+
             <template v-for="(it, i) in tasks.list" :key="i">
               <div class="inline-block">
                 <div class="w-[calc(75vw)]"><TaskCard :options="it"></TaskCard></div>