hd.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <view class="hd">
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="top" v-for="(item,index) in actItemList" :key="index">
  5. <view class="card">
  6. <image class="image" :src="item.pic" mode="aspectFill"></image>
  7. <view class="text">
  8. <view class="text_title">
  9. <view class="manage bqZ-font">类型</view>
  10. <view class="t1 bmTit-font">{{ item.acName }}</view>
  11. </view>
  12. <view class="col sZw-font">
  13. 活动日期:{{ item.begin_at }}~{{ item.endTime }}
  14. </view>
  15. <view class="col sZw-font">
  16. 招募人数:0/{{ item.pers }}
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- <uni-card :is-shadow="false"> -->
  22. <view class="xinxi">
  23. <view class="card2">
  24. <view class="hdxx">
  25. <view class="xxTit btn-font">活动信息</view>
  26. <view class="textcolor">
  27. <view class="name sZw-font">
  28. 姓名:
  29. <input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入姓名"
  30. placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="nickname" />
  31. </view>
  32. <view class="name sZw-font">
  33. 联系方式:
  34. <input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入联系方式"
  35. placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="telephone" />
  36. </view>
  37. <view class="name sZw-font">
  38. 单位:
  39. <input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入单位"
  40. placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="units" />
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- </uni-card> -->
  47. <view class="buttons">
  48. <view class="button-container">
  49. <button @click="button1Action" class="btn1 sZw-font">清空填写信息</button>
  50. <!-- <text class="button-spacing"></text> -->
  51. <!-- 添加间距 -->
  52. <button @click="gotoSign" class="btn2 sZw-font">申请加入</button>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. navBarData: {
  62. title: '活动报名',
  63. btn: 1
  64. },
  65. nickname: '',
  66. telephone: '',
  67. units: '',
  68. actItemList:[]
  69. };
  70. },
  71. methods: {
  72. button1Action() {
  73. this.nickname = ''
  74. this.telephone = ''
  75. this.units = ''
  76. },
  77. gotoSign() {
  78. // 这里添加按钮2点击后触发的动作
  79. if(this.nickname.trim() === '' || this.telephone.trim() === '') {
  80. uni.showToast({
  81. title: '请填写完整的表单内容',
  82. icon: 'none'
  83. });
  84. return;
  85. }
  86. uni.navigateTo({
  87. url: '/pages/Sign/Sign'
  88. })
  89. },
  90. getActivity() {
  91. // 获取当前页面的URL
  92. const routes = getCurrentPages();
  93. console.log(routes);
  94. const acId = routes[2].options.acId
  95. let data = {
  96. acId: acId,
  97. ty: 1
  98. }
  99. this.$request('/selectActivityID', "POST", data).then(res => {
  100. console.log(res[0]);
  101. // this.activeList=[...this.activeList,...res[0]]
  102. this.actItemList = res[0]
  103. })
  104. },
  105. },
  106. onShow() {
  107. this.getActivity()
  108. }
  109. };
  110. </script>
  111. <style lang="scss" scoped>
  112. .hd {
  113. .top{
  114. width: 690rpx;
  115. height: 192rpx;
  116. background-color: #ffffff;
  117. margin: auto;
  118. margin-top: 30rpx;
  119. // padding: 24rpx;
  120. padding: 16rpx 24rpx;
  121. border-radius: 10rpx;
  122. .col{
  123. color: #999999;
  124. }
  125. }
  126. .card {
  127. // margin-top: 40rpx;
  128. display: flex;
  129. .image {
  130. flex-shrink: 0;
  131. width: 160rpx;
  132. height: 160rpx;
  133. border-radius: 4px;
  134. }
  135. .text {
  136. margin-left: 10px; // 增加一点空间
  137. display: flex;
  138. flex-direction: column;
  139. justify-content: space-between;
  140. .text_title {
  141. display: flex;
  142. align-items: center;
  143. .manage {
  144. // padding:4rpx 12rpx 4rpx 12rpx;
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. width: 68rpx;
  149. height: 36rpx;
  150. border-radius: 5rpx;
  151. color: #00b2b6;
  152. border: 1px solid #00b2b6;
  153. // border-radius: 10rpx;
  154. margin-right: 10rpx;
  155. }
  156. .t1 {
  157. color: black;
  158. width: 350rpx;
  159. font-weight: 550;
  160. overflow:hidden;
  161. text-overflow:ellipsis;
  162. white-space:nowrap;
  163. }
  164. }
  165. }
  166. }
  167. .xinxi{
  168. background-color: #ffffff;
  169. width: 690rpx;
  170. // height: 272rpx;
  171. margin: auto;
  172. margin-top: 20rpx;
  173. padding: 20rpx 24rpx;
  174. border-radius: 12rpx;
  175. }
  176. .hdxx {
  177. .xxTit {
  178. color: black;
  179. // font-size: 18px;
  180. // font-weight: 400px;
  181. line-height: 42px;
  182. }
  183. .textcolor {
  184. color: #999999;
  185. line-height: 42px;
  186. .name {
  187. display: flex;
  188. justify-content: space-between;
  189. margin-bottom: 20rpx;
  190. .nickname {
  191. width: 350rpx;
  192. text-align: end;
  193. // padding-right: 10rpx;
  194. // margin-right: 10rpx;
  195. font-size: 28rpx;
  196. color: rgb(153, 153, 153);
  197. }
  198. }
  199. }
  200. }
  201. .buttons {
  202. background-color: white;
  203. position: fixed;
  204. bottom: 0;
  205. left: 0;
  206. width: 100%;
  207. display: flex;
  208. justify-content: space-around;
  209. align-items: center;
  210. height: 137rpx;
  211. // padding-bottom: 50rpx;
  212. // font-size: 30rpx;
  213. .button-container {
  214. width: 100%;
  215. display: flex;
  216. justify-content: space-around;
  217. .btn1{
  218. width: 326rpx;
  219. height: 71rpx;
  220. border: 1px solid #666666;
  221. border-radius: 50px;
  222. height: 70rpx;
  223. line-height: 70rpx;
  224. // font-size: 35rpx;
  225. color: #666666;
  226. }
  227. .btn2{
  228. width: 326rpx;
  229. height: 71rpx;
  230. background-color: #0056a8;
  231. border-radius: 50px;
  232. height: 70rpx;
  233. line-height: 70rpx;
  234. color: #ffffff;
  235. }
  236. }
  237. }
  238. }
  239. </style>