Ver código fonte

Merge branch 'main' of http://39.106.91.179:3000/hunter/designer-hub into main

purui 1 mês atrás
pai
commit
5b2f149ff9
26 arquivos alterados com 252 adições e 53 exclusões
  1. 1 1
      packages/app/src/components/swiper-evo.vue
  2. 5 1
      packages/app/src/composables/permissions.ts
  3. 3 0
      packages/app/src/core/libs/messages.ts
  4. 15 0
      packages/app/src/core/libs/models.ts
  5. 1 0
      packages/app/src/pages/common/components/coupons-selector.vue
  6. 3 1
      packages/app/src/pages/home/activity/detail/index.vue
  7. 9 2
      packages/app/src/pages/home/components/comment-item.vue
  8. 7 2
      packages/app/src/pages/home/mall/index.vue
  9. 1 1
      packages/app/src/pages/home/moment/index.vue
  10. 4 6
      packages/app/src/pages/messages/components/message-card.vue
  11. 5 2
      packages/app/src/pages/mine/authentication/index.vue
  12. 27 9
      packages/app/src/pages/mine/honors/detail/index.vue
  13. 18 6
      packages/app/src/pages/mine/honors/index.vue
  14. 15 1
      packages/app/src/pages/mine/orders/detail/index.vue
  15. 1 0
      packages/app/src/pages/publish/moment/index.vue
  16. 7 1
      packages/merchant/src/core/libs/agent-requests.ts
  17. 1 0
      packages/merchant/src/core/libs/enums.ts
  18. 7 0
      packages/merchant/src/pages.json
  19. 1 1
      packages/merchant/src/pages/agent/components/task-card.vue
  20. 1 1
      packages/merchant/src/pages/agent/designer/archives/index.vue
  21. 1 1
      packages/merchant/src/pages/agent/designer/detail.vue
  22. 1 1
      packages/merchant/src/pages/agent/designer/index.vue
  23. 96 0
      packages/merchant/src/pages/agent/points/index.vue
  24. 20 15
      packages/merchant/src/pages/agent/tasks/index.vue
  25. 1 1
      packages/merchant/src/pages/home/index.vue
  26. 1 0
      packages/merchant/src/types/uni-pages.d.ts

+ 1 - 1
packages/app/src/components/swiper-evo.vue

@@ -6,7 +6,7 @@ const handleSwiperChange = async ({ detail: { current } }) => {
 }
 </script>
 <template>
-  <swiper class="w-full h-full" :current="modelValue" @change="handleSwiperChange">
+  <swiper class="w-full h-full" autoplay :current="modelValue" @change="handleSwiperChange">
     <template v-for="(it, i) in items" :key="i">
       <swiper-item>
         <div class="w-full h-full"><slot :item="it"></slot></div>

+ 5 - 1
packages/app/src/composables/permissions.ts

@@ -81,7 +81,7 @@ export const usePermissions = () => {
    * 按钮操作权限
    */
   const clickByPermission = (
-    name: 'wechatAgentExchange' | 'caseExchange' | 'mallExchange' | 'thumbsUp',
+    name: 'wechatAgentExchange' | 'caseExchange' | 'mallExchange' | 'thumbsUp' | 'exchange',
     callback: () => void,
   ) => {
     const features = [
@@ -91,6 +91,10 @@ export const usePermissions = () => {
        * 点赞需登录
        */
       { name: 'thumbsUp', meta: { canNotLogin: false, canNotDesigner: true } },
+      /**
+       * 活动游学兑换
+       */
+      { name: 'exchange', meta: { canNotLogin: false, canNotDesigner: false } },
     ]
     const feature = features.find((item) => item.name === name)
     if (feature) {

+ 3 - 0
packages/app/src/core/libs/messages.ts

@@ -1,6 +1,9 @@
 export const messages = {
   home: { shareTitle: '筑巢荟' },
   moment: { imageNotExist: '请上传图片' },
+  messages: {
+    pointNotice: '确认后,积分即刻到账,如有问题请驳回,联系材料商/平台客服,修改后再次确认',
+  },
   mine: {
     authentication: {
       channelSourceErrorText: '请选择来源',

+ 15 - 0
packages/app/src/core/libs/models.ts

@@ -517,6 +517,7 @@ export interface PointsOrder {
   completeTime: number
   turnDownTime: any
   cancelTime: number
+  cancelUser?: string
   cancelReason: any
   turnDownReason: any
   remark: any
@@ -726,6 +727,7 @@ export interface Agent {
   inviteCode: string
   customer: any
   customerName: string
+  points: number
 }
 export interface Designer {
   id: string
@@ -914,6 +916,19 @@ export interface Address {
   longitude: string
   latitude: string
 }
+export interface AgentPoint {
+  id: number
+  bizId: number
+  bizType: string
+  sourceId: number
+  sourceType: string
+  targetId: number
+  taskName: string
+  targetType: string
+  points: number
+  remark: string
+  createTime: string
+}
 
 export enum DictType {
   /**

+ 1 - 0
packages/app/src/pages/common/components/coupons-selector.vue

@@ -24,6 +24,7 @@ const { alert } = useMessage()
 const tab = ref(0)
 const query = ref<{ userId: number; available?: boolean }>({
   userId: userInfo.value.userId,
+  available: true,
 })
 const request = computed(() =>
   props.type === 'points'

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

@@ -42,12 +42,14 @@ import ImageEvo from '@/components/image-evo.vue'
 import TooltipEvo from '@/components/tooltip-evo.vue'
 import ActivityAsOf from '../../components/activity-as-of.vue'
 import images from '@designer-hub/assets/src/libs/assets/images'
+import { usePermissions } from '../../../../composables/permissions'
 const themeVars = ref<ConfigProviderThemeVars>({
   tableBorderColor: 'white',
   tabsNavLineBgColor: 'white',
   tabsNavColor: 'white',
 })
 const router = useRouter()
+const { clickByPermission } = usePermissions()
 const id = ref()
 const type = ref<'activity' | 'studyTour'>()
 const activityTypes = ref({ activity: '活动', studyTour: '游学' })
@@ -431,7 +433,7 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
             :content="`还差${difference}积分`"
             :model-value="status === 'runing' && difference > 0"
           >
-            <div @click="show = true">
+            <div @click="clickByPermission('exchange', () => (show = true))">
               <ButtonEvo>{{ data?.ifSingnUp ? '已报名' : '立即报名' }}</ButtonEvo>
             </div>
           </TooltipEvo>

+ 9 - 2
packages/app/src/pages/home/components/comment-item.vue

@@ -99,8 +99,15 @@ defineExpose({
         <Avatar :src="options.userAvatar" :size="isChild ? 22 : 28"></Avatar>
       </div>
       <view class="col-start-2 row-start-1">
-        <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
-          {{ options.userName }}
+        <div class="flex items-center gap-1">
+          <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
+            {{ options.userName }}
+          </div>
+          <div
+            class="px-1 rounded-[30px] border border-solid border-[#0cbe7c] justify-center items-center gap-2.5 inline-flex"
+          >
+            <div class="text-[#0cbe7c] text-[9px] font-normal font-['PingFang_SC']">作者</div>
+          </div>
         </div>
         <div class="my-3 text-black/90 text-sm font-normal font-['PingFang_SC'] leading-[10.18px]">
           <span v-if="isChild">回复</span>

+ 7 - 2
packages/app/src/pages/home/mall/index.vue

@@ -113,7 +113,10 @@ onShow(async () => {
       <div class="absolute top-11 left-0 right-0 bottom-0 bg-white rounded-2xl shadow">
         <SwiperEvo v-model="current" :items="favourableProducts">
           <template #default="{ item: it }">
-            <div class="w-full h-full px-4 flex items-center gap-3 box-border">
+            <div
+              class="w-full h-full px-4 flex items-center gap-3 box-border"
+              @click="router.push(`/pages/home/mall/detail/index?id=${it.productId}`)"
+            >
               <wd-img
                 width="114"
                 height="114"
@@ -151,7 +154,9 @@ onShow(async () => {
                     积分
                   </div>
                   <div class="flex-1"></div>
-                  <div @click="router.push(`/pages/home/mall/detail/index?id=${it.productId}`)">
+                  <div
+                    @click.stop="router.push(`/pages/home/mall/detail/index?id=${it.productId}`)"
+                  >
                     <wd-img width="106" height="40" :src="grabNow"></wd-img>
                   </div>
                 </div>

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

@@ -177,7 +177,7 @@ onShareAppMessage(async ({ from, target }) => {
           class="flex items-center gap-2"
           @click="
             ['1', '2'].includes(data.circleType) &&
-              router.push(`/pages/mine/homepage/index?id=${data.stylistId}`)
+            router.push(`/pages/mine/homepage/index?id=${data.stylistId}`)
           "
         >
           <wd-img width="24" height="24" round :src="data.headUrl"></wd-img>

+ 4 - 6
packages/app/src/pages/messages/components/message-card.vue

@@ -9,6 +9,7 @@ import { getPointsCoupons } from '../../../core/libs/requests'
 import { getMessageType } from '../../../core/libs/message-types'
 import { useRouter } from '../../../core/utils/router'
 import ButtonEvo from '@/components/button-evo.vue'
+import { messages } from '../../../core/libs/messages'
 
 const props = withDefaults(defineProps<{ options?: Message }>(), {})
 const emits = defineEmits<{
@@ -115,23 +116,21 @@ onMounted(async () => {
             v-if="
               [MessageType.Integral].includes(Number(options.messageType)) &&
               options.messageSubType === 31 &&
-              options.isRead !== '1' &&
               options.pointsDetail?.pointsStauts === PointStatus.PendingConfirmation
             "
           >
             <span class="text-black/40">
-              确认积分后,即刻到账,如有问题请驳回,联系材料商修改积分后再次确认
+              {{ messages.messages.pointNotice }}
             </span>
           </template>
           <template
             v-else-if="
               [MessageType.Integral].includes(Number(options.messageType)) &&
-              options.messageSubType === 31 &&
-              options.isRead === '1'
+              options.messageSubType === 31
             "
           >
             <template v-if="options.pointsDetail?.pointsStauts === PointStatus.Rejected">
-              <span class="text-black/40">
+              <span class="text-[#EF4343]">
                 <!-- 确认积分后,即刻到账,如有问题请驳回,联系材料商修改积分后再次确认 -->
                 驳回原因:{{ options.pointsDetail?.cancelReason }}
               </span>
@@ -161,7 +160,6 @@ onMounted(async () => {
         v-if="
           [MessageType.Integral].includes(Number(options.messageType)) &&
           options.messageSubType === 31 &&
-          options.isRead !== '1' &&
           options.pointsDetail?.pointsStauts === PointStatus.PendingConfirmation
         "
       >

+ 5 - 2
packages/app/src/pages/mine/authentication/index.vue

@@ -197,8 +197,8 @@ onMounted(async () => {
     }
     setReferrerExisting(userAuthInfo.value.channelSource.toString())
     attachment.value = userAuthInfo.value.attachment
-    schema.value.channelSource.props.disabled = true
-    schema.value.referrer.props.disabled = true
+    // schema.value.channelSource.props.disabled = true
+    // schema.value.referrer.props.disabled = true
   }
   const { data } = await getByDictType('member_channel_source')
   const { data: res } = await getByDictType(DictType.memberSpatialExpertiseType)
@@ -207,6 +207,9 @@ onMounted(async () => {
   schema.value.spatialExpertiseType.props.columns = res
   formInited.value = true
   if (userInfo.value.userAuthStatus === 1) {
+    Object.entries(schema.value).forEach(([key]) => {
+      schema.value[key].props.disabled = true
+    })
     alert({
       msg: '您的认证申请已提交,请耐心等待审核,审核通过后您将获得通知',
       title: '提示',

+ 27 - 9
packages/app/src/pages/mine/honors/detail/index.vue

@@ -12,7 +12,7 @@ import Card from '@/components/card.vue'
 import SectionHeading from '@/components/section-heading.vue'
 import { getBadges, getCertificates } from '../../../../core/libs/requests'
 import { Badge } from '../../../../core/libs/models'
-import { NetImages } from '@/core/libs/net-images'
+import { NetImages } from '../../../../core/libs/net-images'
 
 const active = ref('badge')
 const tabs = ref([
@@ -35,10 +35,26 @@ const { data: badges, run: setBadges } = useRequest(() => getBadges({}), {
 const { data: certificates, run: setCertificates } = useRequest(() => getCertificates({}), {
   initialData: [],
 })
-const data = ref<Badge | undefined>()
-onLoad(async (query: { data: string }) => {
-  data.value = JSON.parse(query.data) as Badge
-  console.log(data.value)
+const data = ref<{
+  name: string
+  quantity: number
+  // 已获取的图片和未获取的图片
+  image: string
+  activedImage: string
+}>()
+const image = computed(() => (data.value.quantity ? data.value.activedImage : data.value.image))
+onLoad(async (query: { type: 'badge' | 'certificate'; data: string }) => {
+  console.log(JSON.parse(query.data))
+
+  if (query.type === 'badge') {
+    const badge = JSON.parse(query.data) as Badge
+    data.value = {
+      name: badge.badgeName,
+      quantity: badge.quantity,
+      image: badge.badgeNotObtainedImage,
+      activedImage: badge.badgeYesObtainedImage,
+    }
+  }
 })
 </script>
 <template>
@@ -62,13 +78,15 @@ onLoad(async (query: { data: string }) => {
       ></wd-img>
     </div>
     <NavbarEvo fixed dark transparent></NavbarEvo>
-    <wd-img width="42%" mode="widthFix" :src="data.badgeYesObtainedImage"></wd-img>
+    <wd-img width="42%" mode="widthFix" :src="image"></wd-img>
     <div class="flex flex-col items-center gap-1">
       <div class="text-white text-[26px] font-normal font-['PingFang_SC'] uppercase">
-        东方研习营
+        <!-- 东方研习营 -->
+        {{ data.name }}
       </div>
       <div class="text-center text-white text-sm font-normal font-['PingFang_SC'] uppercase">
-        参加东方艺术设计研学营
+        <!-- 参加东方艺术设计研学营 -->
+        {{ `参加${data.name}` }}
       </div>
       <div class="mt-6 flex items-center gap-4">
         <div class="w-4 h-0.25 bg-white"></div>
@@ -78,7 +96,7 @@ onLoad(async (query: { data: string }) => {
         <div class="w-4 h-0.25 bg-white"></div>
       </div>
       <div class="text-center text-white text-sm font-normal font-['PingFang_SC'] uppercase">
-        累计参与3
+        累计参与{{ data.quantity }}
       </div>
     </div>
     <wd-button custom-class="w-[161px] h-12 bg-[#0cbe7c]! rounded-[30px]">去分享</wd-button>

+ 18 - 6
packages/app/src/pages/mine/honors/index.vue

@@ -171,7 +171,11 @@ onMounted(async () => {
             <template v-for="(item, i) in it" :key="i">
               <div
                 class="w-full px-4 box-border"
-                @click="router.push(`/pages/mine/honors/detail/index?data=${JSON.stringify(item)}`)"
+                @click="
+                  router.push(
+                    `/pages/mine/honors/detail/index?type=badge&data=${JSON.stringify(item)}`,
+                  )
+                "
               >
                 <wd-img
                   width="100%"
@@ -193,11 +197,19 @@ onMounted(async () => {
     </template>
     <template v-if="active === 'certificate'">
       <div>
-        <template v-for="(it, i) in certificates" :key="i">
-          <div class="grid grid-cols-2">
-            <wd-img width="100%" :src="it.certificateImage" mode="widthFix"></wd-img>
-          </div>
-        </template>
+        <div class="grid grid-cols-2 gap-2.5">
+          <template v-for="(it, i) in certificates" :key="i">
+            <div
+              @click="
+                router.push(
+                  `/pages/mine/honors/detail/index?type=certificate&data=${JSON.stringify(it)}`,
+                )
+              "
+            >
+              <wd-img width="100%" :src="it.certificateImage" mode="widthFix"></wd-img>
+            </div>
+          </template>
+        </div>
       </div>
     </template>
   </div>

+ 15 - 1
packages/app/src/pages/mine/orders/detail/index.vue

@@ -75,10 +75,24 @@ onLoad((query: { id: string }) => {
       :end-text="dayjs(data.createTime).format('YYYY-MM-DD hh:mm')"
     ></SectionHeading>
     <SectionHeading title="支付方式" size="sm" :end-text="payTypes[data.payType]"></SectionHeading>
+    <template v-if="data.orderStatus === '3'">
+      <SectionHeading
+        title="取消时间"
+        size="sm"
+        :end-text="dayjs(data.cancelTime).format('YYYY-MM-DD hh:mm')"
+      ></SectionHeading>
+      <SectionHeading title="返还积分" size="sm" :end-text="`${data.payPoints}`"></SectionHeading>
+      <SectionHeading title="取消人" size="sm" :end-text="data.cancelUser"></SectionHeading>
+    </template>
     <div class="flex-1"></div>
     <BottomAppBar fixed>
       <div>
-        <wd-button :round="false" block v-if="data.orderStatus === '0'" @click="handleSubmit">
+        <wd-button
+          :round="false"
+          block
+          v-if="['2', '4'].includes(data.orderStatus)"
+          @click="handleSubmit"
+        >
           取消订单
         </wd-button>
       </div>

+ 1 - 0
packages/app/src/pages/publish/moment/index.vue

@@ -184,6 +184,7 @@ onLoad(async (query: { circleType: '1' | '2' }) => {
     <wd-upload
       :file-list="fileList"
       image-mode="aspectFill"
+      accept="media"
       :action="action"
       :multiple="true"
       :limit="9"

+ 7 - 1
packages/merchant/src/core/libs/agent-requests.ts

@@ -11,6 +11,7 @@ import {
   DesignerBasicInfo,
   DesignerEvent,
   DesignerFamilyInfo,
+  AgentPoint,
 } from '@designer-hub/app/src/core/libs/models'
 /**
  * 通过ID获取用户信息
@@ -62,7 +63,7 @@ export const updateDesignerBasicInfo = (data: Partial<DesignerBasicInfo>) =>
 /**
  * 获取设计师家庭信息
  */
-export const getDesignerFamilyInfo = (query) =>
+export const getDesignerFamilyInfo = (query = {}) =>
   httpGet<ResPageData<DesignerFamilyInfo>>('/app-api/member/stylist-family/list', query)
 /**
  * 保存设计师家庭信息
@@ -126,3 +127,8 @@ export const updateFollowUp = (data: Partial<FollowUp>) =>
  */
 export const focusOrCancel = (data: { brokerId: number; userId: number }) =>
   httpPost('/app-api/member/user-auth-info/focus', data)
+/**
+ * /app-api/member/task/points_flow 积分流水
+ */
+export const getPointsFlow = (query = {}) =>
+  httpGet<ResPageData<AgentPoint>>('/app-api/member/task/points_flow', query)

+ 1 - 0
packages/merchant/src/core/libs/enums.ts

@@ -34,4 +34,5 @@ export enum NetImages {
   ConsultDefaultBg = 'https://image.zhuchaohui.com/zhucaohui/f1942e62d1b1adc23f37de705570e22d098da319e10c8a448dc49e594d4bee3a.png',
   StudyTourItemBg = 'https://image.zhuchaohui.com/zhucaohui/254b7ea7fdecaba8e318a7f50e292d036cafe49904fc7fc160a5477ce921e261.png',
   DefaultAvatar = 'https://image.zhuchaohui.com/zhucaohui/0b57771c2fbe60157e592a5b0e51a2b2b6c5263300663ad33efd55b235a2402a.png',
+  DefaultPointsHeadBg = 'https://image.zhuchaohui.com/zhucaohui/7442ae6cb5f8ea83269595d4ee621bd21da2c42c23db113f18bd6f25f70572aa.png',
 }

+ 7 - 0
packages/merchant/src/pages.json

@@ -95,6 +95,13 @@
       }
     },
     {
+      "path": "pages/agent/points/index",
+      "type": "page",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
       "path": "pages/agent/report-infos/index",
       "type": "page",
       "style": {

+ 1 - 1
packages/merchant/src/pages/agent/components/task-card.vue

@@ -36,7 +36,7 @@ const acceptingNoOrders = async (item: AgentTask) => {
   //   initData()
 }
 const toDetail = () =>
-  uni.navigateTo({ url: `/pages/home/tasks/detail/index?taskId=${props.options.id}` })
+  uni.navigateTo({ url: `/pages/agent/tasks/detail/index?taskId=${props.options.id}` })
 </script>
 <template>
   <Card

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

@@ -112,7 +112,7 @@ onLoad(async (query: { id: string }) => {
 </script>
 <template>
   <div class="flex-grow bg-white">
-    <wd-tabs v-model="tab">
+    <wd-tabs v-model="tab" :swipeable="true" :slidable-num="4">
       <template v-for="(it, index) in tabs" :key="index">
         <wd-tab :title="it.label" :name="it.value"></wd-tab>
       </template>

+ 1 - 1
packages/merchant/src/pages/agent/designer/detail.vue

@@ -38,7 +38,7 @@ const toOrderDetails = () => {
   uni.navigateTo({ url: '/pages/mine/merchant/orders/detail/index' })
 }
 const toArchives = () => {
-  uni.navigateTo({ url: '/pages/designer/archives/index?id=' + id.value })
+  uni.navigateTo({ url: '/pages/agent/designer/archives/index?id=' + id.value })
 }
 onLoad(async (query: { id: string }) => {
   id.value = query.id

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

@@ -60,7 +60,7 @@ const searchChange = (e: any) => {
   console.log(e)
 }
 const toDetail = async (designer: any) => {
-  await uni.navigateTo({ url: '/pages/designer/detail' + '?id=' + designer.id })
+  await uni.navigateTo({ url: '/pages/agent/designer/detail' + '?id=' + designer.id })
 }
 const callPhone = (phoneNumber) => {
   uni.makePhoneCall({

+ 96 - 0
packages/merchant/src/pages/agent/points/index.vue

@@ -0,0 +1,96 @@
+<route lang="json">
+{ "style": { "navigationStyle": "custom" } }
+</route>
+<script setup lang="ts">
+import PageHelper from '@/components/page-helper.vue'
+import Card from '@/components/card.vue'
+
+import { useUserStore } from '../../../store'
+import { storeToRefs } from 'pinia'
+import dayjs from 'dayjs'
+import NavbarEvo from '@/components/navbar-evo.vue'
+import { NetImages } from '../../../core/libs/enums'
+import { getPointsFlow } from '../../../core/libs/agent-requests'
+import PageHelperEvo from '@/components/page-helper-evo.vue'
+import { getBroker } from '../../../core/libs/requests'
+
+const userStore = useUserStore()
+const { userInfo } = storeToRefs(userStore)
+
+const { data, run: setData } = useRequest(() =>
+  getBroker({ brokerId: String(userInfo.value.userId) }),
+)
+onMounted(async () => {
+  await setData()
+})
+</script>
+<template>
+  <div class="flex-grow">
+    <NavbarEvo title="任务积分" transparent dark></NavbarEvo>
+    <div class="relative aspect-[3/1]">
+      <div class="aspect-[1.25/1] absolute top-0 w-full">
+        <div class="relative w-full h-full">
+          <div class="absolute top-0 left-0 right-0">
+            <wd-img
+              width="100%"
+              :src="NetImages.DefaultPointsHeadBg"
+              mode="widthFix"
+              custom-class=""
+            ></wd-img>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="relative px-3.5">
+      <div class="flex items-end px-3.5 mb-5">
+        <div class="text-white text-sm font-normal font-['PingFang_SC'] leading-relaxed">
+          当前积分
+        </div>
+        <div>
+          <span class="text-white text-4xl font-normal font-['D-DIN_Exp'] leading-9">
+            {{ data.points }}
+          </span>
+        </div>
+        <div class="flex-1"></div>
+        <div></div>
+        <div class="text-[white] text-sm font-normal font-['PingFang_SC'] leading-relaxed">
+          2024
+        </div>
+      </div>
+      <Card custom-class="relative">
+        <PageHelperEvo :request="getPointsFlow" :query="{ brokerId: userInfo.userId, year: 2024 }">
+          <template #default="{ source }">
+            <div class="flex flex-col gap-4">
+              <template v-for="(it, i) in source?.list" :key="i">
+                <div class="flex items-center py-4">
+                  <div class="flex-1 flex flex-col">
+                    <div
+                      class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed"
+                    >
+                      {{ it.taskName }}
+                    </div>
+                    <div
+                      class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-relaxed"
+                    >
+                      {{ dayjs(it.createTime).format('YYYY/MM/DD HH:mm:ss') }}
+                    </div>
+                  </div>
+                  <div>
+                    <div
+                      class="text-lg font-normal font-['D-DIN_Exp'] leading-relaxed"
+                      :class="`${it.bizType === '1' ? 'text-[#ef4343]' : 'text-black'}`"
+                    >
+                      <!-- {{ { '1': '+', '2': '-' }[it.pointsType] }} -->
+                      {{ it.points }}
+                    </div>
+                  </div>
+                </div>
+                <div class="h-0.25 bg-[#dadada]" v-if="i !== (source?.list.length ?? 0) - 1"></div>
+              </template>
+            </div>
+          </template>
+        </PageHelperEvo>
+      </Card>
+    </div>
+  </div>
+</template>

+ 20 - 15
packages/merchant/src/pages/agent/tasks/index.vue

@@ -8,7 +8,7 @@
 </route>
 <script setup lang="ts">
 import Card from '@designer-hub/app/src/components/card.vue'
-import { getTaskList, taskReceive } from '../../../core/libs/requests'
+import { getBroker, getTaskList, taskReceive } from '../../../core/libs/requests'
 import { useUserStore } from '../../../store'
 import { storeToRefs } from 'pinia'
 import dayjs from 'dayjs'
@@ -16,10 +16,11 @@ import PageHelperEvo from '@/components/page-helper-evo.vue'
 import { getTasks } from '../../../core/libs/agent-requests'
 import { useTask } from '../../../composables/task'
 import { AgentTask } from '@designer-hub/app/src/core/libs/models'
+import { ComponentExposed } from 'vue-component-type-helpers'
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
 const { types } = useTask()
-const tasksList = ref([])
+const pageHelperRef = ref<ComponentExposed<typeof PageHelperEvo>>()
 const status = ref<any>({
   1: {
     title: '未开始',
@@ -34,42 +35,46 @@ const status = ref<any>({
 })
 const query = computed(() => ({ brokerId: userInfo.value.userId }))
 
+const { data, run: setData } = useRequest(() =>
+  getBroker({ brokerId: String(userInfo.value.userId) }),
+)
+
 // 状态(1-未开始,2-进行中,3-已撤回,4-已完成,5-未完成,6-待确认)
 const toDetail = async (item: AgentTask) => {
-  await uni.navigateTo({ url: `/pages/home/tasks/detail/index?taskId=${item.id}` })
+  await uni.navigateTo({ url: `/pages/agent/tasks/detail/index?taskId=${item.id}` })
 }
 const acceptingOrders = async (item: AgentTask) => {
   uni.showLoading()
-  const res = await taskReceive({ brokerId: userInfo.value.userId, taskId: item.id, orders: true })
+  await taskReceive({ brokerId: userInfo.value.userId, taskId: item.id, orders: true })
   uni.hideLoading()
-  initData()
+  pageHelperRef.value?.refresh()
 }
 const acceptingNoOrders = async (item: AgentTask) => {
   uni.showLoading()
-  const res = await taskReceive({ brokerId: userInfo.value.userId, taskId: item.id, orders: false })
+  await taskReceive({ brokerId: userInfo.value.userId, taskId: item.id, orders: false })
   uni.hideLoading()
-  initData()
+  pageHelperRef.value?.refresh()
 }
-
-const initData = async () => {
-  const res = await getTaskList({ brokerId: userInfo.value.userId })
-  tasksList.value = res.data
+const toPoints = async () => {
+  await uni.navigateTo({ url: '/pages/agent/points/index' })
 }
 onMounted(async () => {
-  initData()
+  await setData()
 })
 </script>
 <template>
-  <div class="bg-white rounded-lg shadow flex m-[18px] p-[11px]">
+  <div class="bg-white rounded-lg shadow flex m-[18px] p-[11px]" @click="toPoints">
     <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed">
       任务积分
     </div>
     <div class="flex-1"></div>
-    <div class="text-[#ff2e2e] text-[22px] font-medium font-['DIN'] leading-none">6153</div>
+    <div class="text-[#ff2e2e] text-[22px] font-medium font-['DIN'] leading-none">
+      {{ data.points }}
+    </div>
     <div class="w-6 h-6 relative"></div>
   </div>
 
-  <PageHelperEvo :request="getTasks" :query="query">
+  <PageHelperEvo ref="pageHelperRef" :request="getTasks" :query="query">
     <template #default="{ source }">
       <div class="flex-grow flex flex-col gap-4 p-4">
         <template v-for="item in source?.list" :key="item.id">

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

@@ -129,7 +129,7 @@ onShareAppMessage(() => ({}))
               <PageHelperEvo :request="getTodoPage" :query="todosQuery"></PageHelperEvo>
               <div
                 class="flex items-center justify-center b-t b-t-solid b-t-[#f6f6f6] pt-3.5"
-                @click="router.push('/pages/home/agent/todo/index')"
+                @click="router.push('/pages/agent/todo/index')"
               >
                 <div class="text-[#2357e9] text-xs font-normal font-['PingFang_SC'] leading-none">
                   全部待办

+ 1 - 0
packages/merchant/src/types/uni-pages.d.ts

@@ -9,6 +9,7 @@ interface NavigateToOptions {
        "/pages/mine/index" |
        "/pages/agent/designer/detail" |
        "/pages/agent/designer/index" |
+       "/pages/agent/points/index" |
        "/pages/agent/report-infos/index" |
        "/pages/agent/tasks/index" |
        "/pages/agent/todo/index" |