activityDetail.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <!-- 教研室详情 -->
  3. <view class="activityDetail">
  4. <statusBar :item="navbar"></statusBar>
  5. <!-- 顶部 -->
  6. <view class="backPic" v-for="(item,index) in actItemList" :key="index + 'a' ">
  7. <image src="http://43.139.158.220:5007/img/static/yym/Rectangle 40.png" mode="aspectFill"></image>
  8. <view style="padding: 0 30rpx;margin-bottom: 20px;">
  9. <view class="card">
  10. <view class="cardTop three-font">
  11. {{ item.acName }}
  12. </view>
  13. <view class="col fz-font">
  14. 活动日期:<text>{{ item.begin_at }}~{{ item.endTime }}</text>
  15. </view>
  16. <view class="col fz-font">
  17. 招募人数:<text>0/{{ item.pers }}</text>
  18. </view>
  19. <view class="col fz-font">
  20. 活动地址:<text>{{ item.address }}</text>
  21. <uni-icons type="location" color="#0056a8"
  22. style="position: absolute;right: 10px;top: 0;width: 32rpx;height: 45rpx;"></uni-icons>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 创建者用户名 -->
  28. <view style="padding: 0 30rpx;">
  29. <view class="creator" v-for="(item,index) in actItemList" :key="index + 'b' ">
  30. <image
  31. :src="item.avatar == null ? 'http://43.139.158.220:5007/img/static/mine/Avatar_default.png' : item.avatar"
  32. mode="aspectFill"></image>
  33. <view class="creName btn-font">
  34. {{ item.username }}
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 活动详情 -->
  39. <view class="" style="padding: 0 30rpx;">
  40. <detailBlock :actItemList='actItemList' :item='judge'></detailBlock>
  41. </view>
  42. <!-- 当前成员 -->
  43. <view style="padding: 0 30rpx;">
  44. <view class="member">
  45. <view class="memberTop">
  46. <view class="btn-font">报名情况(已报名0人)</view>
  47. <view class="fz-font" style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;"
  48. @click="perList">
  49. <text>查看更多</text>
  50. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png"
  51. style="width: 32rpx;height: 32rpx;" mode="aspectFill"></image>
  52. <!-- <uni-icons type="right"></uni-icons> -->
  53. </view>
  54. </view>
  55. <view class="pers">
  56. <!-- <view class="per" v-if="perNum == []" v-for="(item,index) in perNum">
  57. <image :src="item.img"></image>
  58. <view class="perName fz-font">
  59. {{item.Name}}
  60. </view>
  61. </view> -->
  62. <view class="per">
  63. <!-- <image :src="item.img"></image> -->
  64. <view class="perName fz-font">
  65. 暂无人员
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 申请加入 -->
  72. <view class="btnBlock">
  73. <button class="btn" @click="gotoAdd">立即报名</button>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. navbar: {
  82. title: '活动详情',
  83. btn: 1
  84. },
  85. judge: {
  86. isShow: 1,
  87. info: ''
  88. },
  89. actItemList: [],
  90. perNum: []
  91. // perNum: [{
  92. // Name: '陈芬',
  93. // img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (3).png'
  94. // },
  95. // {
  96. // Name: '贺豪杰',
  97. // img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (4).png'
  98. // },
  99. // {
  100. // Name: '张孝迪',
  101. // img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4.png'
  102. // },
  103. // {
  104. // Name: '马冬梅',
  105. // img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (2).png'
  106. // },
  107. // {
  108. // Name: '康雯妍',
  109. // img: 'http://43.139.158.220:5007/img/static/yym/Ellipse 4 (1).png'
  110. // },
  111. // {
  112. // Name: '张燕琴',
  113. // img: 'http://43.139.158.220:5007/img/static/mine/Avatar.png'
  114. // }
  115. // ]
  116. };
  117. },
  118. methods: {
  119. perList() {
  120. uni.navigateTo({
  121. url: '/pages/dy/dy'
  122. })
  123. },
  124. gotoAdd() {
  125. // console.log(e.currentTarget.dataset['index'], 123);
  126. // let edata = e.currentTarget.dataset['index'];
  127. const clickedAcId = this.actItemList[0].acId;
  128. console.log(clickedAcId);
  129. uni.navigateTo({
  130. url: '/pages/hd/hd?acId=' + clickedAcId
  131. })
  132. },
  133. getActivity() {
  134. // 获取当前页面的URL
  135. const routes = getCurrentPages();
  136. console.log(routes[1].options.acId);
  137. const acId = routes[1].options.acId
  138. let data = {
  139. acId: acId,
  140. ty: 1
  141. }
  142. this.$request('/selectActivityID', "POST", data).then(res => {
  143. console.log(res[0]);
  144. // this.activeList=[...this.activeList,...res[0]]
  145. this.actItemList = res[0]
  146. })
  147. },
  148. },
  149. onShow() {
  150. this.getActivity()
  151. }
  152. }
  153. </script>
  154. <style lang="scss">
  155. .activityDetail {
  156. padding-bottom: 80px;
  157. .backPic {
  158. width: 750rpx;
  159. position: relative;
  160. image {
  161. width: 100%;
  162. display: block;
  163. }
  164. .card {
  165. position: absolute;
  166. width: 690rpx;
  167. // height: 150px;
  168. bottom: -20px;
  169. left: 50%;
  170. // padding: 30rpx 16px;
  171. padding: 30rpx;
  172. border-radius: 10px;
  173. background-color: #ffffff;
  174. transform: translate(-50%, 0);
  175. .cardTop {
  176. // display: flex;
  177. // justify-content: center;
  178. // padding-bottom: 5px;
  179. margin-bottom: 5px;
  180. // font-size: 18px;
  181. font-weight: bold;
  182. display: -webkit-box;
  183. word-break: break-all;
  184. text-overflow: ellipsis;
  185. overflow: hidden;
  186. -webkit-box-orient: vertical;
  187. -webkit-line-clamp: 2;
  188. /*设置 需要显示的行数*/
  189. .title {
  190. font-weight: bold;
  191. }
  192. }
  193. .col {
  194. position: relative;
  195. margin-bottom: 10rpx;
  196. color: #999999;
  197. padding-right: 40px;
  198. // font-size: 14px;
  199. width: 100%;
  200. display: -webkit-box;
  201. word-break: break-all;
  202. text-overflow: ellipsis;
  203. overflow: hidden;
  204. -webkit-box-orient: vertical;
  205. -webkit-line-clamp: 2;
  206. /*设置 需要显示的行数*/
  207. text {
  208. color: #333333;
  209. }
  210. }
  211. .tag {
  212. display: flex;
  213. }
  214. }
  215. // background-image: url(http://43.139.158.220:5007/img/static/resource/jqr.png);
  216. }
  217. .creator {
  218. display: flex;
  219. // padding: 10px 30px;
  220. padding: 30rpx 20rpx;
  221. background-color: #ffffff;
  222. align-items: center;
  223. margin-top: 30px;
  224. margin-bottom: 20rpx;
  225. border-radius: 10px;
  226. image {
  227. width: 96rpx;
  228. height: 96rpx;
  229. border-radius: 50%;
  230. margin-right: 20rpx;
  231. }
  232. .creName {
  233. font-weight: bold;
  234. }
  235. }
  236. .member {
  237. background-color: #ffffff;
  238. margin-top: 20rpx;
  239. padding: 30rpx;
  240. border-radius: 10px;
  241. margin-bottom: 30rpx;
  242. .memberTop {
  243. display: flex;
  244. justify-content: space-between;
  245. margin-bottom: 10px;
  246. }
  247. .pers {
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. .per {
  252. // display: inline-block;
  253. display: flex;
  254. flex-direction: column;
  255. // justify-content: center;
  256. align-items: center;
  257. image {
  258. width: 72rpx;
  259. height: 72rpx;
  260. border-radius: 50%;
  261. }
  262. .perName {
  263. // font-size: 14px;
  264. text-align: center;
  265. }
  266. }
  267. }
  268. }
  269. .btnBlock {
  270. position: fixed;
  271. bottom: 0;
  272. width: 750rpx;
  273. background-color: #ffffff;
  274. // padding: 20px 0;
  275. padding: 2vh 0;
  276. .btn {
  277. width: 432rpx;
  278. height: 88rpx;
  279. font-weight: 500;
  280. display: flex;
  281. justify-content: center;
  282. align-items: center;
  283. margin: auto;
  284. background-color: #0056a8;
  285. color: #ffffff;
  286. }
  287. }
  288. }
  289. </style>