activityDetail.vue 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div>
  3. <div class="banner">
  4. <img :src="activitys.poster_photo" style="width:100%;height:100%" alt />
  5. </div>
  6. <div class="headline">
  7. <div class="top">{{activitys.title}}</div>
  8. <!-- <div class="bottom">
  9. <p class="browse">
  10. <i class="iconfont">&#xe629;</i>
  11. <span>浏览400次</span>
  12. </p>
  13. </div>-->
  14. </div>
  15. <div class="detail">
  16. <p class="row">
  17. <i class="iconfont">&#xe614;</i>
  18. <span>{{staffCreateTime(activitys.start_time)}}</span>
  19. </p>
  20. <p class="row">
  21. <i class="iconfont">&#xe668;</i>
  22. <span>{{activitys.address}}</span>
  23. </p>
  24. <p class="row">
  25. <i class="iconfont">&#xe61f;</i>
  26. <span>{{activitys.join_num}} / {{activitys.limit_num}}</span>
  27. </p>
  28. <p class="row">
  29. <i class="iconfont">&#xe6a9;</i>
  30. <span>{{activitys.phone_number}}</span>
  31. </p>
  32. </div>
  33. <div class="introduce">
  34. <div class="common_title">
  35. <div class="one"></div>
  36. <div class="dynamicTxt">报名须知</div>
  37. </div>
  38. <div class="introduceDetail">{{activitys.sign_up_notice}}</div>
  39. </div>
  40. <!-- <div class="apply">我要报名</div> -->
  41. </div>
  42. </template>
  43. <script>
  44. import { uParseTime } from "@/utils/tools";
  45. import { singleActivitInfo } from "@/api/micro/micro";
  46. export default {
  47. data() {
  48. return {
  49. activitys: []
  50. };
  51. },
  52. methods: {
  53. staffCreateTime(time) {
  54. console.log("time是多少", time);
  55. return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
  56. },
  57. singleActivitInfo(id, orgid) {
  58. singleActivitInfo(id, orgid).then(response => {
  59. if (response.data.state == 1) {
  60. var activitys = response.data.data.activity;
  61. this.activitys = activitys;
  62. console.log("activitys", activitys);
  63. }
  64. });
  65. }
  66. },
  67. created() {
  68. const id = this.$route.query.id;
  69. const orgid = this.$route.query.orgid;
  70. console.log("id是多少", id);
  71. console.log("orgid是多少", orgid);
  72. this.singleActivitInfo(id, orgid);
  73. }
  74. };
  75. </script>
  76. <style lang="scss" scoped>
  77. .banner {
  78. width: 100%;
  79. height: 13.75rem;
  80. img {
  81. width: 100%;
  82. height: 100%;
  83. }
  84. }
  85. .headline {
  86. position: relative;
  87. width: 20.875rem;
  88. height: 5rem;
  89. margin-top: -1.25rem;
  90. left: 1.25rem;
  91. z-index: 99;
  92. background: rgba(255, 255, 255, 1);
  93. box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.05);
  94. border-radius: 10px;
  95. padding: 1.0625rem 0.625rem 0 0.875rem;
  96. box-sizing: border-box;
  97. .top {
  98. font-size: 1.0625rem;
  99. font-weight: 600;
  100. color: rgba(7, 18, 40, 1);
  101. line-height: 1.5rem;
  102. }
  103. }
  104. .browse {
  105. color: rgba(182, 186, 193, 1);
  106. margin-top: 0.5rem;
  107. span {
  108. font-size: 0.75rem;
  109. font-weight: 400;
  110. }
  111. }
  112. .detail {
  113. margin-left: 1.25rem;
  114. margin-top: 1.25rem;
  115. .row {
  116. margin: 0.625rem 0;
  117. i {
  118. color: #b6bac1;
  119. }
  120. span {
  121. font-size: 0.875rem;
  122. font-weight: 600;
  123. color: rgba(7, 18, 40, 1);
  124. margin-left: 0.625rem;
  125. }
  126. }
  127. }
  128. .introduce {
  129. margin-left: 1.25rem;
  130. margin-top: 1.5rem;
  131. }
  132. .common_title {
  133. width: 20.9375rem;
  134. height: 1.125rem;
  135. line-height: 1.125rem;
  136. font-size: 1.125rem;
  137. font-weight: 800;
  138. color: rgba(7, 18, 40, 1);
  139. }
  140. .one {
  141. margin-top: 0.125rem;
  142. margin-right: 0.625rem;
  143. float: left;
  144. width: 0.125rem;
  145. height: 0.875rem;
  146. background: linear-gradient(
  147. 0deg,
  148. rgba(114, 182, 253, 1),
  149. rgba(52, 119, 254, 1)
  150. );
  151. box-shadow: 0px 3px 12px 0px rgba(60, 127, 254, 0.2);
  152. border-radius: 3px;
  153. }
  154. .introduceDetail {
  155. width: 19.875rem;
  156. height: 5.75rem;
  157. font-size: 1rem;
  158. color: rgba(155, 155, 155, 1);
  159. line-height: 1.5rem;
  160. margin-top: 1.125rem;
  161. padding-left: 0.375rem;
  162. box-sizing: border-box;
  163. }
  164. .apply {
  165. width: 100%;
  166. height: 2.625rem;
  167. position: fixed;
  168. left: 0;
  169. bottom: 0;
  170. text-align: center;
  171. line-height: 2.625rem;
  172. color: rgba(255, 255, 255, 1);
  173. font-size: 1.125rem;
  174. background: linear-gradient(
  175. 90deg,
  176. rgba(114, 182, 253, 1),
  177. rgba(52, 119, 254, 1)
  178. );
  179. }
  180. </style>