index.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationStyle": "custom"
  5. }
  6. }
  7. </route>
  8. <script setup lang="ts">
  9. import NavbarEvo from '@/components/navbar-evo.vue'
  10. import { activitySignup, getActivity, getActivitySignups } from '../../../../core/libs/requests'
  11. import { bell, map, rightFill } from '@designer-hub/assets/src/assets/svgs'
  12. import TiltedButton from '@/components/tilted-button.vue'
  13. import dayjs from 'dayjs'
  14. import BottomAppBar from '@/components/bottom-app-bar.vue'
  15. import { useRouter } from '../../../../core/utils/router'
  16. import PageHelper from '@/components/page-helper.vue'
  17. const router = useRouter()
  18. const id = ref()
  19. const { data, run: setData } = useRequest(() => getActivity(id.value))
  20. const show = ref(false)
  21. const successShow = ref(false)
  22. const listShow = ref(false)
  23. const handleConfirm = async () => {
  24. const { data, code, msg } = await activitySignup({ id: id.value })
  25. console.log(msg)
  26. if (code === 0) {
  27. // todo: 报名成功弹框
  28. show.value = false
  29. successShow.value = true
  30. }
  31. }
  32. onLoad(async (query: { id: string }) => {
  33. id.value = query.id
  34. await setData()
  35. console.log(data.value)
  36. })
  37. </script>
  38. <template>
  39. <div class="flex-grow bg-[#36200f] px-3.5">
  40. <NavbarEvo transparent dark></NavbarEvo>
  41. <div class="aspect-[1.26/1] relative">
  42. <wd-img width="100%" height="100%" src=""></wd-img>
  43. <div
  44. class="absolute bottom-3 bg-white/20 rounded-[20px] backdrop-blur-[6px] px-3.5 py-1 flex gap-2.5"
  45. @click="listShow = true"
  46. >
  47. <wd-img width="20" height="20" :src="bell"></wd-img>
  48. <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
  49. 白金会员王凯峰已报名
  50. </div>
  51. <div class="w-6 bg-black aspect-square rounded-full flex items-center justify-center">
  52. <wd-img width="18" height="18" :src="rightFill"></wd-img>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="flex">
  57. <wd-img width="18" height="18" :src="map"></wd-img>
  58. <div class="text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal">
  59. 第一站
  60. </div>
  61. </div>
  62. <div class="w-[347px] text-white text-[26px] font-normal font-['PingFang SC'] leading-[44px]">
  63. <!-- 日本研学·东京艺术大学设计游学 -->
  64. {{ data?.name }}
  65. <div class="inline-block py-1.5 px-4 bg-white rounded-[20px] backdrop-blur-[15px]">
  66. <div
  67. class="w-[42px] h-[21px] text-[#a60707] text-sm font-normal font-['PingFang SC'] leading-relaxed"
  68. >
  69. 报名中
  70. </div>
  71. </div>
  72. </div>
  73. <div class="px-4 py-6 bg-[#29170b] rounded-2xl my-8">
  74. <div class="flex items-center">
  75. <wd-img width="16" height="16"></wd-img>
  76. <div
  77. class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
  78. >
  79. 报名时间
  80. </div>
  81. <div class="w-4"></div>
  82. <div
  83. class="flex items-center text-white text-base font-normal font-['PingFang SC'] leading-[34px]"
  84. >
  85. {{ dayjs(data.applyStartTime).format('YYYY.MM.DD') }}
  86. <wd-icon name="play" size="22px"></wd-icon>
  87. {{ dayjs(data.applyEndTime).format('YYYY.MM.DD') }}
  88. </div>
  89. </div>
  90. <div class="flex items-center">
  91. <wd-img width="16" height="16"></wd-img>
  92. <div
  93. class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
  94. >
  95. 游学时间
  96. </div>
  97. <div class="w-4"></div>
  98. <div
  99. class="flex items-center text-white text-base font-normal font-['PingFang SC'] leading-[34px]"
  100. >
  101. <!-- 2024.12.15 2025.01.15 -->
  102. {{ dayjs(data.activityStartTime).format('YYYY.MM.DD') }}
  103. <wd-icon name="play" size="22px"></wd-icon>
  104. {{ dayjs(data.activityEndTime).format('YYYY.MM.DD') }}
  105. </div>
  106. </div>
  107. <div class="flex items-center">
  108. <wd-img width="16" height="16"></wd-img>
  109. <div
  110. class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
  111. >
  112. 游学名额
  113. </div>
  114. <div class="w-4"></div>
  115. <div class="text-white text-base font-normal font-['PingFang SC'] leading-[34px]">
  116. 40人/剩余10人
  117. </div>
  118. </div>
  119. <div class="flex items-center">
  120. <wd-img width="16" height="16"></wd-img>
  121. <div
  122. class="w-[70px] text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-normal"
  123. >
  124. 等级限制
  125. </div>
  126. <div class="w-4"></div>
  127. <div class="text-white text-base font-normal font-['PingFang SC'] leading-[34px]">
  128. 黄金以上等级
  129. </div>
  130. </div>
  131. </div>
  132. <wd-tabs class="bg-transparent!" custom-class="bg-transparent!">
  133. <wd-tab title="活动介绍"></wd-tab>
  134. <wd-tab title="行程安排"></wd-tab>
  135. </wd-tabs>
  136. <div class="mt-5">
  137. <div
  138. class="text-justify text-[#c1c1c1] text-base font-normal font-['PingFang SC'] leading-relaxed"
  139. >
  140. 东京艺术大学(英文:Tokyo University of the
  141. Arts;日文平假名:とうきょうげいじゅつだいがく),简称东京艺大、艺大(とうきょうげいだい、げいだい),是一所校本部位于东京都台东区上野公园内的艺术类日本国立大学。其是超级国际化大学计划、亚洲校园 成员。其前身是于1887年分别创立的东京美术学校和东京音乐学校,1949年两校合并成为新制东京艺术大学。东京艺术大学的主要目的为培养美术和音乐领域的艺术家,其中音乐学部已培养了许多著名作曲家、演奏家、指挥家,美术学部也诞生了许多著名画家、艺术家、建筑家。
  142. </div>
  143. </div>
  144. <BottomAppBar fixed placeholder transparent>
  145. <div
  146. class="h-[63px] bg-white/90 rounded-2xl backdrop-blur-[20px] flex items-center gap-1 px-4 box-border"
  147. >
  148. <div class="text-[#ef4343] text-2xl font-normal font-['D-DIN Exp'] leading-normal">
  149. {{ data.needPointsCount }}
  150. </div>
  151. <div class="text-black/40 text-base font-normal font-['PingFang SC'] leading-[34px]">
  152. 积分
  153. </div>
  154. <div class="flex-1"></div>
  155. <div @click="show = true">
  156. <TiltedButton size="large">立即报名</TiltedButton>
  157. </div>
  158. </div>
  159. </BottomAppBar>
  160. <wd-action-sheet v-model="show">
  161. <view class="px-3.5 py-10">
  162. <div class="flex gap-5 mb-13.5">
  163. <div class="w-[110px] h-[94px] bg-[#f6f6f6] rounded-2xl"></div>
  164. <div class="flex flex-col justify-between flex-1">
  165. <div class="text-black text-base font-normal font-['PingFang SC'] leading-normal">
  166. 阿芙佳朵
  167. </div>
  168. <div class="flex items-center gap-1">
  169. <div class="text-[#ef4343] text-[22px] font-normal font-['D-DIN Exp'] leading-normal">
  170. 1000
  171. </div>
  172. <div class="text-black/40 text-sm font-normal font-['PingFang SC'] leading-[34px]">
  173. 积分
  174. </div>
  175. <div class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-[34px]">
  176. 剩余:9003
  177. </div>
  178. <div class="flex-1"></div>
  179. <!-- <wd-input-number /> -->
  180. </div>
  181. </div>
  182. </div>
  183. <wd-button block :round="false" @click="handleConfirm">确认报名</wd-button>
  184. </view>
  185. </wd-action-sheet>
  186. <wd-overlay :show="listShow" @click="listShow = false">
  187. <view class="flex h-full items-center justify-center">
  188. <div class="flex flex-col gap-5 bg-white">
  189. <PageHelper :request="getActivitySignups" :query="{ activityId: id }">
  190. <template #default="{ source }">
  191. <template v-for="(it, i) in source.list" :key="i">
  192. <div class="text-black/40 text-sm font-normal font-['PingFang SC'] leading-normal">
  193. {{ dayjs(it.createTime).format('YYYY-MM-DD') }} 白金会员-王璐已报名
  194. </div>
  195. </template>
  196. </template>
  197. </PageHelper>
  198. </div>
  199. </view>
  200. </wd-overlay>
  201. <wd-overlay :show="successShow" @click="successShow = false">
  202. <view class="flex h-full items-center justify-center">
  203. <div class="flex flex-col gap-5 bg-white">
  204. <div class="flex gap-1.5">
  205. <wd-icon name="error-circle" size="22px"></wd-icon>
  206. <div
  207. class="w-[151px] h-[21px] text-justify text-black/40 text-base font-normal font-['PingFang SC'] leading-[21px]"
  208. >
  209. 请准时参加活动!
  210. </div>
  211. </div>
  212. <div
  213. class="w-[237px] h-[60px] text-justify text-black/60 text-base font-normal font-['PingFang SC'] leading-normal"
  214. >
  215. 如有问题可咨询官方客服或您的专属经纪人!
  216. </div>
  217. </div>
  218. </view>
  219. </wd-overlay>
  220. </div>
  221. </template>