You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

362 lines
7.4 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <script setup>
  2. import ShowApi from '@/axios/ShowApi';
  3. import { ref } from 'vue';
  4. //众筹参与者
  5. const participants = ref([]);
  6. //众筹活动
  7. const activity = ref();
  8. const percent = ref()
  9. function loadParticipants() {
  10. // participants.value = [
  11. // {
  12. // id: 1,
  13. // jwcode: "498498",
  14. // },
  15. // {
  16. // id: 2,
  17. // jwcode: "498498",
  18. // },
  19. // {
  20. // id: 3,
  21. // jwcode: "498498",
  22. // },
  23. // {
  24. // id: 4,
  25. // jwcode: "498498",
  26. // },
  27. // {
  28. // id: 5,
  29. // jwcode: "498498",
  30. // },
  31. // {
  32. // id: 5,
  33. // jwcode: "498498",
  34. // },
  35. // {
  36. // id: 5,
  37. // jwcode: "498498",
  38. // },
  39. // {
  40. // id: 5,
  41. // jwcode: "498498",
  42. // },
  43. // {
  44. // id: 5,
  45. // jwcode: "498498",
  46. // },
  47. // {
  48. // id: 5,
  49. // jwcode: "498498",
  50. // },
  51. // {
  52. // id: 5,
  53. // jwcode: "498498",
  54. // },
  55. // {
  56. // id: 5,
  57. // jwcode: "498498",
  58. // },
  59. // {
  60. // id: 5,
  61. // jwcode: "498498",
  62. // }
  63. // ]
  64. ShowApi.showPage().then(result => {
  65. console.log("后端数据:", result.data)
  66. activity.value = result.data;
  67. // participants.value = result.data.participantList;
  68. percent.value = result.data.nowNumber / result.data.targetNumber * 100
  69. console.log("活动数据", activity.value)
  70. })
  71. }
  72. loadParticipants();
  73. </script>
  74. <template>
  75. <div class="container">
  76. <!-- 标题 -->
  77. <div class="header">
  78. <div class="title" :title="activity.title">
  79. 关于{{ activity.title }}众筹
  80. </div>
  81. <div class="minge" :target="activity.targetNumber">
  82. 只需要{{ activity.targetNumber }}个名额
  83. </div>
  84. <!-- 众筹状态 -->
  85. <div class="state">
  86. <span class="doing">众筹状态</span>
  87. <span class="finished" v-if="activity.status == 1">众筹中</span>
  88. <span class="finished" v-else>已完成</span>
  89. </div>
  90. <!-- 进度 -->
  91. <div class="jindu">
  92. <!-- 当前进度 -->
  93. <span class="current" :current="activity.nowNumber">
  94. 当前进度:{{ activity.nowNumber }}
  95. </span>
  96. <!-- 目标 -->
  97. <span class="goal" :goal="activity.targetNumber">
  98. 目标{{ activity.targetNumber }}
  99. </span>
  100. </div>
  101. <!-- 目标 -->
  102. </div>
  103. <!-- 进度条 -->
  104. <div class="progress-bar">
  105. <!-- 进度条背景 -->
  106. <div class="progress-bg">
  107. <!-- 进度条 -->
  108. <div class="progress-bottem">
  109. <div class="progress">
  110. <el-progress :text-inside="true" :stroke-width="40" :percentage="percent" status="exception" />
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <!-- 参与众筹人员展示 -->
  116. <div class="list">
  117. <div class="list-item" v-for="participant in activity.participantList">
  118. <div class="display-item" :jwcode="participant.jwcode">
  119. 恭喜{{ participant.jwcode }}参与了本次众筹</div>
  120. </div>
  121. </div>
  122. </div>
  123. </template>
  124. <style scoped>
  125. .container {
  126. background-image: url("../assets/bg.png");
  127. width: 100%;
  128. height: auto;
  129. }
  130. .title {
  131. color: #FFC48D;
  132. text-shadow: 20px 0 7px rgba(96, 0, 0, 0.35);
  133. font-weight: 700;
  134. width: auto;
  135. height: auto;
  136. font-size: 150px;
  137. margin: auto;
  138. display: flex;
  139. justify-content: center;
  140. align-items: center;
  141. padding-top: 100px;
  142. font-family: Alibaba PuHuiTi 3.0;
  143. }
  144. .minge {
  145. font-weight: 700;
  146. color: #FFC48D;
  147. font-weight: 115 Black;
  148. width: auto;
  149. height: auto;
  150. font-size: 110px;
  151. text-align: center;
  152. text-shadow: 0 20px 7px 0 #61000059;
  153. margin: auto;
  154. display: flex;
  155. justify-content: center;
  156. align-items: center;
  157. margin-top: 50px;
  158. }
  159. .state {
  160. margin: auto;
  161. margin-top: 40px;
  162. background-color: #E0BA77;
  163. border: 1px solid #BE6F2D;
  164. border-radius: 29.18px 29.18px 29.18px 29.18px;
  165. width: 355.09px;
  166. height: 58.38px;
  167. }
  168. .doing {
  169. color: #AE0000;
  170. display: inline-block;
  171. font-weight: 800;
  172. font-size: 30.41px;
  173. text-align: center;
  174. color: #AE0000 100%;
  175. text-align: center;
  176. padding-left: 20px;
  177. padding-top: 5px;
  178. }
  179. .finished {
  180. margin-left: 19px;
  181. margin-top: 7px;
  182. display: inline-block;
  183. width: 187.56px;
  184. height: 45.62px;
  185. border-radius: 22.81px 22.81px 22.81px 22.81px;
  186. background: #ffffff;
  187. color: #AE0000;
  188. font-weight: 800;
  189. font-size: 30.41px;
  190. text-align: center;
  191. }
  192. .jindu {
  193. margin-top: 25px;
  194. display: flex;
  195. /* 启用 Flexbox 布局 */
  196. justify-content: center;
  197. }
  198. .current {
  199. display: inline-block;
  200. background-image: url("../assets/圆角矩形 2.png");
  201. width: 316.13px;
  202. height: 52px;
  203. margin-right: 20vw;
  204. /* 文字 */
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. color: #bb0404;
  209. font-size: 32px;
  210. font-weight: 900;
  211. }
  212. .goal {
  213. display: inline-block;
  214. background-image: url("../assets/圆角矩形 3.png");
  215. width: 266.13px;
  216. height: 52px;
  217. /* margin-left: 60vw; */
  218. /* 文字 */
  219. display: flex;
  220. justify-content: center;
  221. align-items: center;
  222. color: #bb0404;
  223. font-size: 32px;
  224. font-weight: 900;
  225. }
  226. .progress-bar {
  227. margin-top: 30px;
  228. position: relative;
  229. }
  230. .progress-bg {
  231. background-image: url("../assets/底座.png");
  232. /* width: 1920px; */
  233. height: 200px;
  234. display: flex;
  235. justify-content: center;
  236. align-items: center;
  237. }
  238. .progress-bottem {
  239. /* padding-top: 100px; */
  240. background-image: url("../assets/进度条底.png");
  241. background-repeat: no-repeat;
  242. display: grid;
  243. place-items: center;
  244. width: 1224px;
  245. height: 78px;
  246. margin-top: auto;
  247. margin-bottom: auto;
  248. }
  249. .progress {
  250. margin: auto;
  251. /* padding-top: 80px; */
  252. width: 90%;
  253. }
  254. /* .sidai1{
  255. position: absolute;
  256. left: 1vw;
  257. top: -3vh;
  258. } */
  259. .el-progress__text {
  260. font-size: 16px;
  261. /* 调整字体大小 */
  262. color: #333;
  263. /* 调整字体颜色 */
  264. }
  265. .list {
  266. margin: auto;
  267. display: flex;
  268. /* 启用 Flexbox 布局 */
  269. flex-wrap: wrap;
  270. /* 允许换行 */
  271. justify-content: flex-start;
  272. align-items: flex-start;
  273. /* 子元素之间的间隔 */
  274. /* align-items: center; */
  275. width: 70vw;
  276. max-height: 300px;
  277. border-radius: 0 0px 48px 48px;
  278. background: linear-gradient(-90deg, #e51b1b, #990505);
  279. /* padding: 0 200px; */
  280. padding-left: 50px;
  281. /* margin-top: 10px; */
  282. padding-top: 20px;
  283. padding-bottom: 50px;
  284. border: #EDD88E solid 4px;
  285. overflow-y: scroll
  286. /*只是y方向*/
  287. }
  288. .list-item {
  289. flex: 0 0 calc(50% - 20px);
  290. /* 占据一半宽度减去间隔 */
  291. margin-bottom: 5px;
  292. /* 子元素之间的垂直间隔 */
  293. color: white;
  294. /* 文字颜色 */
  295. /* 垂直内边距 */
  296. display: inline-block;
  297. width: 60%;
  298. box-sizing: border-box;
  299. /* 确保 padding 和 border 不会增加元素的总宽度 */
  300. padding: 15px 0;
  301. }
  302. /* 为奇数项添加左边距,使得两列并排显示 */
  303. .list-item:nth-child(odd) {
  304. margin-left: 0;
  305. margin-right: 10px;
  306. /* 添加右边距,确保两列之间有间隔 */
  307. text-align: center;
  308. }
  309. .list-item:nth-child(even) {
  310. margin-left: 10px;
  311. /* 为偶数项添加左边距,确保两列之间有间隔 */
  312. margin-right: 10px;
  313. text-align: center;
  314. }
  315. .display-item {
  316. font-size: 1.7vw;
  317. font-weight: 200;
  318. font-family: Source Han Serif SC;
  319. border-bottom: 1px solid white;
  320. display: inline-block;
  321. /* 使下划线与文本内容对齐 */
  322. width: auto;
  323. /* 自动宽度,根据内容调整 */
  324. margin: 0 auto;
  325. /* 居中显示 */
  326. padding-left: 40px;
  327. /* 左边距,可以根据需要调整 */
  328. padding-right: 40px;
  329. /* 右边距,可以根据需要调整 */
  330. }
  331. </style>