join-us.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <div>
  3. <!-- banner区域 start -->
  4. <div class="swiper-container banner" id="banner">
  5. <div class="swiper-wrapper">
  6. <div class="swiper-slide">
  7. <img src="/img/contact-banner.jpg" alt="" />
  8. </div>
  9. </div>
  10. </div>
  11. <!-- banner区域 end -->
  12. <div class="main">
  13. <div class="tabbar">
  14. <div class="container">
  15. <template v-for="(tab, index) in tabList">
  16. <div class="tab" :class="{ on: tab.id === current }" :key="tab.en" @click="onTabChange(tab)">
  17. <div class="name" v-text="tab.name"></div>
  18. <div class="en" v-text="tab.en"></div>
  19. </div>
  20. <div class="line" :key="index" v-if="index < 2"></div>
  21. </template>
  22. </div>
  23. </div>
  24. <div class="tab-content container">
  25. <!-- 职位列表 -->
  26. <div class="tab-item job" v-show="current === 2">
  27. <div class="section-title">
  28. <img src="/img/contact-title-job.png" alt="职位申请" />
  29. <h3>职位申请</h3>
  30. </div>
  31. <div class="content">
  32. <ContactJoinUs />
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. head() {
  42. return {
  43. title: '首页-艾斯佰丽官网-加入我们',
  44. }
  45. },
  46. data() {
  47. return {
  48. tabList: [],
  49. current: 2,
  50. }
  51. },
  52. asyncData() {
  53. return {
  54. tabList: [
  55. {
  56. id: 1,
  57. name: '联系方式',
  58. en: 'contact',
  59. url: '/contact.html',
  60. },
  61. {
  62. id: 2,
  63. name: '人才招聘',
  64. en: 'join us',
  65. url: '/contact/job.html',
  66. },
  67. {
  68. id: 3,
  69. name: '在线咨询',
  70. en: 'chat with us',
  71. url: '/contact/consult.html',
  72. },
  73. ],
  74. }
  75. },
  76. mounted() {
  77. new Swiper('#banner', {
  78. loop: false, // 循环模式选项
  79. })
  80. },
  81. methods: {
  82. onTabChange(tab) {
  83. // this.current = tab.id
  84. window.open(tab.url, '_self')
  85. },
  86. },
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. @media screen and (min-width: 768px) {
  91. .main {
  92. .tabbar {
  93. background: #eeeeee;
  94. height: 100px;
  95. .container {
  96. display: flex;
  97. justify-content: space-between;
  98. align-items: center;
  99. height: 100%;
  100. }
  101. .line {
  102. height: 46px;
  103. width: 3px;
  104. background: #aaaaaa;
  105. }
  106. .tab {
  107. display: flex;
  108. justify-content: center;
  109. align-items: center;
  110. flex-direction: column;
  111. position: relative;
  112. height: 100%;
  113. width: 16%;
  114. user-select: none;
  115. .name {
  116. font-size: 29px;
  117. font-weight: 400;
  118. color: #000000;
  119. text-align: center;
  120. }
  121. .en {
  122. font-size: 17px;
  123. font-weight: 300;
  124. color: #000000;
  125. text-align: center;
  126. margin-top: 10px;
  127. text-transform: uppercase;
  128. }
  129. &:hover {
  130. cursor: pointer;
  131. }
  132. &::after {
  133. content: '';
  134. position: absolute;
  135. opacity: 0;
  136. width: 0;
  137. height: 0;
  138. border-style: solid;
  139. border-width: 0 12px 8px 12px;
  140. border-color: transparent transparent #f3920d transparent;
  141. bottom: 0;
  142. }
  143. &.on {
  144. &::after {
  145. opacity: 1;
  146. }
  147. .name,
  148. .en {
  149. color: #f3920d;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. @media screen and (max-width: 768px) {
  157. .main {
  158. .tabbar {
  159. background: #eeeeee;
  160. padding: 0 0.6rem;
  161. height: 0.8rem;
  162. .container {
  163. display: flex;
  164. justify-content: space-between;
  165. align-items: center;
  166. height: 100%;
  167. }
  168. .line {
  169. height: 0.4rem;
  170. width: 0.02rem;
  171. background: #aaaaaa;
  172. }
  173. .tab {
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. flex-direction: column;
  178. position: relative;
  179. height: 100%;
  180. width: 24%;
  181. user-select: none;
  182. .name {
  183. font-size: 0.26rem;
  184. font-weight: 400;
  185. color: #000000;
  186. text-align: center;
  187. }
  188. .en {
  189. display: none;
  190. }
  191. &:hover {
  192. cursor: pointer;
  193. }
  194. &::after {
  195. content: '';
  196. position: absolute;
  197. opacity: 0;
  198. width: 0;
  199. height: 0;
  200. border-style: solid;
  201. border-width: 0 0.12rem 0.08rem 0.12rem;
  202. border-color: transparent transparent #f3920d transparent;
  203. bottom: 0;
  204. }
  205. &.on {
  206. &::after {
  207. opacity: 1;
  208. }
  209. .name,
  210. .en {
  211. color: #f3920d;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. </style>