Browse Source

12/22 update code

任重 2 months ago
parent
commit
b7b0186d2f

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

@@ -47,6 +47,7 @@ export const getUserInfoById = (id: string | number) =>
       levelName: string
       groupName: string
       experience: number
+      retryStatus?: number
     }>
   >('/app-api/member/user/getByUserId', { id })
 /**

+ 4 - 3
packages/merchant/src/core/libs/requests.ts

@@ -4,9 +4,10 @@ import {
   ResPageData,
   Todo,
   Agent,
-  AgentTask, DictType,
+  AgentTask,
+  DictType,
 } from '@designer-hub/app/src/core/libs/models'
-import {AgreementType} from "@/core/libs/enums";
+import { AgreementType } from '@/core/libs/enums'
 
 export const httpGetMock = <T>(data: T) =>
   new Promise<IResData<T>>((resolve) => resolve({ code: 1, msg: '', data } as IResData<T>))
@@ -228,7 +229,7 @@ export interface UpdatePasswordData {
  * 修改密码
  */
 export const updatePassword = (data: UpdatePasswordData) =>
-  httpPut('/app-api/member/auth/update-password', data)
+  httpPost('/app-api/member/user/updatePassword2', data)
 export const fakeThis = (query: { agreement: AgreementType }) =>
   httpGet<string>('/app-api/infra/file/download', query)
 export const getByDictType = (

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

@@ -30,6 +30,7 @@ import PageHelperEvo from '@/components/page-helper-evo.vue'
 import { dayjs } from 'wot-design-uni'
 import { toHomePage } from '@/core/libs/actions'
 import arcBottomBlue from '@designer-hub/assets/src/libs/assets/arcBottomBlue'
+import link from '@designer-hub/assets/src/libs/assets/link'
 import { useMemberLevelsStore } from '@/store/member-levles'
 import { getDesignerPointsActivities } from '@/core/libs/requests'
 import { useUserStore } from '@/store'
@@ -58,6 +59,7 @@ const followUpQuery = computed(() => ({
 const { data: browseRecordCount, run: setBrowseRecordCount } = useRequest(() =>
   getBrowseRecordCount(id.value),
 )
+console.log('browseRecordCount data', data)
 const browseRecordCountItems = computed(() => [
   {
     title: '打开次数',
@@ -144,8 +146,11 @@ onLoad(async (query) => {
     </div>
     <div class="p-4 flex flex-col gap-4 relative">
       <div class="bg-white rounded-2xl shadow flex items-center p-4">
-        <div>
+        <div class="relative">
           <wd-img width="64" height="64" round :src="data?.avatar"></wd-img>
+          <div v-if="data?.retryStatus" class="absolute right-0 bottom--1">
+            <wd-img width="14" height="14" :src="link" round custom-class="bg-[#ff9a9a]"></wd-img>
+          </div>
         </div>
         <div class="flex-1 ml-[11px]">
           <div class="flex flex-col w-[100%]">

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

@@ -35,7 +35,7 @@ onMounted(async () => {
 </script>
 <template>
   <div class="flex-grow">
-    <NavbarEvo title="任务积分" transparent dark></NavbarEvo>
+    <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">
@@ -79,7 +79,7 @@ onMounted(async () => {
                     <div
                       class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed"
                     >
-                      {{ it.taskName }}
+                      {{ it.taskName || it.name }}
                     </div>
                     <div
                       class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-relaxed"
@@ -90,10 +90,10 @@ onMounted(async () => {
                   <div>
                     <div
                       class="text-lg font-normal font-['D-DIN_Exp'] leading-relaxed"
-                      :class="`${it.sourceType !== 5 ? 'text-[#ef4343]' : 'text-black'}`"
+                      :class="`${it.pointsPm === '+' ? 'text-[#ef4343]' : 'text-black'}`"
                     >
                       <!-- {{ { '1': '+', '2': '-' }[it.pointsType] }} -->
-                      {{ it.sourceType === 5 ? '-' : '+' }}
+                      {{ it.pointsPm }}
                       {{ it.points }}
                     </div>
                   </div>

+ 13 - 3
packages/merchant/src/pages/agent/tasks/detail/index.vue

@@ -158,9 +158,13 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
               :clockwise="false"
             >
               <div class="flex flex-col items-center">
-                <div class="w-[29.20px] h-[18.39px] text-black text-sm font-medium font-['D-DIN-PRO']">
+                <div
+                  class="w-[29.20px] h-[18.39px] text-black text-sm font-medium font-['D-DIN-PRO']"
+                >
                   {{
-                    ((taskDetails?.completedNum ?? 0) / (taskDetails?.storeQuantity ?? 0)) * 100
+                    parseInt(
+                      ((taskDetails?.completedNum ?? 0) / (taskDetails?.storeQuantity ?? 0)) * 100,
+                    )
                   }}%
                 </div>
                 <div
@@ -389,7 +393,13 @@ onLoad(async (query?: Record<string | 'taskId', string>) => {
         </div>
       </BottomAppBar>
     </template>
-    <template v-if="!taskDetails?.receive && String(taskDetails?.finalType) === '2' && ['2', '6'].includes(String(taskDetails.status))">
+    <template
+      v-if="
+        !taskDetails?.receive &&
+        String(taskDetails?.finalType) === '2' &&
+        ['2', '6'].includes(String(taskDetails.status))
+      "
+    >
       <BottomAppBar fixed placeholder>
         <div class="px-5 py-3 bg-[#2357e9] rounded-md justify-center items-center gap-1">
           <div

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

@@ -55,7 +55,7 @@ onMounted(async () => {
       <Card custom-class="mx-4">
         <div class="w-full flex items-center">
           <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-['D-DIN-PRO'] leading-none">