activityCheckIn.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <div class="activityCheckIn">
  3. <div class="appFirstBox">
  4. <img src="https://www.idea-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="form.collectorsStatus==='2' ? 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-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. <div class="checkInLastBox">
  61. <span class="contactName">请填写报名信息</span>
  62. <ul class="appInfoBox">
  63. <li class="appInfoLi">
  64. <span class="appInfoLiTitle">
  65. <span class="liName">请选择企业</span>
  66. </span>
  67. <input type="text" name="" id="" class="appInfoIpt" v-model="form.companyName" placeholder="请输入">
  68. </li>
  69. <li class="appInfoLi" style="border-bottom: none">
  70. <span class="appInfoLiTitle">
  71. <span class="liName">请填写姓名</span>
  72. </span>
  73. <input type="text" name="" id="" v-model="form.name" class="appInfoIpt" placeholder="请输入">
  74. </li>
  75. </ul>
  76. </div>
  77. <button class="bmBtn" @tap="submit">提交签到</button>
  78. </div>
  79. </template>
  80. <script>
  81. import { getHomeCommunityActivityById, getUserLocalStorageInfo,updateSignIn } from "@/js_sdk/http";
  82. import {homeActivityClickCollect} from "../../../js_sdk/http";
  83. export default {
  84. name: "activeApplication",
  85. data(){
  86. return{
  87. getUserLocalStorageInfo: getUserLocalStorageInfo(),
  88. heartSel: "https://www.idea-sf.com/gardenProduct/image/heartSel.png",
  89. heart: "https://www.idea-sf.com/gardenProduct/image/heart.png",
  90. isColl: true,
  91. form:{
  92. companyId: getUserLocalStorageInfo().userId,
  93. },
  94. activityId: ''
  95. }
  96. },
  97. onShow() {
  98. },
  99. onLoad(options){
  100. this.activityId = options.activityId
  101. this.getById()
  102. },
  103. methods:{
  104. getById(){
  105. const data = {
  106. id : this.activityId,
  107. createdBy: getUserLocalStorageInfo().userId,
  108. }
  109. getHomeCommunityActivityById(data).then(res => {
  110. if (res.errno === 0) {
  111. this.form = res.data
  112. this.statusList.forEach(item => {
  113. if (this.form.status == item.value) {
  114. this.form.statusName = item.label
  115. }
  116. })
  117. }
  118. })
  119. },
  120. clickColl() {
  121. if (this.form.collectorsStatus==='2'){
  122. this.form.collectorsStatus='1'
  123. }else{
  124. this.form.collectorsStatus='2'
  125. }
  126. homeActivityClickCollect({
  127. id: this.activityId,
  128. createdBy: getUserLocalStorageInfo().userId,
  129. collectorsStatus: this.form.collectorsStatus
  130. }).then(res => {
  131. });
  132. },
  133. toApplication(){
  134. uni.navigateTo({
  135. url:'pages/index/index'
  136. })
  137. },
  138. submit(){
  139. this.form.communityActivityId = this.activityId
  140. updateSignIn(this.form).then((res) => {
  141. if (res.errno === 0){
  142. uni.showToast({
  143. title: '签到成功',
  144. icon: 'success',
  145. mask: true,
  146. duration: 1000
  147. });
  148. this.toApplication
  149. }else {
  150. uni.showToast({
  151. title: res.msg,
  152. icon: 'success',
  153. mask: true,
  154. duration: 1000
  155. });
  156. }
  157. })
  158. }
  159. }
  160. }
  161. </script>
  162. <style lang="scss">
  163. .activityCheckIn{
  164. padding-bottom: 120rpx;
  165. .appFirstBox{
  166. margin: 24rpx 0;
  167. padding: 24rpx 32rpx;
  168. background: white;
  169. display: flex;
  170. flex-direction: column;
  171. .firstImg{
  172. width: 686rpx;
  173. height: 300rpx;
  174. }
  175. .appTitle{
  176. display: flex;
  177. align-items: center;
  178. margin: 24rpx 0;
  179. .titleName{
  180. font-size: 32rpx;
  181. color: rgba(24, 23, 42, 1);
  182. }
  183. .titleType{
  184. background: rgba(3, 101, 249, 0.20);
  185. font-size: 28rpx;
  186. color: rgba(3, 101, 249, 1);
  187. width: 112rpx;
  188. height: 48rpx;
  189. display: flex;
  190. align-items: center;
  191. justify-content: center;
  192. border-radius: 2px 2px 2px 2px;
  193. }
  194. }
  195. .joinBox{
  196. display: flex;
  197. justify-content: space-between;
  198. align-items: center;
  199. padding-bottom: 24rpx;
  200. .joinName{
  201. font-size: 28rpx;
  202. color: rgba(136, 136, 136, 1);
  203. }
  204. .shoucang {
  205. display: flex;
  206. align-items: center;
  207. font-size: 28 rpx;
  208. color: rgba(24, 23, 42, 1);
  209. .scImg {
  210. width: 32rpx;
  211. height: 28rpx;
  212. margin-right: 8rpx;
  213. }
  214. }
  215. }
  216. .contactBox{
  217. display: flex;
  218. align-items: center;
  219. justify-content: space-between;
  220. padding: 24rpx 0;
  221. border-top: 1px solid #E6E6E6;
  222. .contactInfo{
  223. color: #666666;
  224. font-size: 28rpx;
  225. line-height: 40rpx;
  226. margin-top: 16rpx;
  227. }
  228. .contackLeft {
  229. display: flex;
  230. align-items: center;
  231. }
  232. .phoneIcon {
  233. width: 64rpx;
  234. height: 64rpx;
  235. }
  236. }
  237. }
  238. .appSecondBox {
  239. padding: 32rpx;
  240. background: white;
  241. .secondBoxItem {
  242. display: flex;
  243. flex-direction: column;
  244. margin-bottom: 48rpx;
  245. .secondBoxTitle {
  246. color: #222222;
  247. font-size: 32rpx;
  248. font-weight: 600;
  249. margin-bottom: 16rpx;
  250. }
  251. .secondBoxInfo {
  252. font-size: 28rpx;
  253. color: #666666;
  254. line-height: 40rpx;
  255. }
  256. .dhInfo {
  257. display: flex;
  258. justify-content: space-between;
  259. .dhIcon {
  260. width: 36rpx;
  261. height: 36rpx;
  262. padding-left: 20rpx;
  263. border-left: 1px solid #E6E6E6;
  264. }
  265. }
  266. }
  267. }
  268. .contactName{
  269. color: #222222;
  270. font-size: 32rpx;
  271. font-weight: 600;
  272. }
  273. .bmBtn{
  274. width: 654rpx;
  275. height: 96rpx;
  276. display: flex;
  277. align-items: center;
  278. justify-content: center;
  279. color: white;
  280. background: #0365F9;
  281. border-radius: 8rpx;
  282. margin: 48rpx 48rpx 0rpx 48rpx;
  283. }
  284. .checkInLastBox{
  285. background: white;
  286. padding: 32rpx 32rpx 0 32rpx;
  287. margin-top: 24rpx;
  288. }
  289. .appInfoBox{
  290. margin: 16rpx 0;
  291. .appInfoLi{
  292. padding: 32rpx 0;
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: center;
  296. border-bottom: 1px solid #E6E6E6;
  297. .appInfoLiTitle{
  298. display: flex;
  299. align-items: center;
  300. .redDoll{
  301. color: red;
  302. margin-right: 5rpx;
  303. }
  304. .liName{
  305. color: #333333;
  306. font-size: 32rpx;
  307. }
  308. }
  309. .appInfoIpt{
  310. width: 400rpx;
  311. font-size: 32rpx;
  312. color: #666666;
  313. text-align: right;
  314. }
  315. .van-cell {
  316. background: #F5F7FA !important;
  317. border-radius: 8rpx;
  318. font-size: 28rpx;
  319. width: 686rpx;
  320. margin: 24rpx 0;
  321. }
  322. }
  323. }
  324. }
  325. </style>