Browse Source

feat: 重构任务类型管理;新增代理任务类型,删除设计师任务类型;更新相关页面和组件以支持新功能

EvilDragon 1 month ago
parent
commit
8ab9f95c10

+ 6 - 0
packages/merchant/src/core/libs/messages.ts

@@ -1,4 +1,5 @@
 import { designer } from './pngs'
+import { setting } from './svgs'
 
 export const messages = {
   home: { shareTitle: '筑巢荟' },
@@ -12,6 +13,11 @@ export const messages = {
       spatialExpertiseTypeErrorText: '请选择擅长空间类型',
       attachmentErrorText: '请上传附件',
     },
+    setting: {
+      channelTypeTitleText: '渠道类型',
+      mobileTitleText: '手机号',
+      logoutMessageText: '确定要退出登录吗?',
+    },
   },
   objects: {
     designerBasiceInfo: {

+ 1 - 1
packages/merchant/src/layouts/tabbar.vue

@@ -111,7 +111,7 @@ onMounted(async () => {
 
 <template>
   <wd-config-provider :themeVars="defaultThemeVars" custom-class="flex-grow flex flex-col">
-    <view class="bg-[#f6f6f6] pb-20 flex-grow">
+    <view class="bg-[#F2F3F6] pb-20 flex-grow">
       <slot />
     </view>
 

+ 41 - 33
packages/merchant/src/pages.json

@@ -59,58 +59,66 @@
       }
     },
     {
-      "path": "pages/designer/detail",
+      "path": "pages/home/index",
       "type": "page",
+      "layout": "tabbar",
       "style": {
-        "navigationBarTitleText": "设计师详情",
+        "navigationBarTitleText": "首页",
         "navigationBarBackgroundColor": "#fff",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/designer/index",
+      "path": "pages/mine/index",
       "type": "page",
+      "layout": "tabbar",
       "style": {
-        "navigationBarTitleText": "全部设计师",
-        "navigationBarBackgroundColor": "#fff"
+        "navigationBarTitleText": "我的",
+        "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/home/index",
+      "path": "pages/agent/designer/detail",
       "type": "page",
-      "layout": "tabbar",
       "style": {
-        "navigationBarTitleText": "首页",
+        "navigationBarTitleText": "设计师详情",
         "navigationBarBackgroundColor": "#fff",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/mine/index",
+      "path": "pages/agent/designer/index",
       "type": "page",
-      "layout": "tabbar",
       "style": {
-        "navigationBarTitleText": "我的",
-        "navigationStyle": "custom"
+        "navigationBarTitleText": "全部设计师",
+        "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/designer/archives/index",
+      "path": "pages/agent/report-infos/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "个人信息",
-        "navigationBarBackgroundColor": "#ffffff"
+        "navigationBarTitleText": "关系报备",
+        "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/designer/points_details/index",
+      "path": "pages/agent/tasks/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "积分明细",
+        "navigationBarTitleText": "全部任务",
         "navigationBarBackgroundColor": "#fff"
       }
     },
     {
+      "path": "pages/agent/todo/index",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "待办",
+        "navigationBarBackgroundColor": "#f2f3f6"
+      }
+    },
+    {
       "path": "pages/home/merchant/add-reporting-information",
       "type": "page",
       "style": {
@@ -136,51 +144,51 @@
       }
     },
     {
-      "path": "pages/home/tasks/index",
+      "path": "pages/mine/merchant/merchant_settings",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "全部任务",
+        "navigationBarTitleText": "商家设置",
         "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/mine/merchant/merchant_settings",
+      "path": "pages/agent/designer/archives/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "商家设置",
-        "navigationBarBackgroundColor": "#fff"
+        "navigationBarTitleText": "个人信息",
+        "navigationBarBackgroundColor": "#ffffff"
       }
     },
     {
-      "path": "pages/designer/archives/basic-info/index",
+      "path": "pages/agent/designer/points_details/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "编辑基本信息",
-        "navigationBarBackgroundColor": "#ffffff"
+        "navigationBarTitleText": "积分明细",
+        "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/home/agent/report-infos/index",
+      "path": "pages/agent/tasks/detail/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "关系报备",
+        "navigationBarTitleText": "任务详情",
         "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/home/agent/todo/index",
+      "path": "pages/mine/agent/settings/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "待办",
-        "navigationBarBackgroundColor": "#f2f3f6"
+        "navigationBarTitleText": "个人设置",
+        "navigationBarBackgroundColor": "#fff"
       }
     },
     {
-      "path": "pages/home/tasks/detail/index",
+      "path": "pages/agent/designer/archives/basic-info/index",
       "type": "page",
       "style": {
-        "navigationBarTitleText": "任务详情",
-        "navigationBarBackgroundColor": "#fff"
+        "navigationBarTitleText": "编辑基本信息",
+        "navigationBarBackgroundColor": "#ffffff"
       }
     },
     {

+ 3 - 3
packages/merchant/src/pages/home/agent/components/task-card.vue → packages/merchant/src/pages/agent/components/task-card.vue

@@ -1,10 +1,10 @@
 <script setup lang="ts">
 import { storeToRefs } from 'pinia'
-import { taskReceive } from '../../../../core/libs/requests'
-import { useUserStore } from '../../../../store'
+import { taskReceive } from '../../../core/libs/requests'
+import { useUserStore } from '../../../store'
 import Card from '@designer-hub/app/src/components/card.vue'
 import dayjs from 'dayjs'
-import { useTask } from '../../../../composables/task'
+import { useTask } from '../../../composables/task'
 const props = withDefaults(defineProps<{ options: any }>(), { options: () => ({}) })
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)

+ 6 - 3
packages/merchant/src/pages/designer/archives/basic-info/index.vue → packages/merchant/src/pages/agent/designer/archives/basic-info/index.vue

@@ -7,11 +7,14 @@
 }
 </route>
 <script setup lang="ts">
-import { getDesignerBasicInfo, updateDesignerBasicInfo } from '../../../../core/libs/agent-requests'
-import { messages } from '../../../../core/libs/messages'
+import {
+  getDesignerBasicInfo,
+  updateDesignerBasicInfo,
+} from '../../../../../core/libs/agent-requests'
+import { messages } from '../../../../../core/libs/messages'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
 import DataForm from '@/components/data-form.vue'
-import { DataFormSchema } from '../../../../components/data-form'
+import { DataFormSchema } from '../../../../../components/data-form'
 import { DesignerBasicInfo } from '@designer-hub/app/src/core/libs/models'
 import { requestToast } from '@designer-hub/app/src/core/utils/common'
 import { omit } from 'radash'

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

@@ -12,14 +12,14 @@ import {
   getDesignerExtraEvents,
   getDesignerFamilyInfo,
   saveDesignerFamilyInfo,
-} from '../../../core/libs/agent-requests'
-import { messages } from '../../../core/libs/messages'
+} from '../../../../core/libs/agent-requests'
+import { messages } from '../../../../core/libs/messages'
 import { omit } from 'radash'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
-import { renders } from '../../../core/libs/renders'
+import { renders } from '../../../../core/libs/renders'
 import DataRender from '@/components/data-render.vue'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import { DataFormSchema } from '../../../components/data-form'
+import { DataFormSchema } from '../../../../components/data-form'
 import { DesignerFamilyInfo } from '@designer-hub/app/src/core/libs/models'
 import DataForm from '@/components/data-form.vue'
 import { requestToast } from '@designer-hub/app/src/core/utils/common'

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

@@ -7,7 +7,7 @@ style:
 
 <script setup lang="ts">
 import NavbarEvo from '@/components/navbar-evo.vue'
-import { getFollowUpPage, getUserInfoById } from '../../core/libs/agent-requests'
+import { getFollowUpPage, getUserInfoById } from '../../../core/libs/agent-requests'
 import {
   desinTopBg,
   rightArrowIcon,
@@ -20,7 +20,7 @@ import {
 } from '@designer-hub/assets/src/svgs'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
 import { dayjs } from 'wot-design-uni'
-import { toHomePage } from '../../core/libs/actions'
+import { toHomePage } from '../../../core/libs/actions'
 const id = ref()
 const { data, run: setData } = useRequest(() => getUserInfoById(id.value))
 const tab = ref('followUp')

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

@@ -11,17 +11,17 @@
 import Card from '@/components/card.vue'
 import DataForm from '@/components/data-form.vue'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import { focusOrCancel, getDesigners } from '../../core/libs/agent-requests'
+import { focusOrCancel, getDesigners } from '../../../core/libs/agent-requests'
 import { vipIcon, rightArrowIcon, filterIcon } from '@designer-hub/assets/src/svgs'
-import { toHomePage } from '../../core/libs/actions'
+import { toHomePage } from '../../../core/libs/actions'
 import { Designer } from '@designer-hub/app/src/core/libs/models'
 import { requestToast } from '@designer-hub/app/src/core/utils/common'
 import { ComponentExposed } from 'vue-component-type-helpers'
-import { useFollowUp } from '../../composables/followUp'
+import { useFollowUp } from '../../../composables/followUp'
 import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
-import { useMemberLevelsStore } from '../../store/member-levles'
+import { useMemberLevelsStore } from '../../../store/member-levles'
 import { storeToRefs } from 'pinia'
-import { useUserStore } from '../../store'
+import { useUserStore } from '../../../store'
 
 const userStore = useUserStore()
 const { userInfo, isAgent, isMerchant } = storeToRefs(userStore)

+ 0 - 0
packages/merchant/src/pages/designer/points_details/index.vue → packages/merchant/src/pages/agent/designer/points_details/index.vue


+ 2 - 2
packages/merchant/src/pages/home/agent/report-infos/index.vue → packages/merchant/src/pages/agent/report-infos/index.vue

@@ -4,8 +4,8 @@
 <script setup lang="ts">
 import BottomAppBar from '@/components/bottom-app-bar.vue'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import { deleteReportInfo, getReportInfoPage } from '../../../../core/libs/agent-requests'
-import { ReportInfoReviewStatus } from '../../../../core/libs/enums'
+import { deleteReportInfo, getReportInfoPage } from '../../../core/libs/agent-requests'
+import { ReportInfoReviewStatus } from '../../../core/libs/enums'
 import Card from '@designer-hub/app/src/components/card.vue'
 import dayjs from 'dayjs'
 import { ReportInfo } from '@designer-hub/app/src/core/libs/models'

+ 0 - 0
packages/merchant/src/pages/home/tasks/detail/index.vue → packages/merchant/src/pages/agent/tasks/detail/index.vue


+ 0 - 0
packages/merchant/src/pages/home/tasks/index.vue → packages/merchant/src/pages/agent/tasks/index.vue


+ 0 - 0
packages/merchant/src/pages/home/tasks/types.ts → packages/merchant/src/pages/agent/tasks/types.ts


+ 3 - 3
packages/merchant/src/pages/home/agent/todo/index.vue → packages/merchant/src/pages/agent/todo/index.vue

@@ -3,8 +3,8 @@
 </route>
 <script setup lang="ts">
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import { createTodo, deleteTodo, getTodos, updateTodo } from '../../../../core/libs/requests'
-import { useUserStore } from '../../../../store'
+import { createTodo, deleteTodo, getTodos, updateTodo } from '../../../core/libs/requests'
+import { useUserStore } from '../../../store'
 import { storeToRefs } from 'pinia'
 import dayjs from 'dayjs'
 import DataForm from '@/components/data-form.vue'
@@ -12,7 +12,7 @@ import { requestToast } from '@designer-hub/app/src/core/utils/common'
 import SectionHeading from '@/components/section-heading.vue'
 import { Todo } from '@designer-hub/app/src/core/libs/models'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
-import { DataFormSchema } from '../../../../components/data-form'
+import { DataFormSchema } from '../../../components/data-form'
 
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)

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

@@ -27,7 +27,7 @@ import { qrCodeString2Object, requestToast } from '@designer-hub/app/src/core/ut
 import { QrCodeBusinessType } from '../../core/libs/enums'
 import { useRouter } from '../../composables/router'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import TaskCard from './agent/components/task-card.vue'
+import TaskCard from '../agent/components/task-card.vue'
 import { getTasks } from '../../core/libs/agent-requests'
 
 defineOptions({

+ 97 - 0
packages/merchant/src/pages/mine/agent/settings/index.vue

@@ -0,0 +1,97 @@
+<route lang="json">
+{
+  "style": {
+    "navigationBarTitleText": "个人设置",
+    "navigationBarBackgroundColor": "#fff"
+  }
+}
+</route>
+<script lang="ts" setup>
+import { useUserStore } from '../../../../store'
+import { storeToRefs } from 'pinia'
+
+import { rightArrowIcon } from '@designer-hub/assets/src/svgs'
+import { getBroker, getVendorAppInfo } from '../../../../core/libs/requests'
+import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
+import { messages } from '../../../../core/libs/messages'
+import { useMessage } from 'wot-design-uni'
+const userStore = useUserStore()
+// cons useMessage()
+const { isLogined, userInfo } = storeToRefs(userStore)
+const { data, run: setData } = useRequest(() =>
+  getBroker({ brokerId: userInfo.value.userId.toString() }),
+)
+const logout = () => {
+  uni.showModal({
+    title: messages.mine.setting.logoutMessageText,
+    success: function (res) {
+      if (res.confirm) {
+        userStore.clearUserInfo()
+        uni.reLaunch({ url: '/pages/login/index' })
+      }
+    },
+  })
+}
+onMounted(async () => {
+  await setData()
+})
+</script>
+
+<template>
+  <view class="bg-white p-[16px] flex-grow flex flex-col">
+    <div class="flex-1">
+      <div class="flex justify-between items-center mb-[30px]">
+        <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none">头像</div>
+        <wd-img width="28" height="28" round custom-class="" :src="data?.headImgUrl" />
+      </div>
+      <div class="flex justify-between items-center mb-[30px]">
+        <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none">名称</div>
+        <div
+          class="text-right text-[#999999] text-sm font-normal font-['PingFang_SC'] leading-none"
+        >
+          {{ data?.brokerName }}
+        </div>
+      </div>
+      <div class="flex justify-between items-center mb-[30px]">
+        <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none">ID</div>
+        <div
+          class="text-right text-[#999999] text-sm font-normal font-['PingFang_SC'] leading-none"
+        >
+          {{ data?.id }}
+        </div>
+      </div>
+      <div class="flex justify-between items-center mb-[30px]">
+        <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none">
+          {{ messages.mine.setting.channelTypeTitleText }}
+        </div>
+        <div
+          class="text-right text-[#999999] text-sm font-normal font-['PingFang_SC'] leading-none"
+        >
+          {{ data?.channelType }}
+        </div>
+      </div>
+      <div class="flex justify-between items-center mb-[30px]">
+        <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-none">
+          {{ messages.mine.setting.mobileTitleText }}
+        </div>
+        <div
+          class="text-right text-[#999999] text-sm font-normal font-['PingFang_SC'] leading-none"
+        >
+          {{ data?.mobile }}
+        </div>
+      </div>
+      <SectionHeading title="修改密码" size="sm" end-arrow></SectionHeading>
+    </div>
+    <div class="w-full mt-[50px]">
+      <wd-button block :round="false" @click="logout">
+        <div
+          class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
+        >
+          退出登录
+        </div>
+      </wd-button>
+    </div>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 208 - 0
packages/merchant/src/pages/mine/components/agent-mine.vue

@@ -0,0 +1,208 @@
+<script setup lang="ts">
+import {
+  getBroker,
+  getDesignerStatistics,
+  getFollowStatistics,
+  getYearTarget,
+} from '../../../core/libs/requests'
+import { NetImages } from '../../../core/libs/net-images'
+import store, { useUserStore } from '../../../store'
+import { storeToRefs } from 'pinia'
+import qrCode from '@designer-hub/assets/src/libs/assets/qrCode'
+import Card from '@designer-hub/app/src/components/card.vue'
+
+const userStore = useUserStore()
+const { userInfo } = storeToRefs(userStore)
+const { data: agent, run: setAgent } = useRequest(() =>
+  getBroker({ brokerId: userInfo.value.userId.toString() }),
+)
+const { data: yearTarget, run: setYearTarget } = useRequest(() => getYearTarget())
+const { data: designerData, run: setdesignerData } = useRequest(() => getDesignerStatistics())
+const { data: followData, run: setFollowData } = useRequest(() => getFollowStatistics())
+const toSettings = () => {
+  uni.navigateTo({ url: '/pages/mine/agent/settings/index' })
+}
+onMounted(async () => {
+  await setAgent()
+  await Promise.all([setYearTarget(), setdesignerData(), setFollowData()])
+})
+</script>
+<template>
+  <div>
+    <div class="aspect-[0.96/1] absolute left-0 right-0 top--1">
+      <wd-img
+        width="100%"
+        height="100%"
+        :src="NetImages.AgentMineHeaderBg"
+        custom-class="vertical-bottom"
+      ></wd-img>
+    </div>
+    <!-- <wd-navbar
+      fixed
+      safeAreaInsetTop
+      custom-class="bg-transparent!"
+      :bordered="false"
+      placeholder
+      v-bind="navBarProps"
+    ></wd-navbar> -->
+    <div class="p-4 flex flex-col gap-4 relative">
+      <div class="flex items-center px-4 mb-4" @click="toSettings">
+        <wd-img
+          round
+          width="56"
+          height="56"
+          custom-class="border border-solid border-white"
+          :src="agent.headImgUrl"
+        />
+        <div class="mx-4 flex-1">
+          <div class="text-white text-lg font-normal font-['PingFang_SC'] leading-normal">
+            {{ agent.brokerName }}
+          </div>
+          <div class="text-white text-xs font-normal font-['PingFang_SC'] leading-relaxed">
+            ID:{{ agent.inviteCode }}
+          </div>
+        </div>
+        <div>
+          <div class="w-[29px] h-[29px] relative">
+            <wd-img width="28" height="28" :src="qrCode"></wd-img>
+          </div>
+          <div class="text-white text-[10px] font-normal font-['PingFang_SC'] leading-relaxed">
+            邀请码
+          </div>
+        </div>
+      </div>
+      <Card>
+        <SectionHeading title="本年目标" size="base"></SectionHeading>
+        <div class="flex flex-col gap-2.5 mt-3">
+          <template v-for="(it, i) in yearTarget" :key="i">
+            <div
+              class="bg-gradient-to-r from-[#fef3ee] to-[#f0f4f9] rounded-lg flex items-center p-4 gap-6"
+            >
+              <div>
+                <div class="w-[45px] h-[45px] rounded-full border-4 border-[#ffe2d0]">
+                  <div style="width: 50px; height: 50px">
+                    <wd-circle
+                      :model-value="
+                        it.thisYearComplete && it.target
+                          ? (Number(it.thisYearComplete) / Number(it.target)) * 100
+                          : 0
+                      "
+                      :size="50"
+                      :color="['#FF7742', '#FFAA42', '#4271FF', '#C131FF'][i]"
+                      :clockwise="false"
+                    >
+                      <div class="flex flex-col items-center">
+                        <div
+                          class="w-[29.20px] h-[18.39px] text-black text-sm font-medium font-['DIN']"
+                        >
+                          {{
+                            it.thisYearComplete && it.target
+                              ? (Number(it.thisYearComplete) / Number(it.target)) * 100
+                              : 0
+                          }}%
+                        </div>
+                        <div
+                          class="w-[22.71px] h-[10.82px] text-black/60 text-[7px] font-normal font-['PingFang_SC']"
+                        >
+                          达成率
+                        </div>
+                      </div>
+                    </wd-circle>
+                  </div>
+                </div>
+              </div>
+              <div class="flex-1">
+                <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">
+                  {{ it.typeName }}
+                </div>
+                <div class="flex items-center gap-1">
+                  <div class="text-black/90 text-lg font-medium font-['DIN'] leading-normal">
+                    <!-- 6000 -->
+                    {{ it.target / 10000 }}
+                  </div>
+                  <div class="text-black text-xs font-normal font-['PingFang_SC']">万</div>
+                </div>
+                <div class="flex items-center gap-1">
+                  <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">差值</div>
+                  <div class="text-[#ff2d2d] text-xs font-medium font-['DIN'] leading-normal">
+                    <!-- 3000 -->
+                    {{ (it.target - it.thisYearComplete) / 10000 }}
+                  </div>
+                  <div class="text-[#ff2d2d] text-[10px] font-medium font-['DIN'] leading-normal">
+                    万
+                  </div>
+                </div>
+              </div>
+              <div class="">
+                <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">当年完成</div>
+                <div class="flex items-center gap-1">
+                  <div class="text-black/90 text-lg font-medium font-['DIN'] leading-normal">
+                    <!-- 6000 -->
+                    {{ it.thisYearComplete / 10000 }}
+                  </div>
+                  <div class="text-black text-xs font-normal font-['PingFang_SC']">万</div>
+                </div>
+                <div class="flex items-center gap-1">
+                  <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">本月</div>
+                  <div class="text-[#0FC187] text-xs font-medium font-['DIN'] leading-normal">
+                    <!-- 3000 -->
+                    {{ it.thisMonthComplete / 10000 }}
+                  </div>
+                  <div class="text-[#0FC187] text-[10px] font-medium font-['DIN'] leading-normal">
+                    万
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+        </div>
+      </Card>
+      <Card>
+        <SectionHeading title="设计师数据" size="base"></SectionHeading>
+        <div class="mt-3 grid grid-cols-3 gap-2.5">
+          <template v-for="(it, i) in designerData" :key="i">
+            <div class="bg-[#f6f7ff] rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
+              <div class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none">
+                {{ it.typeName }}
+              </div>
+              <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
+                {{ it.quantity }}
+              </div>
+              <div class="flex items-center gap-1">
+                <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none">
+                  年新增
+                </div>
+                <div class="text-[#ff2d2d] text-xs font-normal font-['D-DIN Exp'] leading-normal">
+                  20
+                </div>
+              </div>
+            </div>
+          </template>
+        </div>
+      </Card>
+      <Card>
+        <SectionHeading title="跟进数据" size="base"></SectionHeading>
+        <div class="mt-3 grid grid-cols-3 gap-2.5">
+          <template v-for="(it, i) in followData" :key="i">
+            <div class="bg-[#f6f7ff] rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
+              <div class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none">
+                {{ it.typeName }}
+              </div>
+              <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
+                {{ it.quantity }}
+              </div>
+              <div class="flex items-center gap-1">
+                <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none">
+                  年新增
+                </div>
+                <div class="text-[#ff2d2d] text-xs font-normal font-['D-DIN Exp'] leading-normal">
+                  20
+                </div>
+              </div>
+            </div>
+          </template>
+        </div>
+      </Card>
+    </div>
+  </div>
+</template>

+ 3 - 145
packages/merchant/src/pages/mine/index.vue

@@ -16,14 +16,12 @@ import {
 import { storeToRefs } from 'pinia'
 import { isEmpty } from 'radash'
 import Card from '@designer-hub/app/src/components/card.vue'
-import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
-import { merchantPageHeaderBg, desinTopBg } from '@designer-hub/assets/src/svgs'
+import { desinTopBg } from '@designer-hub/assets/src/svgs'
 import NavBarEvo from '@designer-hub/app/src/components/navbar-evo.vue'
 import dayjs from 'dayjs'
 import PageHelper from '../../components/page-helper.vue'
-import { NetImages } from '../../core/libs/net-images'
 import { useUserStore } from '../../store'
-import qrCode from '@designer-hub/assets/src/libs/assets/qrCode'
+import AgentMine from './components/agent-mine.vue'
 
 const userStore = useUserStore()
 const { isLogined, userInfo, isMerchant, isAgent } = storeToRefs(userStore)
@@ -75,147 +73,7 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
   <view>
     <NavBarEvo title="我的" transparent dark placeholder></NavBarEvo>
     <template v-if="isAgent">
-      <div class="aspect-[0.96/1] absolute left-0 right-0 top--1">
-        <wd-img
-          width="100%"
-          height="100%"
-          :src="NetImages.AgentMineHeaderBg"
-          custom-class="vertical-bottom"
-        ></wd-img>
-      </div>
-      <wd-navbar
-        fixed
-        safeAreaInsetTop
-        custom-class="bg-transparent!"
-        :bordered="false"
-        placeholder
-        v-bind="navBarProps"
-      ></wd-navbar>
-      <div class="p-4 flex flex-col gap-4 relative">
-        <div class="flex items-center px-4 mb-4">
-          <img class="w-14 h-14 rounded-full border border-white" :src="agent.headImgUrl" />
-          <div class="mx-4 flex-1">
-            <div class="text-white text-lg font-normal font-['PingFang_SC'] leading-normal">
-              {{ agent.brokerName }}
-            </div>
-            <div class="text-white text-xs font-normal font-['PingFang_SC'] leading-relaxed">
-              ID:{{ agent.inviteCode }}
-            </div>
-          </div>
-          <div>
-            <div class="w-[29px] h-[29px] relative">
-              <wd-img width="28" height="28" :src="qrCode"></wd-img>
-            </div>
-            <div class="text-white text-[10px] font-normal font-['PingFang_SC'] leading-relaxed">
-              邀请码
-            </div>
-          </div>
-        </div>
-        <Card>
-          <SectionHeading title="本年目标" size="base"></SectionHeading>
-          <div class="flex flex-col gap-2.5 mt-3">
-            <template v-for="(it, i) in yearTarget" :key="i">
-              <div
-                class="bg-gradient-to-r from-[#fef3ee] to-[#f0f4f9] rounded-lg flex items-center p-4 gap-6"
-              >
-                <div>
-                  <div
-                    class="w-[45px] h-[45px] rounded-full border-4 border-[#ffe2d0] bg-red"
-                  ></div>
-                </div>
-                <div class="flex-1">
-                  <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">
-                    {{ it.typeName }}
-                  </div>
-                  <div class="flex items-center gap-1">
-                    <div class="text-black/90 text-lg font-medium font-['DIN'] leading-normal">
-                      <!-- 6000 -->
-                      {{ it.target / 10000 }}
-                    </div>
-                    <div class="text-black text-xs font-normal font-['PingFang_SC']">万</div>
-                  </div>
-                  <div class="flex items-center gap-1">
-                    <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">差值</div>
-                    <div class="text-[#ff2d2d] text-xs font-medium font-['DIN'] leading-normal">
-                      <!-- 3000 -->
-                      {{ (it.target - it.thisYearComplete) / 10000 }}
-                    </div>
-                    <div class="text-[#ff2d2d] text-[10px] font-medium font-['DIN'] leading-normal">
-                      万
-                    </div>
-                  </div>
-                </div>
-                <div class="">
-                  <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">当年完成</div>
-                  <div class="flex items-center gap-1">
-                    <div class="text-black/90 text-lg font-medium font-['DIN'] leading-normal">
-                      <!-- 6000 -->
-                      {{ it.thisYearComplete / 10000 }}
-                    </div>
-                    <div class="text-black text-xs font-normal font-['PingFang_SC']">万</div>
-                  </div>
-                  <div class="flex items-center gap-1">
-                    <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">本月</div>
-                    <div class="text-[#0FC187] text-xs font-medium font-['DIN'] leading-normal">
-                      <!-- 3000 -->
-                      {{ it.thisMonthComplete / 10000 }}
-                    </div>
-                    <div class="text-[#0FC187] text-[10px] font-medium font-['DIN'] leading-normal">
-                      万
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </template>
-          </div>
-        </Card>
-        <Card>
-          <SectionHeading title="设计师数据" size="base"></SectionHeading>
-          <div class="mt-3 grid grid-cols-3 gap-2.5">
-            <template v-for="(it, i) in designerData" :key="i">
-              <div class="bg-[#f6f7ff] rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
-                <div class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none">
-                  {{ it.typeName }}
-                </div>
-                <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
-                  {{ it.quantity }}
-                </div>
-                <div class="flex items-center gap-1">
-                  <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none">
-                    年新增
-                  </div>
-                  <div class="text-[#ff2d2d] text-xs font-normal font-['D-DIN Exp'] leading-normal">
-                    20
-                  </div>
-                </div>
-              </div>
-            </template>
-          </div>
-        </Card>
-        <Card>
-          <SectionHeading title="跟进数据" size="base"></SectionHeading>
-          <div class="mt-3 grid grid-cols-3 gap-2.5">
-            <template v-for="(it, i) in followData" :key="i">
-              <div class="bg-[#f6f7ff] rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
-                <div class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none">
-                  {{ it.typeName }}
-                </div>
-                <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
-                  {{ it.quantity }}
-                </div>
-                <div class="flex items-center gap-1">
-                  <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none">
-                    年新增
-                  </div>
-                  <div class="text-[#ff2d2d] text-xs font-normal font-['D-DIN Exp'] leading-normal">
-                    20
-                  </div>
-                </div>
-              </div>
-            </template>
-          </div>
-        </Card>
-      </div>
+      <AgentMine></AgentMine>
     </template>
     <template v-if="isMerchant">
       <view class="p-[16px]">

+ 10 - 9
packages/merchant/src/types/uni-pages.d.ts

@@ -5,21 +5,22 @@
 
 interface NavigateToOptions {
   url: "/pages/login/index" |
-       "/pages/designer/detail" |
-       "/pages/designer/index" |
        "/pages/home/index" |
        "/pages/mine/index" |
-       "/pages/designer/archives/index" |
-       "/pages/designer/points_details/index" |
+       "/pages/agent/designer/detail" |
+       "/pages/agent/designer/index" |
+       "/pages/agent/report-infos/index" |
+       "/pages/agent/tasks/index" |
+       "/pages/agent/todo/index" |
        "/pages/home/merchant/add-reporting-information" |
        "/pages/home/merchant/mine" |
        "/pages/home/merchant/settlement" |
-       "/pages/home/tasks/index" |
        "/pages/mine/merchant/merchant_settings" |
-       "/pages/designer/archives/basic-info/index" |
-       "/pages/home/agent/report-infos/index" |
-       "/pages/home/agent/todo/index" |
-       "/pages/home/tasks/detail/index" |
+       "/pages/agent/designer/archives/index" |
+       "/pages/agent/designer/points_details/index" |
+       "/pages/agent/tasks/detail/index" |
+       "/pages/mine/agent/settings/index" |
+       "/pages/agent/designer/archives/basic-info/index" |
        "/pages/mine/merchant/orders/detail/index";
 }
 interface RedirectToOptions extends NavigateToOptions {}