exam.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="exam">
  3. <div class="exam_list_box_width">
  4. <div class="exam_box" v-for="item in listdata" v-if="index">
  5. <div class="exam_title"><div class="exam_name">{{item.title}}</div><i>{{item.num}}</i></div>
  6. <div class="exam_img"><img :src="item.img" /></div>
  7. <ul class="exam_list">
  8. <li class="exam_list_data" v-for="items in item.data">
  9. <div class="exam_list_title"><a :href="items.url" target="_blank">{{items.title}}</a></div>
  10. <div class="look"><Icon type="ios-eye" size="16" />{{items.loocknum}}</div>
  11. </li>
  12. </ul>
  13. </div>
  14. <div class="exam_box" v-for="item in arealistdata" v-if="areaindex">
  15. <div class="exam_title"><div class="exam_name">{{item.title}}</div><i>{{item.num}}</i></div>
  16. <div class="exam_img"><img :src="item.img" /></div>
  17. <ul class="exam_list">
  18. <li class="exam_list_data" v-for="items in item.data">
  19. <div class="exam_list_title"><a :href="items.url" target="_blank">{{items.title}}</a></div>
  20. <div class="look"><Icon type="ios-eye" size="16" />{{items.loocknum}}</div>
  21. </li>
  22. </ul>
  23. </div>
  24. <div class="exam_box" v-for="item in schoollistdata" v-if="schoolindex">
  25. <div class="exam_title"><div class="exam_name">{{item.title}}</div><i>{{item.num}}</i></div>
  26. <div class="exam_img"><img :src="item.img" /></div>
  27. <ul class="exam_list">
  28. <li class="exam_list_data" v-for="items in item.data">
  29. <div class="exam_list_title"><a :href="items.url" target="_blank">{{items.title}}</a></div>
  30. <div class="look"><Icon type="ios-eye" size="16" />{{items.loocknum}}</div>
  31. </li>
  32. </ul>
  33. </div>
  34. <div class="clear"></div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. index: false,
  43. areaindex: false,
  44. school:false,
  45. listdata: [
  46. {
  47. "id": 1, "title": '中考专区', "num": '980', "img": require("../../assets/image/resource/exam_img_one.png"), data: [
  48. { "type": '物理', "title": '2018年成都市中考物理试卷.doc', "loocknum": '750',"url":'/details' },
  49. { "type": '英语', "title": '2018年成都市中考英语试卷.doc', "loocknum": '920', "url": '/details'},
  50. { "type": '数学', "title": '2018年成都市中考数学试卷.doc', "loocknum": '1006', "url": '/details'},
  51. { "type": '化学', "title": '2018年成都市中考化学试卷.doc', "loocknum": '450', "url": '/details'},
  52. ]
  53. },
  54. {
  55. "id": 2, "title": '高考专区', "num": '1080', "img": require("../../assets/image/resource/exam_img_two.png"), data: [
  56. { "type": '语文', "title": '2018年成都市高考语文试卷.doc', "loocknum": '1750', "url": '/details' },
  57. { "type": '英语', "title": '2018年成都市高考英语试卷.doc', "loocknum": '1220', "url": '/details' },
  58. { "type": '数学', "title": '2018年成都市高考数学试卷.doc', "loocknum": '1606', "url": '/details' },
  59. { "type": '历史', "title": '2018年成都市高考历史试卷.doc', "loocknum": '1450', "url": '/details' },
  60. ]
  61. },
  62. {
  63. "id": 3, "title": '优课专区', "num": '900', "img": require("../../assets/image/resource/exam_img_three.png"), data: [
  64. { "type": '优课', "title": '古诗二首', "loocknum": '350', "url":'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=8aee808f62fbe7ab016300a9e6a22e65&t=2&sessionKey=3xCsBKvbaWPKVmk1Yk9Y' },
  65. { "type": '优课', "title": '我的影子', "loocknum": '620', "url":'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=8aee80a562bc9be10162be0f7167109d&t=2&sessionKey=ey65FtcgEGMh4uHprmSE' },
  66. { "type": '优课', "title": '路程、时间与速度', "loocknum": '606', "url":'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=ff8080815d07057f015d07443709007a&t=2&sessionKey=wj0ZhZK7YbjgxhIBJiGw' },
  67. { "type": '优课', "title": '振兴中华,我们的责任', "loocknum": '535', "url":'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=ff8080815cb052d2015cbebe8a1b23fa&t=2&sessionKey=EvC9kFlYWNaWFm1tKsG0' },
  68. ]
  69. },
  70. ],
  71. arealistdata: [
  72. {
  73. "id": 1, "title": '中考专区', "num": '980', "img": require("../../assets/image/resource/exam_img_one.jpg"), data: [
  74. { "type": '物理', "title": '2018年成都市高新区联考物理试卷.doc', "loocknum": '750', "url": '/details' },
  75. { "type": '英语', "title": '2018年成都市高新区联考英语试卷.doc', "loocknum": '920', "url": '/details' },
  76. { "type": '数学', "title": '2018年成都市高新区联考数学试卷.doc', "loocknum": '1006', "url": '/details' },
  77. ]
  78. },
  79. {
  80. "id": 2, "title": '高考专区', "num": '1080', "img": require("../../assets/image/resource/exam_img_two.jpg"), data: [
  81. { "type": '语文', "title": '2018年成都市高新区联考语文试卷.doc', "loocknum": '1750', "url": '/details' },
  82. { "type": '英语', "title": '2018年成都市高新区联考英语试卷.doc', "loocknum": '1220', "url": '/details' },
  83. ]
  84. },
  85. {
  86. "id": 3, "title": '优课专区', "num": '900', "img": require("../../assets/image/resource/exam_img_three.jpg"), data: [
  87. { "type": '优课', "title": '我的影子', "loocknum": '620', "url": 'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=8aee80a562bc9be10162be0f7167109d&t=2&sessionKey=ey65FtcgEGMh4uHprmSE' },
  88. { "type": '优课', "title": '路程、时间与速度', "loocknum": '606', "url": 'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=ff8080815d07057f015d07443709007a&t=2&sessionKey=wj0ZhZK7YbjgxhIBJiGw' },
  89. { "type": '优课', "title": '古诗二首', "loocknum": '350', "url": 'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=8aee808f62fbe7ab016300a9e6a22e65&t=2&sessionKey=3xCsBKvbaWPKVmk1Yk9Y' },
  90. ]
  91. },
  92. ],
  93. schoollistdata: [
  94. {
  95. "id": 1, "title": '考试专区', "num": '980', "img": require("../../assets/image/resource/exam_school_one.png"), data: [
  96. { "type": '语文', "title": '2018成都师范银都紫藤小学语文试卷.doc', "loocknum": '750', "url": '/details' },
  97. { "type": '英语', "title": '2018成都师范银都紫藤小学英语试卷.doc', "loocknum": '920', "url": '/details' },
  98. { "type": '数学', "title": '2018成都师范银都紫藤小学数学试卷.doc', "loocknum": '1006', "url": '/details' },
  99. ]
  100. },
  101. {
  102. "id": 2, "title": '期末考专区', "num": '1080', "img": require("../../assets/image/resource/exam_school_two.png"), data: [
  103. { "type": '语文', "title": '2018成都市师范银都紫藤小学语文试卷.doc', "loocknum": '170', "url": '/details' },
  104. ]
  105. },
  106. {
  107. "id": 3, "title": '优课专区', "num": '900', "img": require("../../assets/image/resource/exam_img_three.jpg"), data: [
  108. { "type": '优课', "title": '我的影子', "loocknum": '20', "url": 'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=8aee80a562bc9be10162be0f7167109d&t=2&sessionKey=ey65FtcgEGMh4uHprmSE' },
  109. { "type": '优课', "title": '路程、时间与速度', "loocknum": '66', "url": 'http://1s1k.eduyun.cn/portal/redesign/index/index.jsp?sdResIdCaseId=ff8080815d07057f015d07443709007a&t=2&sessionKey=wj0ZhZK7YbjgxhIBJiGw' },
  110. ]
  111. },
  112. ],
  113. }
  114. },
  115. created() {
  116. this.init();
  117. },
  118. methods: {
  119. init() {
  120. if (this.$route.path == '/resource') {
  121. this.index = true
  122. } else if (this.$route.path == '/arearesource') {
  123. this.areaindex = true;
  124. } else if (this.$route.path == '/schoolresource') {
  125. this.schoolindex = true;
  126. }
  127. }
  128. }
  129. }
  130. </script>
  131. <style scoped>
  132. .exam {
  133. width: 100%;
  134. padding: 0% 11% 0% 11%;
  135. float: left;
  136. background-color: #f3f3f3;
  137. margin:0 auto;
  138. }
  139. .exam_list_box_width {
  140. width: 1200px;
  141. margin:0 auto;
  142. }
  143. .exam_box {
  144. width: 30%;
  145. height: 300px;
  146. margin: 1% 0% 1% 4.5%;
  147. text-align: center;
  148. float: left;
  149. border: #ececec solid 1px;
  150. padding: 1%;
  151. box-shadow: 2px 2px 10px rgba(15,4,9,0.05);
  152. background-color: #fff;
  153. padding-left:20px;
  154. }
  155. .exam_box:nth-child(1) {
  156. margin: 1% 1% 1% 0%;
  157. }
  158. .exam_title {
  159. width: 100%;
  160. display: block;
  161. float: left;
  162. }
  163. .exam_name {
  164. font-size: 24px;
  165. border-bottom: #288add solid 1px;
  166. float: left;
  167. }
  168. .exam_title i {
  169. float: left;
  170. margin: 8px 0px 0px 8px;
  171. height: 20px;
  172. line-height: 20px;
  173. border-radius: 10px;
  174. background: #8ea9b9;
  175. font-size: 14px;
  176. padding: 0px 10px;
  177. color: #fff;
  178. }
  179. .exam_img {
  180. margin-top: 10px;
  181. float: left;
  182. }
  183. .exam_img img {
  184. width:106%;
  185. }
  186. .exam_list {
  187. width: 100%;
  188. height: auto;
  189. padding: 1% 1% 1% 0%;
  190. list-style: none;
  191. float: left;
  192. text-align: left;
  193. }
  194. .exam_list_data {
  195. width: 100%;
  196. float: left;
  197. padding:4px 2px;
  198. border-bottom:1px dashed #ddd;
  199. }
  200. .exam_list_title {
  201. float: left;
  202. font-size:15px;
  203. }
  204. .look {
  205. float: right;
  206. }
  207. a {
  208. text-decoration: none;
  209. color: #333;
  210. }
  211. .clear {
  212. clear: both
  213. }
  214. </style>