index.vue 8.1 KB

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