TravelPlague.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <div class="dont-miss">
  3. <SearchBar class="search-bar" @search="onSearch"></SearchBar>
  4. <TabbarSmall :tabList="['景点开放', '出行政策']" @change="onTabbarChange"></TabbarSmall>
  5. <div class="card-wrap" v-show="activeTabbarIdx === 0">
  6. <article
  7. v-for="(item, index) in attractionList"
  8. :key="index"
  9. >
  10. <img :src="item.img" alt="" draggable="false">
  11. <h2>{{item.title}}</h2>
  12. <div class="location">
  13. <img class="icon" src="@/assets/img/service/address.png" alt="" draggable="false">
  14. <span>{{item.location}}</span>
  15. </div>
  16. </article>
  17. </div>
  18. <div class="policy" v-show="activeTabbarIdx === 1">
  19. <div class="banner-wrap">
  20. <img class="banner" src="@/assets/img/service/plague-banner.jpg" alt="" draggable="false">
  21. </div>
  22. <ul class="tag-list">
  23. <li
  24. class="tag"
  25. v-for="(item, index) in policyTagList"
  26. :key="index"
  27. >
  28. {{item}}
  29. </li>
  30. </ul>
  31. <div class="article-wrap">
  32. <article
  33. v-for="(item, index) in policyList"
  34. :key="index"
  35. >
  36. <div class="left-wrap">
  37. <h2>{{item.title}}</h2>
  38. <span class="time">{{item.time}}</span>
  39. </div>
  40. <div class="right-wrap">
  41. <img :src="item.img" alt="" draggable="false">
  42. </div>
  43. </article>
  44. </div>
  45. </div>
  46. </div>
  47. </template>
  48. <script>
  49. import SearchBar from "@/components/SearchRedBtn.vue";
  50. import TabbarSmall from "@/components/TabbarSmall.vue";
  51. // import Select from "@/components/Select.vue";
  52. export default {
  53. components: {
  54. SearchBar,
  55. TabbarSmall,
  56. // Select,
  57. },
  58. data() {
  59. return {
  60. activeTabbarIdx: 0,
  61. attractionList: [
  62. {
  63. img: require(`@/assets/img/service/【西洋建筑】.png`),
  64. title: '芜湖老海关',
  65. location: '芜湖市新芜区滨江北路',
  66. },
  67. {
  68. img: require(`@/assets/img/service/【西洋建筑】.png`),
  69. title: '芜湖老海关',
  70. location: '芜湖市新芜区滨江北路',
  71. },
  72. {
  73. img: require(`@/assets/img/service/【西洋建筑】.png`),
  74. title: '芜湖老海关',
  75. location: '芜湖市新芜区滨江北路',
  76. },
  77. {
  78. img: require(`@/assets/img/service/【西洋建筑】.png`),
  79. title: '芜湖老海关',
  80. location: '芜湖市新芜区滨江北路',
  81. },
  82. {
  83. img: require(`@/assets/img/service/【西洋建筑】.png`),
  84. title: '芜湖老海关',
  85. location: '芜湖市新芜区滨江北路',
  86. },
  87. {
  88. img: require(`@/assets/img/service/【西洋建筑】.png`),
  89. title: '芜湖老海关',
  90. location: '芜湖市新芜区滨江北路',
  91. },
  92. {
  93. img: require(`@/assets/img/service/【西洋建筑】.png`),
  94. title: '芜湖老海关',
  95. location: '芜湖市新芜区滨江北路',
  96. },
  97. {
  98. img: require(`@/assets/img/service/【西洋建筑】.png`),
  99. title: '芜湖老海关',
  100. location: '芜湖市新芜区滨江北路',
  101. },
  102. ],
  103. policyTagList: [
  104. '来(返)芜湖政策',
  105. '离芜出行政策',
  106. '核酸检测',
  107. ],
  108. policyList: [
  109. {
  110. title: '来(返)芜湖人员健康管理风险提醒',
  111. time: '20222-10-10 17:00:52',
  112. img: require('@/assets/img/service/plague-banner.jpg')
  113. },
  114. {
  115. title: '来(返)芜湖人员健康管理风险提醒',
  116. time: '20222-10-10 17:00:52',
  117. img: require('@/assets/img/service/plague-banner.jpg')
  118. },
  119. {
  120. title: '来(返)芜湖人员健康管理风险提醒',
  121. time: '20222-10-10 17:00:52',
  122. img: require('@/assets/img/service/plague-banner.jpg')
  123. },
  124. {
  125. title: '来(返)芜湖人员健康管理风险提醒',
  126. time: '20222-10-10 17:00:52',
  127. img: require('@/assets/img/service/plague-banner.jpg')
  128. },
  129. {
  130. title: '来(返)芜湖人员健康管理风险提醒',
  131. time: '20222-10-10 17:00:52',
  132. img: require('@/assets/img/service/plague-banner.jpg')
  133. },
  134. {
  135. title: '来(返)芜湖人员健康管理风险提醒',
  136. time: '20222-10-10 17:00:52',
  137. img: require('@/assets/img/service/plague-banner.jpg')
  138. },
  139. ]
  140. }
  141. },
  142. computed: {
  143. },
  144. methods: {
  145. onSearch() {
  146. },
  147. onTabbarChange(idx) {
  148. this.activeTabbarIdx = idx
  149. }
  150. }
  151. }
  152. </script>
  153. <style lang="less" scoped>
  154. .dont-miss {
  155. background-color: #fff;
  156. height: calc(100% - 80px);
  157. overflow: auto;
  158. padding: 3.3vw 4.5vw 4.5vw 4.5vw;
  159. display: flex;
  160. flex-direction: column;
  161. > .search-bar {
  162. flex: 0 0 auto;
  163. }
  164. > .select-wrap {
  165. flex: 0;
  166. margin: 3.5vw 0 4vw 0;
  167. > .select {
  168. width: 15vw;
  169. display: inline-block;
  170. margin-right: 12.5vw;
  171. }
  172. }
  173. > .card-wrap {
  174. flex: 1 0 1px;
  175. overflow: auto;
  176. margin-right: -4vw;
  177. > article {
  178. width: 43.6vw;
  179. height: 62.7vw;
  180. display: inline-block;
  181. background: #F7F8FA;
  182. border-radius: 1.1vw;
  183. overflow: hidden;
  184. margin-right: 3.5vw;
  185. margin-bottom: 4vw;
  186. > img {
  187. width: 100%;
  188. height: 44.5vw;
  189. object-fit: cover;
  190. margin-right: 1.7vw;
  191. }
  192. > h2 {
  193. font-size: 3.2vwx;
  194. font-family: Source Han Serif CN;
  195. font-weight: bold;
  196. color: #333333;
  197. line-height: 40px;
  198. margin-left: 2.3vw;
  199. margin-right: 2.3vw;
  200. margin-bottom: 4.4vw;
  201. font-size: 3.2vw;
  202. font-weight: bold;
  203. color: #333333;
  204. line-height: 4vw;
  205. overflow: hidden;
  206. white-space: pre;
  207. text-overflow: ellipsis;
  208. }
  209. > .location {
  210. margin-left: 2.3vw;
  211. margin-right: 2.3vw;
  212. display: flex;
  213. align-items: center;
  214. > img {
  215. width: 3.2vw;
  216. height: 3.2vw;
  217. margin-right: 1.1vw;
  218. }
  219. > span {
  220. font-size: 2.7vw;
  221. color: #333333;
  222. overflow: hidden;
  223. white-space: pre;
  224. text-overflow: ellipsis;
  225. }
  226. }
  227. }
  228. }
  229. > .policy {
  230. > .banner-wrap {
  231. border-radius: 1.1vw;
  232. overflow: hidden;
  233. margin-bottom: 5.6vw;
  234. > .banner {
  235. width: 100%;
  236. }
  237. }
  238. > .tag-list {
  239. display: block;
  240. margin-top: calc(9.2vw - 3.2vw);
  241. > .tag {
  242. background: #F4F4F4;
  243. border-radius: 0.5vw;
  244. padding: 2.5vw 4vw;
  245. font-size: 2.7vw;
  246. color: #333333;
  247. margin-right: 4.5vw;
  248. margin-bottom: 3.2vw;
  249. display: inline-block;
  250. overflow: hidden;
  251. }
  252. }
  253. > .article-wrap {
  254. height: 28vw;
  255. > article {
  256. background: #F7F8FA;
  257. border-radius: 1.1vw;
  258. display: flex;
  259. overflow: hidden;
  260. margin-bottom: 6vw;
  261. > .left-wrap {
  262. flex: 0 1 auto;
  263. width: 47.7vw;
  264. padding: 5.2vw 3.5vw;
  265. display: flex;
  266. flex-direction: column;
  267. justify-content: space-between;
  268. > h2 {
  269. font-size: 3.2vw;
  270. font-weight: bold;
  271. color: #333333;
  272. line-height: 4vw;
  273. display: -webkit-box;
  274. -webkit-box-orient: vertical;
  275. -webkit-line-clamp: 2;
  276. overflow: hidden;
  277. }
  278. > .time {
  279. font-size: 2.7vw;
  280. color: #333333;
  281. }
  282. }
  283. > .right-wrap {
  284. flex: 0 1 auto;
  285. width: 43.6vw;
  286. > img {
  287. width: 100%;
  288. height: 100%;
  289. object-fit: cover;
  290. }
  291. }
  292. }
  293. }
  294. }
  295. }
  296. </style>