activeApplication.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <div class="activeApplication">
  3. <div class="appFirstBox">
  4. <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="firstImg"/>
  5. <div class="appTitle">
  6. <span class="titleName">{{ form.activityName }}</span>
  7. <span class="titleType">{{ form.statusName }}</span>
  8. </div>
  9. <div @tap.stop="clickColl()" class="joinBox">
  10. <span class="joinName">{{ form.registrationNumbers }}参加</span>
  11. <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg"/> 收藏</span>
  12. </div>
  13. <div class="contactBox">
  14. <span class="contackLeft">
  15. <span style="color: #666666;font-size: 28rpx">联系电话:</span>
  16. <span style="color: #18172A;font-size: 36rpx;font-weight: 600">{{ form.activityPhone }}</span>
  17. </span>
  18. <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
  19. </div>
  20. </div>
  21. <div class="appSecondBox">
  22. <div class="secondBoxItem">
  23. <span class="secondBoxTitle">活动举办</span>
  24. <span class="secondBoxInfo">{{ form.activitiesNotice }}</span>
  25. </div>
  26. <div class="secondBoxItem">
  27. <span class="secondBoxTitle">活动内容</span>
  28. <span class="secondBoxInfo">{{ form.activityContent }}</span>
  29. </div>
  30. <div class="secondBoxItem">
  31. <span class="secondBoxTitle">活动时间</span>
  32. <span class="secondBoxInfo">{{ form.activityStartTime }} ~ {{ form.activityEndTime }}</span>
  33. </div>
  34. <div class="secondBoxItem">
  35. <span class="secondBoxTitle">活动地址</span>
  36. <span class="secondBoxInfo dhInfo">
  37. <span>{{ form.activityAddress }} - {{ form.activityAddressDetail }}</span>
  38. <img src="./image/dhIcon.png" class="dhIcon">
  39. </span>
  40. </div>
  41. <div class="secondBoxItem">
  42. <span class="secondBoxTitle">报名条件</span>
  43. <span class="secondBoxInfo">
  44. {{ form.registrationConditions }}
  45. </span>
  46. </div>
  47. <div class="secondBoxItem">
  48. <span class="secondBoxTitle">报名时间</span>
  49. <span class="secondBoxInfo">
  50. {{ form.registrationStartTime }} ~ {{ form.registrationEndTime }}
  51. </span>
  52. </div>
  53. <div class="secondBoxItem">
  54. <span class="secondBoxTitle">活动参与</span>
  55. <span class="secondBoxInfo">
  56. {{form.activityQuota}}
  57. </span>
  58. </div>
  59. </div>
  60. <button class="bmBtn" @tap="toApplication">我要报名</button>
  61. </div>
  62. </template>
  63. <script>
  64. import {getHomeCommunityActivityById, getByCodes} from "../../../js_sdk/http";
  65. export default {
  66. name: "activeApplication",
  67. data() {
  68. return {
  69. dc_key: ['activity_stat'],
  70. heartSel: "https://www.idea-co-sf.com/gardenProduct/image/heartSel.png",
  71. heart: "https://www.idea-co-sf.com/gardenProduct/image/heart.png",
  72. isColl: true,
  73. form: {},
  74. dic_SelectList: [],
  75. statusList: [],
  76. id: ''
  77. }
  78. },
  79. created() {
  80. this.getByCodes()
  81. },
  82. onShow(){
  83. getHomeCommunityActivityById({id: this.id}).then(res => {
  84. if (res.errno === 0) {
  85. this.form = res.data
  86. this.statusList.forEach(item => {
  87. if (this.form.status == item.value) {
  88. this.form.statusName = item.label
  89. }
  90. })
  91. }
  92. })
  93. },
  94. onLoad(options) {
  95. this.id = options.activityId
  96. getHomeCommunityActivityById({id: options.activityId}).then(res => {
  97. if (res.errno === 0) {
  98. this.form = res.data
  99. this.statusList.forEach(item => {
  100. if (this.form.status == item.value) {
  101. this.form.statusName = item.label
  102. }
  103. })
  104. }
  105. })
  106. },
  107. methods: {
  108. async getByCodes() {
  109. let data = await getByCodes(JSON.stringify(this.dc_key));
  110. this.dic_SelectList = this.$common.handleDicList(data);
  111. this.statusList = this.dic_SelectList.activity_stat
  112. console.log('this.statusList', this.statusList)
  113. },
  114. clickColl() {
  115. this.isColl = !this.isColl
  116. },
  117. toApplication() {
  118. uni.navigateTo({
  119. url: '/pages/subPackages/parkActivity/applicationInfo?activityId=' + this.form.id
  120. })
  121. }
  122. }
  123. }
  124. </script>
  125. <style lang="scss">
  126. .activeApplication {
  127. padding-bottom: 120rpx;
  128. .appFirstBox {
  129. margin: 24rpx 0;
  130. padding: 24rpx 32rpx;
  131. background: white;
  132. display: flex;
  133. flex-direction: column;
  134. .firstImg {
  135. width: 686rpx;
  136. height: 300rpx;
  137. }
  138. .appTitle {
  139. display: flex;
  140. align-items: center;
  141. margin: 24rpx 0;
  142. .titleName {
  143. font-size: 32rpx;
  144. color: rgba(24, 23, 42, 1);
  145. }
  146. .titleType {
  147. background: rgba(3, 101, 249, 0.20);
  148. font-size: 28rpx;
  149. color: rgba(3, 101, 249, 1);
  150. width: 112rpx;
  151. height: 48rpx;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. border-radius: 2px 2px 2px 2px;
  156. }
  157. }
  158. .joinBox {
  159. display: flex;
  160. justify-content: space-between;
  161. align-items: center;
  162. padding-bottom: 24rpx;
  163. .joinName {
  164. font-size: 28rpx;
  165. color: rgba(136, 136, 136, 1);
  166. }
  167. .shoucang {
  168. display: flex;
  169. align-items: center;
  170. font-size: 28rpx;
  171. color: rgba(24, 23, 42, 1);
  172. .scImg {
  173. width: 32rpx;
  174. height: 28rpx;
  175. margin-right: 8rpx;
  176. }
  177. }
  178. }
  179. .contactBox {
  180. display: flex;
  181. align-items: center;
  182. justify-content: space-between;
  183. padding: 24rpx 0;
  184. border-top: 1px solid #E6E6E6;
  185. .contackLeft {
  186. display: flex;
  187. align-items: center;
  188. }
  189. .phoneIcon {
  190. width: 64rpx;
  191. height: 64rpx;
  192. }
  193. }
  194. }
  195. .appSecondBox {
  196. padding: 32rpx;
  197. background: white;
  198. .secondBoxItem {
  199. display: flex;
  200. flex-direction: column;
  201. margin-bottom: 48rpx;
  202. .secondBoxTitle {
  203. color: #222222;
  204. font-size: 32rpx;
  205. font-weight: 600;
  206. margin-bottom: 16rpx;
  207. }
  208. .secondBoxInfo {
  209. font-size: 28rpx;
  210. color: #666666;
  211. line-height: 40rpx;
  212. }
  213. .dhInfo {
  214. display: flex;
  215. justify-content: space-between;
  216. .dhIcon {
  217. width: 36rpx;
  218. height: 36rpx;
  219. padding-left: 20rpx;
  220. border-left: 1px solid #E6E6E6;
  221. }
  222. }
  223. }
  224. }
  225. .bmBtn {
  226. width: 654rpx;
  227. height: 96rpx;
  228. display: flex;
  229. align-items: center;
  230. justify-content: center;
  231. color: white;
  232. background: #0365F9;
  233. border-radius: 8rpx;
  234. margin: 48rpx 48rpx 0rpx 48rpx;
  235. }
  236. }
  237. </style>