jys.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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.username }}
  14. </view>
  15. <view class="col sZw-font">
  16. 教研室标签:{{ typetext }}
  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. typetext: ''
  70. };
  71. },
  72. methods: {
  73. button1Action() {
  74. this.nickname = ''
  75. this.telephone = ''
  76. this.units = ''
  77. },
  78. gotoSign() {
  79. // 这里添加按钮2点击后触发的动作
  80. if (this.nickname.trim() === '' || this.telephone.trim() === '') {
  81. uni.showToast({
  82. title: '请填写完整的表单内容',
  83. icon: 'none'
  84. });
  85. return;
  86. }
  87. uni.navigateTo({
  88. url: '/pages/Sign/Sign'
  89. })
  90. },
  91. mapTypeToText(type) {
  92. if (type === 0) {
  93. return "直播活动";
  94. } else if (type === 1) {
  95. return "常规教研活动";
  96. } else {
  97. return "专题教研活动";
  98. }
  99. },
  100. getActivity() {
  101. // 获取当前页面的URL
  102. const routes = getCurrentPages();
  103. console.log(routes);
  104. const acId = routes[2].options.acId
  105. let data = {
  106. acId: acId,
  107. ty: 2
  108. }
  109. this.$request('/selectActivityID', "POST", data).then(res => {
  110. console.log(res[0]);
  111. // this.activeList=[...this.activeList,...res[0]]
  112. this.actItemList = res[0]
  113. this.typetext = this.mapTypeToText(this.actItemList.type);
  114. })
  115. },
  116. },
  117. onShow() {
  118. this.getActivity()
  119. }
  120. };
  121. </script>
  122. <style lang="scss" scoped>
  123. .hd {
  124. .top {
  125. width: 690rpx;
  126. height: 192rpx;
  127. background-color: #ffffff;
  128. margin: auto;
  129. margin-top: 30rpx;
  130. // padding: 24rpx;
  131. padding: 16rpx 24rpx;
  132. border-radius: 10rpx;
  133. .col {
  134. color: #999999;
  135. }
  136. }
  137. .card {
  138. // margin-top: 40rpx;
  139. display: flex;
  140. .image {
  141. flex-shrink: 0;
  142. width: 160rpx;
  143. height: 160rpx;
  144. border-radius: 4px;
  145. }
  146. .text {
  147. margin-left: 10px; // 增加一点空间
  148. display: flex;
  149. flex-direction: column;
  150. justify-content: space-between;
  151. .text_title {
  152. display: flex;
  153. align-items: center;
  154. .manage {
  155. // padding:4rpx 12rpx 4rpx 12rpx;
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. width: 68rpx;
  160. height: 36rpx;
  161. border-radius: 5rpx;
  162. color: #00b2b6;
  163. border: 1px solid #00b2b6;
  164. // border-radius: 10rpx;
  165. margin-right: 10rpx;
  166. }
  167. .t1 {
  168. color: black;
  169. width: 350rpx;
  170. font-weight: 550;
  171. overflow: hidden;
  172. text-overflow: ellipsis;
  173. white-space: nowrap;
  174. }
  175. }
  176. }
  177. }
  178. .xinxi {
  179. background-color: #ffffff;
  180. width: 690rpx;
  181. // height: 272rpx;
  182. margin: auto;
  183. margin-top: 20rpx;
  184. padding: 20rpx 24rpx;
  185. border-radius: 12rpx;
  186. }
  187. .hdxx {
  188. .xxTit {
  189. color: black;
  190. // font-size: 18px;
  191. // font-weight: 400px;
  192. line-height: 42px;
  193. }
  194. .textcolor {
  195. color: #999999;
  196. line-height: 42px;
  197. .name {
  198. display: flex;
  199. justify-content: space-between;
  200. margin-bottom: 20rpx;
  201. .nickname {
  202. width: 350rpx;
  203. text-align: end;
  204. // padding-right: 10rpx;
  205. // margin-right: 10rpx;
  206. font-size: 28rpx;
  207. color: rgb(153, 153, 153);
  208. }
  209. }
  210. }
  211. }
  212. .buttons {
  213. background-color: white;
  214. position: fixed;
  215. bottom: 0;
  216. left: 0;
  217. width: 100%;
  218. display: flex;
  219. justify-content: space-around;
  220. align-items: center;
  221. height: 137rpx;
  222. // padding-bottom: 50rpx;
  223. // font-size: 30rpx;
  224. .button-container {
  225. width: 100%;
  226. display: flex;
  227. justify-content: space-around;
  228. .btn1 {
  229. width: 326rpx;
  230. height: 71rpx;
  231. border: 1px solid #666666;
  232. border-radius: 50px;
  233. height: 70rpx;
  234. line-height: 70rpx;
  235. // font-size: 35rpx;
  236. color: #666666;
  237. }
  238. .btn2 {
  239. width: 326rpx;
  240. height: 71rpx;
  241. background-color: #0056a8;
  242. border-radius: 50px;
  243. height: 70rpx;
  244. line-height: 70rpx;
  245. color: #ffffff;
  246. }
  247. }
  248. }
  249. }
  250. </style>