Przeglądaj źródła

feat: 修改源类型为数字,优化年份选择器的渲染逻辑,移除不必要的样式

EvilDragon 1 miesiąc temu
rodzic
commit
fa9a4a4db8

+ 1 - 1
packages/app/src/core/libs/models.ts

@@ -921,7 +921,7 @@ export interface AgentPoint {
   bizId: number
   bizType: string
   sourceId: number
-  sourceType: string
+  sourceType: number
   targetId: number
   taskName: string
   targetType: string

+ 7 - 16
packages/app/src/pages/mine/points/index.vue

@@ -50,9 +50,12 @@ const { userInfo } = storeToRefs(userStore)
         </div>
         <div class="flex-1"></div>
         <div></div>
-        <div class="text-[#b6b6b6] text-sm font-normal font-['PingFang_SC'] leading-relaxed pos-relative">
-			<wd-datetime-picker type="year" v-model="year" />
-        </div>
+        <wd-datetime-picker type="year" v-model="year" use-default-slot>
+          <div class="text-[white] text-sm font-normal font-['PingFang_SC'] leading-relaxed">
+            {{ dayjs(year).format('YYYY') }}
+            <wd-icon name="arrow-down" size="12" class="text-[#ffffff]"></wd-icon>
+          </div>
+        </wd-datetime-picker>
       </div>
       <Card custom-class="relative">
         <PageHelper :request="getPoints" :query="{ stylistId: userInfo.userId, year: dayjs(year).toDate().getFullYear() }">
@@ -93,16 +96,4 @@ const { userInfo } = storeToRefs(userStore)
     </div>
   </div>
 </template>
-<style lang="scss" scoped>
-	:deep(.wd-picker__cell){
-		background-color: rgba(0,0,0,0);
-		color: #fff;
-		padding: 0;
-	}
-	:deep(.wd-picker__value){
-		color: #fff ;
-	}
-	:deep(.wd-picker__arrow){
-		color: #fff;
-	}
-</style>
+<style lang="scss"></style>

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

@@ -13,7 +13,6 @@ 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'
-import PickerEvo from '@/components/picker-evo.vue'
 
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
@@ -91,9 +90,10 @@ onMounted(async () => {
                   <div>
                     <div
                       class="text-lg font-normal font-['D-DIN_Exp'] leading-relaxed"
-                      :class="`${it.bizType === '1' ? 'text-[#ef4343]' : 'text-black'}`"
+                      :class="`${it.sourceType !== 5 ? 'text-[#ef4343]' : 'text-black'}`"
                     >
                       <!-- {{ { '1': '+', '2': '-' }[it.pointsType] }} -->
+                      {{ it.sourceType === 5 ? '-' : '+' }}
                       {{ it.points }}
                     </div>
                   </div>