hd.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view class="main">
  3. <statusBar :item="navBarData"></statusBar>
  4. <uni-card :is-shadow="false">
  5. <view class="uni-body">
  6. <view class="card">
  7. <img src="../../static/jys/jys.png" alt="" class="image" />
  8. <view class="text">
  9. <p class="text_title">
  10. <span class="manage">类型</span>
  11. <span class="t1">这里是活动名称</span>
  12. </p>
  13. <view class="fzr">
  14. <p>活动日期:5.12~5.20</p>
  15. <p>招募人数:23/50</p>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </uni-card>
  21. <uni-card :is-shadow="false">
  22. <view class="uni-body">
  23. <view class="card2">
  24. <view class="hdxx">
  25. <p class="hd">活动信息</p>
  26. <view class="textcolor">
  27. <p class="name">
  28. 姓名:
  29. <span class="name1"></span>
  30. </p>
  31. <p class="name">
  32. 联系方式:
  33. <span class="lx1">172xxxxx5678</span>
  34. </p>
  35. <p class="name">
  36. 单位:
  37. <span class="dw1">xx实验中学学校</span>
  38. </p>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </uni-card>
  44. <view class="buttons safe-area-bottom">
  45. <view class="button-container">
  46. <button @click="button1Action" class="btn1">清空填写信息</button>
  47. <span class="button-spacing"></span>
  48. <!-- 添加间距 -->
  49. <button @click="button2Action" class="btn2">确认报名</button>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. navBarData: {
  59. title: '活动报名',
  60. btn: 1
  61. }
  62. };
  63. },
  64. methods: {
  65. button1Action() {
  66. // 这里添加按钮1点击后触发的动作
  67. console.log('Button 1 clicked');
  68. },
  69. button2Action() {
  70. // 这里添加按钮2点击后触发的动作
  71. console.log('Button 2 clicked');
  72. }
  73. }
  74. };
  75. </script>
  76. <style lang="scss" scoped>
  77. .main {
  78. .card {
  79. display: flex;
  80. // align-items: center; // 如果需要垂直居中
  81. justify-content: flex-start;
  82. .image {
  83. width: 100px;
  84. height: 100px;
  85. border-radius: 4px;
  86. object-fit: cover; // 使图片保持原有比例填充整个元素
  87. }
  88. .text {
  89. margin-left: 10px; // 增加一点空间
  90. line-height: 35px; // 根据你的需求调整,使文本与图片保持
  91. .text_title {
  92. display: flex;
  93. align-items: center;
  94. span {
  95. display: inline-block;
  96. height: 20px;
  97. line-height: 20px;
  98. text-align: center;
  99. &:last-child {
  100. margin-left: 5px;
  101. }
  102. }
  103. }
  104. .manage {
  105. padding: 2px;
  106. padding-left: 5px;
  107. padding-right: 5px;
  108. // font-size: 12px;
  109. color: #00b2b6;
  110. border: 1px solid #00b2b6;
  111. border-radius: 3px;
  112. // margin-left: 5px;
  113. }
  114. .t1 {
  115. font-size: 18px;
  116. color: black;
  117. font-weight: 550;
  118. }
  119. .fzr {
  120. p {
  121. margin-left: 5px;
  122. color: #999999;
  123. }
  124. }
  125. }
  126. }
  127. .hdxx {
  128. .hd {
  129. color: black;
  130. font-size: 18px;
  131. font-weight: 400px;
  132. line-height: 42px;
  133. }
  134. .textcolor {
  135. color: #999999;
  136. line-height: 42px;
  137. .name {
  138. display: flex;
  139. justify-content: space-between;
  140. }
  141. }
  142. }
  143. .buttons {
  144. background-color: white;
  145. // display: flex;
  146. // justify-content: center;
  147. // align-items: flex-end;
  148. // bottom: 20px; /* 调整底部的间距 */
  149. // position: fixed;
  150. position: fixed;
  151. bottom: 0;
  152. left: 0;
  153. width: 100%;
  154. display: flex;
  155. justify-content: center;
  156. padding: 20px;
  157. box-sizing: border-box;
  158. .button-container {
  159. display: flex;
  160. justify-content: center;
  161. align-items: center;
  162. .button-spacing {
  163. margin: 0 10px; /* 添加按钮间距 */
  164. }
  165. }
  166. button {
  167. font-size: 16px;
  168. color: #999999;
  169. width: 326rpx; /* 设置按钮宽度 */
  170. border-radius: 50px; /* 设置圆角 */
  171. }
  172. .btn1 {
  173. border: 1px solid #999999;
  174. }
  175. .btn2 {
  176. color: white;
  177. // margin-left: 50px;
  178. background-color: #0056a8;
  179. }
  180. }
  181. }
  182. </style>