pageHead.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <!-- 页面头部 -->
  3. <header>
  4. <!-- 顶部导航 -->
  5. <nav class="headerNav">
  6. <div class="inner">
  7. <div class="left">
  8. <span>中农兴业网团</span>
  9. <span>旗下网站:
  10. <span>农业百强网站(政府类30强)</span>
  11. </span>
  12. </div>
  13. <div class="mid">
  14. <button class="login" @click="goLogin">登录</button>
  15. <button class="reg" @click="goRegister">注册</button>
  16. <button class="changePwd">修改密码</button>
  17. </div>
  18. <div class="right">
  19. <span>
  20. <em class="home"></em>
  21. 设为首页
  22. </span>
  23. <span>
  24. <em class="collection"></em>
  25. 加入收藏
  26. </span>
  27. </div>
  28. </div>
  29. </nav>
  30. <!-- 头部logo -->
  31. <div class="headerLogo">
  32. <div class="inner">
  33. <img src="../../static/images/image 36@2x.png" alt="" class="left">
  34. <div class="search">
  35. <em></em>
  36. <input type="text" placeholder="输入关键词">
  37. <button>搜索</button>
  38. </div>
  39. <ul class="serve">
  40. <li>
  41. <img src="../../static/images/huiyuan 1.png" alt="">
  42. <p>会员服务</p>
  43. </li>
  44. <li>
  45. <img src="../../static/images/lingquguanggao 1.png" alt="">
  46. <p>广告服务</p>
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. </header>
  52. </template>
  53. <script setup>
  54. let goLogin = () => {
  55. navigateTo('/login')
  56. }
  57. let goRegister = () => {
  58. navigateTo('/register')
  59. }
  60. </script>
  61. <style lang="less" scoped>
  62. /* 页面头部 */
  63. header {
  64. width: 100%;
  65. height: 201px;
  66. font-size: 12px;
  67. font-family: PingFang SC-Regular;
  68. color: #666666;
  69. background: url("../../static/images/Group 1505.png") no-repeat;
  70. }
  71. .headerNav {
  72. width: 100%;
  73. height: 42px;
  74. line-height: 42px;
  75. background-color: #fff;
  76. }
  77. .headerNav .left>span {
  78. margin-right: 47px;
  79. }
  80. .headerNav .mid {
  81. float: left;
  82. margin-left: 100px;
  83. button {
  84. font-size: 12px;
  85. color: #666666;
  86. border: none;
  87. background-color: #fff;
  88. }
  89. .login {
  90. width: 36px;
  91. height: 19px;
  92. color: #fff;
  93. border-radius: 4px;
  94. background-color: #028E21;
  95. margin-right: 15px;
  96. }
  97. .reg {
  98. margin-right: 30px;
  99. }
  100. }
  101. .headerNav .right {
  102. span {
  103. margin-left: 26px;
  104. }
  105. .home,
  106. .collection {
  107. display: inline-block;
  108. width: 16px;
  109. height: 16px;
  110. vertical-align: -3px;
  111. }
  112. .home {
  113. background-image: url("../../static/images/Iconly/Light/Home.png");
  114. }
  115. .collection {
  116. background-image: url("../../static/images/Iconly/Light/Star.png");
  117. }
  118. }
  119. /* // 头部logo */
  120. .headerLogo {
  121. height: 156px;
  122. border-bottom: 3px solid #006616;
  123. .inner>img {
  124. width: 342px;
  125. height: 72px;
  126. margin-top: 51px;
  127. }
  128. /* // 搜索框部分 */
  129. .search {
  130. float: left;
  131. width: 440px;
  132. height: 40px;
  133. background-color: #fff;
  134. line-height: 40px;
  135. margin-left: 39px;
  136. margin: 71px 39px 48px;
  137. position: relative;
  138. em {
  139. display: inline-block;
  140. width: 30px;
  141. height: 30px;
  142. background: url("../../static/images/Iconly/Broken/Search.png") no-repeat;
  143. position: absolute;
  144. top: 5px;
  145. left: 15px;
  146. }
  147. input {
  148. float: left;
  149. width: 351px;
  150. height: 40px;
  151. border: none;
  152. outline: none;
  153. padding-left: 65px;
  154. box-sizing: border-box;
  155. border: 1px solid #028E21;
  156. border-right: none;
  157. border-radius: 4px 0px 0px 4px;
  158. }
  159. button {
  160. float: right;
  161. width: 89px;
  162. height: 40px;
  163. background-color: #028E21;
  164. border-radius: 0px 4px 4px 0px;
  165. border: none;
  166. font-size: 14px;
  167. color: #fff;
  168. font-family: PingFang SC, PingFang SC;
  169. font-weight: 500;
  170. }
  171. }
  172. /* // 右侧小图标 */
  173. .serve {
  174. float: right;
  175. height: 60px;
  176. margin-top: 60px;
  177. margin-right: 60px;
  178. >li {
  179. float: left;
  180. height: 64px;
  181. margin-left: 48px;
  182. }
  183. >li>img {
  184. width: 29px;
  185. height: 29px;
  186. padding: 8px 14px;
  187. }
  188. >li>p {
  189. height: 28px;
  190. text-align: center;
  191. color: #666666;
  192. }
  193. }
  194. }
  195. </style>