index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <template>
  2. <div id="app">
  3. <div class="banner">
  4. <img src="../../assets/image/banner.png" />
  5. </div>
  6. <div class="activity-container notice-wrap">
  7. <div class="header-line">
  8. <h3>通知公告</h3>
  9. <span>NOTICE</span>
  10. <a class="view-more" @click="goNotice">查看更多</a>
  11. </div>
  12. <div class="notices-box">
  13. <div class="lastest">
  14. <div class="lastest-mark">
  15. TOP
  16. </div>
  17. <p class="lastest-title" @click="handleNoticeClick()">{{noticeList[0].title}}</p>
  18. <p class="lastest-date">{{noticeList[0].startTimeTip}}</p>
  19. </div>
  20. <ul class="notice-list">
  21. <li v-for="(item,index) in noticeList" @click="handleNoticeClick()"><span class="title">{{item.title}}</span><span class="date">{{item.startTimeTip}}</span></li>
  22. </ul>
  23. </div>
  24. </div>
  25. <div class="home-activity">
  26. <div class="activity-container">
  27. <div class="header-line">
  28. <h3>评审活动</h3> <span>ACTIVITY</span> <div class="more">
  29. <a class="view-more" @click="goActivity">查看更多</a> <span class="count">
  30. <b style="color: rgb(83, 199, 102);">2</b>个活动进行中
  31. </span>
  32. </div>
  33. </div>
  34. <div class="activities">
  35. <div class="activity" v-for="(item,index) in activityList" @click="handleActivityClick()">
  36. <div>
  37. <div class="img-box"><span class="state" style="background: rgb(19, 206, 102); visibility: visible;">{{item.statusTip}}</span> <img src="../../assets/image/cover.png" alt=""></div> <div class="infos">
  38. <p></p><p class="actName">{{item.name}}</p> <p></p> <p class="actOrganizer">
  39. <span class="organizer">
  40. {{item.organizer}}
  41. </span>
  42. <span>主办</span>
  43. </p>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="home-activity">
  51. <div class="activity-container">
  52. <div class="header-line">
  53. <h3>往届回顾</h3> <span>REVIEW</span>
  54. <div class="more">
  55. <a href="./activity.html" class="view-more">查看更多</a>
  56. <span class="count">
  57. <b style="color: rgb(83, 199, 102);">18</b>个活动
  58. </span>
  59. </div>
  60. </div>
  61. <div class="activities">
  62. <div class="activity" v-for="(item,index) in activityList" @click="handleActivityClick()">
  63. <div>
  64. <div class="img-box"><span class="state" style="background: rgb(19, 206, 102); visibility: visible;">{{item.statusTip}}</span> <img src="../../assets/image/cover.png" alt=""></div> <div class="infos">
  65. <p></p>
  66. <p class="actName">{{item.name}}</p>
  67. <p></p>
  68. <p class="actOrganizer">
  69. <span class="organizer">
  70. {{item.organizer}}
  71. </span>
  72. <span>主办</span>
  73. </p>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </template>
  82. <script>
  83. import headers from '@/components/smart-class/headers'
  84. import indexNoticeList from '@/static/indexNoticeList.json'
  85. import indexActivityList from '@/static/reviewAcList.json'
  86. export default {
  87. components: {
  88. headers
  89. },
  90. data() {
  91. return {
  92. noticeList: [],
  93. activityList:[]
  94. }
  95. },
  96. created() {
  97. this.noticeList = indexNoticeList.list;
  98. this.activityList = indexActivityList.data.list;
  99. },
  100. methods: {
  101. handleNoticeClick() {
  102. this.$router.push('noticeDetails');
  103. this.$eventBus.$emit("activeIndex", 1);
  104. },
  105. handleActivityClick() {
  106. this.$router.push('activityDetails');
  107. this.$eventBus.$emit("activeIndex", 2);
  108. },
  109. goNotice() {
  110. this.$router.push('notice');
  111. this.$eventBus.$emit("activeIndex", 1);
  112. },
  113. goActivity() {
  114. this.$router.push('reviewActivity');
  115. this.$eventBus.$emit("activeIndex", 2);
  116. }
  117. },
  118. mounted() {
  119. }
  120. }
  121. </script>
  122. <style scoped>
  123. html, body, #app {
  124. height: 100% !important;
  125. user-select: none;
  126. }
  127. .activity-container {
  128. width: 1200px;
  129. margin: 0 auto;
  130. }
  131. .notice-wrap {
  132. height: 300px;
  133. margin-top: 30px;
  134. }
  135. .header-line {
  136. height: 16px;
  137. font-size: 16px;
  138. line-height: 16px
  139. }
  140. .header-line h3 {
  141. float: left;
  142. padding-left: 10px;
  143. border-left: 4px solid #33aafe;
  144. color: #333
  145. }
  146. .header-line span {
  147. float: left;
  148. margin-left: 8px;
  149. color: #cbb;
  150. font-size: 14px;
  151. height: 16px
  152. }
  153. .header-line a {
  154. float: right;
  155. color: #666;
  156. font-size: 14px
  157. }
  158. .banner img {
  159. width: 100%;
  160. min-width: 1280px;
  161. background-color: #e5e9f2;
  162. height: 640px
  163. }
  164. .notice-wrap .notices-box {
  165. height: 240px;
  166. }
  167. .notice-wrap .notices-box .lastest {
  168. cursor: pointer;
  169. margin-top: 15px;
  170. margin-right: 60px;
  171. height: 220px;
  172. width: 520px;
  173. float: left;
  174. }
  175. .notice-wrap .notices-box .lastest .lastest-mark {
  176. margin-top: 25px;
  177. text-align: center;
  178. line-height: 28px;
  179. width: 64px;
  180. height: 28px;
  181. background-color: #33aafe;
  182. color: #fff;
  183. font-size: 24px;
  184. font-family: Arial;
  185. }
  186. .notice-wrap .notices-box .lastest .lastest-title {
  187. padding-top: 12px;
  188. clear: both;
  189. color: #444;
  190. font-size: 26px;
  191. font-weight: bold;
  192. }
  193. .notice-wrap .notices-box .lastest .lastest-date {
  194. padding-top: 20px;
  195. color: #999;
  196. font-size: 18px;
  197. font-family: Arial;
  198. }
  199. .notice-wrap .notices-box .notice-list {
  200. width: 620px;
  201. float: left;
  202. }
  203. .notice-wrap .notices-box .notice-list li {
  204. list-style-type: disc;
  205. padding: 10px 0 10px 8px;
  206. font-size: 14px;
  207. color: #20a0ff;
  208. cursor: pointer;
  209. }
  210. .notice-wrap .notices-box .notice-list li .date {
  211. color: #999;
  212. float: right;
  213. }
  214. .notice-wrap .notices-box .notice-list li:first-child {
  215. margin-top: 10px;
  216. }
  217. .notice-wrap .notices-box .notice-list li .title {
  218. display: inline-block;
  219. color: #444;
  220. font-size: 14px;
  221. overflow: hidden;
  222. text-overflow: ellipsis;
  223. white-space: nowrap;
  224. width: 350px;
  225. vertical-align: top;
  226. }
  227. .notice-wrap .notices-box .notice-list li .title:hover {
  228. color: #20a0ff;
  229. }
  230. .home-activity .activities {
  231. min-height: 300px;
  232. overflow: hidden
  233. }
  234. .home-activity .activities .activity {
  235. margin-top: 30px;
  236. margin-right: 25px;
  237. margin-bottom: 30px;
  238. width: 383px;
  239. float: left;
  240. cursor: pointer;
  241. border: 1px solid #ddd;
  242. box-sizing: border-box
  243. }
  244. .home-activity .activities .activity:hover {
  245. box-shadow: 0 26px 40px -24px rgba(0,36,100,.3);
  246. transform: translateY(-6px);
  247. transition: all .3s ease 0s
  248. }
  249. .home-activity .activities .activity:nth-child(3n) {
  250. margin-right: 0
  251. }
  252. .img-box {
  253. height: 210px
  254. }
  255. .img-box .state {
  256. padding: 5px 8px;
  257. line-height: 20px;
  258. position: relative;
  259. left: 0;
  260. top: 3px;
  261. z-index: 1;
  262. background-color: #13ce66;
  263. color: #fff
  264. }
  265. .img-box img {
  266. width: 382px;
  267. height: 210px;
  268. position: relative;
  269. left: 0;
  270. top: -21px;
  271. padding-top: 1px
  272. }
  273. .infos {
  274. background-color: #fff
  275. }
  276. .infos .actName {
  277. color: #444;
  278. font-size: 16px;
  279. padding: 20px 10px 10px 20px;
  280. overflow: hidden;
  281. text-overflow: ellipsis;
  282. white-space: nowrap;
  283. width: 280px
  284. }
  285. .infos .actOrganizer {
  286. color: #999;
  287. font-size: 14px;
  288. padding-left: 20px;
  289. padding-bottom: 20px
  290. }
  291. .infos .actTime {
  292. color: #aaa;
  293. font-size: 14px;
  294. padding-left: 20px;
  295. padding-bottom: 10px
  296. }
  297. .view-more {
  298. text-decoration: none;
  299. float: right
  300. }
  301. </style>