|
@@ -6,7 +6,9 @@ import { useRouter } from '../../../../core/utils/router'
|
|
|
import { map } from '@designer-hub/assets/src/assets/svgs'
|
|
|
import { NetImages } from '../../../../core/libs/net-images'
|
|
|
import ActivityCountDown from '../../components/activity-count-down.vue'
|
|
|
-import { getActivityStatusButtonText, getActivityStatusText } from '../../../../core/utils/common'
|
|
|
+import { useActivity } from '../../../../composables/activity'
|
|
|
+import ButtonEvo from '@/components/button-evo.vue'
|
|
|
+import { omit } from 'radash'
|
|
|
|
|
|
const props = defineProps<{
|
|
|
customClass?: string
|
|
@@ -14,6 +16,8 @@ const props = defineProps<{
|
|
|
}>()
|
|
|
|
|
|
const router = useRouter()
|
|
|
+const { getActivityStatusButtonText, getActivityStatusText, getActivityStatus, status } =
|
|
|
+ useActivity(omit(props.options, ['levelsByMemberLevel', 'index']))
|
|
|
const toDetail = () => {
|
|
|
router.push(`/pages/home/activity/detail/index?id=${props.options?.id}&type=studyTour`)
|
|
|
}
|
|
@@ -34,12 +38,7 @@ const toDetail = () => {
|
|
|
<div class="flex-1"></div>
|
|
|
<div class="bg-[#f3f3f3] rounded-[20px] backdrop-blur-[15px] px-4 py-1.5">
|
|
|
<div class="text-black/40 text-sm font-normal font-['PingFang_SC']">
|
|
|
- {{
|
|
|
- getActivityStatusText(
|
|
|
- options?.applyStartTime || options?.planApplyStartTime,
|
|
|
- options?.applyEndTime || options?.planApplyEndTime,
|
|
|
- )
|
|
|
- }}
|
|
|
+ {{ getActivityStatusText() }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -78,21 +77,17 @@ const toDetail = () => {
|
|
|
</div>
|
|
|
<div></div>
|
|
|
</div>
|
|
|
- <div class="flex justify-between">
|
|
|
+ <div class="flex items-center justify-between">
|
|
|
<ActivityCountDown
|
|
|
:start-at="options?.applyStartTime || options?.planApplyStartTime"
|
|
|
:end-at="options?.applyEndTime || options?.planApplyEndTime"
|
|
|
></ActivityCountDown>
|
|
|
- <tilted-button>
|
|
|
- {{
|
|
|
- options?.ifSingnUp
|
|
|
- ? '已报名'
|
|
|
- : getActivityStatusButtonText(
|
|
|
- options?.applyStartTime || options?.planStudyStartTime,
|
|
|
- options?.applyEndTime || options?.planStudyEndTime,
|
|
|
- )
|
|
|
- }}
|
|
|
- </tilted-button>
|
|
|
+ <div @tap.stop="status === 'running' && toDetail()">
|
|
|
+ <!-- {{ status !== 'running' }} -->
|
|
|
+ <ButtonEvo size="md" :disabled="status !== 'running'">
|
|
|
+ {{ options?.ifSingnUp ? '已报名' : getActivityStatusButtonText() }}
|
|
|
+ </ButtonEvo>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="flex justify-between border-t-solid border-t-[#f2f2f2] border-t-1 py-4">
|
|
|
<div></div>
|