registrationDetails.vue 7.3 KB

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