pageHead.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956
  1. <template>
  2. <header>
  3. <div class="headerContainer">
  4. <!-- 欢迎导航 -->
  5. <div class="headerBox">
  6. <div class="headerMain">
  7. <div class="headerBox_left">欢迎来到三农调研中心官网!</div>
  8. <div class="headerBox_right">
  9. <NuxtLink to="#">收藏</NuxtLink>
  10. <span>|</span>
  11. <NuxtLink to="/">人员查询</NuxtLink>
  12. <span>|</span>
  13. <NuxtLink to="/">车辆查询</NuxtLink>
  14. <span>|</span>
  15. <NuxtLink to="/" @click="phone_close_fun">用户登录</NuxtLink>
  16. </div>
  17. </div>
  18. </div>
  19. <!-- banner部分 -->
  20. <div class="logoBox">
  21. <!-- logo -->
  22. <div class="logoBox_left">
  23. <NuxtLink to="/">
  24. <img src="../../public/header/logo.png" alt="logo">
  25. </NuxtLink>
  26. </div>
  27. <!-- 轮播文字 -->
  28. <div class="logoBox_right">
  29. <div class="logoBox_right_top"></div>
  30. <div class="scroll-rotate-container">
  31. <div class="gdbox">
  32. <div class="gundong item1">
  33. <h2 class="topText">
  34. <NuxtLink to="/" >三农调研中心</NuxtLink>
  35. <span>官网</span>
  36. </h2>
  37. <div class="bottomText">
  38. <h4 class="g_text">
  39. <!--<NuxtLink to="#">全国三农信息一体化应用平台</NuxtLink>-->
  40. </h4>
  41. <h2 class="a_text">
  42. <span>
  43. <NuxtLink to="/">sannongdy.org.cn</NuxtLink>
  44. </span>
  45. </h2>
  46. </div>
  47. </div>
  48. <div class="gundong item2">
  49. <h2 class="topText">
  50. <NuxtLink to="/" >全国三农问题调研</NuxtLink>
  51. <!--<span>官网</span>-->
  52. </h2>
  53. <div class="bottomText">
  54. <h4 class="g_text">
  55. <NuxtLink to="#">全国三农信息一体化应用平台</NuxtLink>
  56. </h4>
  57. <h2 class="a_text">
  58. <span>
  59. <NuxtLink to="/">sannongdy.org.cn</NuxtLink>
  60. </span>
  61. </h2>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </header>
  70. </template>
  71. <script setup>
  72. // 引入全局状态-HomePanel_out
  73. const panelVisible = useState('panelVisible')
  74. //1.加载基本依赖 start ---------------------------------------->
  75. import { ref, watch, onMounted } from 'vue'
  76. import { ElDialog, ElMessage } from 'element-plus'
  77. import { getToken, setToken, removeToken } from '@/store/useCookieStore'
  78. import { setTicket, removeTicket } from '@/store/useticketStore'
  79. //网站地址
  80. const { $webUrl, $CwebUrl, $BwebUrl, $LoginWebUrl } = useNuxtApp()
  81. //1.加载基本依赖 end ---------------------------------------->
  82. //1.登录逻辑 start ---------------------------------------->
  83. let ticket = ref('')
  84. let token = ref('')
  85. let route = useRoute()
  86. //页面每次刷新先判断一下用户状态是否已经过期了
  87. //如果没有过期再储存token
  88. ticket.value = route.query.ticket
  89. token.value = route.query.admintoken
  90. if (ticket.value) {
  91. setTicket(ticket.value)
  92. }
  93. if (token.value) {
  94. setToken(token.value)
  95. }
  96. //搜索框
  97. let keyword = useState('keyword', () => '')
  98. //用户名
  99. let username = useState('username', () => '用户中心')
  100. //是否删除
  101. let isDel = useState('isDel', () => 1)
  102. //是否显示用户中心
  103. let isShow = useState('isShow', () => false)
  104. let token1 = useState("token1", () => '')
  105. let showToken = useState("showToken", () => '')
  106. token1.value = getToken()
  107. //检测登录状态
  108. let tokenStatus = ref('');
  109. tokenStatus.value = getToken()
  110. if (tokenStatus.value == undefined) {
  111. console.log("-------------------------------------未获取到用户token")
  112. } else {
  113. console.log("--------------------------------已获取到用户token")
  114. }
  115. //点击登录按钮
  116. let goLogin = () => {
  117. //开启线上登录模式 start---------------------------------------->
  118. isDel.value = 0
  119. token1.value = getToken()
  120. window.open($BwebUrl + "/#/login?backurl=" + $CwebUrl, '_blank');
  121. //开启线上登录模式 end---------------------------------------->
  122. //开启本地登录模式 start---------------------------------------->
  123. // window.location.href = $BwebUrl + "/auth/login.php?backurl=" + $CwebUrl;
  124. //"http://adminpre.bjzxtw.org.cn/auth/login.php?backurl=http://nwpre.bjzxtw.org.cn";
  125. //开启本地登录模式 end---------------------------------------->
  126. }
  127. let dialogTableVisible = ref(false)
  128. let dialogTableVisible_phone = ref(false)
  129. //点击注册按钮
  130. let goRegister = () => {
  131. dialogTableVisible.value = true
  132. }
  133. //点击用户中心
  134. let userCenter = () => {
  135. if (isShow.value) {
  136. isShow.value = false
  137. return
  138. } else {
  139. isShow.value = true
  140. return
  141. }
  142. }
  143. // 添加点击事件处理函数
  144. const handleClickOutside = (event) => {
  145. // 获取用户信息菜单元素
  146. const userInfoMenu = document.querySelector('.userInfo11');
  147. // 获取用户按钮元素
  148. const userButton = document.querySelector('.reg img[alt="用户信息"]')?.parentElement;
  149. // 如果点击的不是菜单本身且不是用户按钮,则隐藏菜单
  150. if (userInfoMenu &&
  151. !userInfoMenu.contains(event.target) &&
  152. !userButton?.contains(event.target)) {
  153. isShow.value = false;
  154. }
  155. }
  156. //2.登录逻辑 end ---------------------------------------->
  157. //3.跳转菜单逻辑 start ---------------------------------------->
  158. let gotosystem = () => {
  159. let url = $BwebUrl + '/#/login?userurl=' + $CwebUrl;
  160. isShow.value = false;
  161. //window.location.href = url;
  162. window.open(url, '_blank');
  163. }
  164. //点击退出按钮
  165. let exit = () => {
  166. window.location.href = $CwebUrl;
  167. isDel.value = 1
  168. token1.value = getToken()
  169. isShow.value = false;
  170. let tokendata = getToken()
  171. let url = $LoginWebUrl + '/api/logout?backurl=' + $CwebUrl + '&admintoken=' + tokendata;
  172. window.location.href = url;
  173. removeToken()
  174. removeTicket()
  175. }
  176. //点击返回首页
  177. let backHome = () => {
  178. window.location.href = $CwebUrl;
  179. }
  180. //点击搜索按钮
  181. let goSearch = () => {
  182. const route = `/search/search?keyword=${keyword.value}`;
  183. window.location.href = route;
  184. }
  185. // 点击广告服务
  186. let goAdvertising = () => {
  187. // window.open('/advertising?activeName=1', '_blank');//测试
  188. //本地启动广告服务
  189. //线上启动
  190. if (getToken()) {
  191. window.open($CwebUrl + '/advertising?activeName=1', '_blank');
  192. } else {
  193. goLogin()
  194. }
  195. }
  196. //点击商圈
  197. let goTopic = () => {
  198. if (getToken()) {
  199. window.open($CwebUrl + '/topic', '_blank');
  200. } else {
  201. goLogin()
  202. }
  203. }
  204. //点击用户==手机版11
  205. let user_fun = () => {
  206. if (getToken()) {
  207. //已经登录
  208. goLogin()
  209. } else {
  210. //没有登录
  211. dialogTableVisible_phone.value = true
  212. return
  213. }
  214. }
  215. // 添加关闭对话框处理函数
  216. const phone_close_fun = () => {
  217. // 在这里可以添加关闭对话框前需要执行的逻辑
  218. dialogTableVisible_phone.value = false;
  219. // 确保对话框关闭
  220. goLogin()
  221. }
  222. // 监听token状态
  223. watch(token1, (newval, oldval) => {
  224. showToken.value = newval
  225. }, {
  226. deep: true,
  227. immediate: true,
  228. })
  229. // 获得网站logo
  230. const logo = ref("")
  231. const webSiteName = ref("")
  232. let getLogo = async () => {
  233. const responseStatus = await requestDataPromise('/web/getWebsiteHead', {
  234. method: 'GET',
  235. query: {},
  236. });
  237. if (responseStatus.code == 200) {
  238. logo.value = responseStatus.data.logo;
  239. webSiteName.value = responseStatus.data.website_name;
  240. } else if (responseStatus.code == 0) {
  241. window.location.href = $CwebUrl + '/404';
  242. }
  243. }
  244. getLogo();
  245. //3.跳转菜单逻辑 end ---------------------------------------->
  246. //4.获取广告 start ---------------------------------------->
  247. let adImg = ref({})
  248. //4.获取广告 end ---------------------------------------->
  249. //5.获取登录状态 start ---------------------------------------->
  250. // 在组件卸载时移除事件监听
  251. onUnmounted(() => {
  252. document.removeEventListener('click', handleClickOutside);
  253. })
  254. onMounted(async () => {
  255. //添加监听关闭个人中心菜单
  256. document.addEventListener('click', handleClickOutside);
  257. //从客户端获取登录状态
  258. //从客户端阶段开始 持续查询登录状态
  259. let getLoginStatus = async () => {
  260. //获得token
  261. const token = getToken();
  262. const { $webUrl, $CwebUrl } = useNuxtApp();
  263. if (token == undefined) {
  264. //如果没有获取到token 不访问后端获取在线状态
  265. console.log("没有获取到token!无需查询登录状态!")
  266. showToken.value = false;
  267. } else {
  268. //如果获取到了token 访问后端查询状态
  269. console.log("已获取到用户token,开始查询登录状态!")
  270. const queryParams = new URLSearchParams({
  271. token: getToken()
  272. });
  273. let url = `${$webUrl}/api/loginStatus?${queryParams.toString()}`
  274. const responseStatus = await fetch(url, {
  275. method: 'GET',
  276. headers: {
  277. 'Content-Type': 'application/json',
  278. 'Userurl': $CwebUrl,
  279. //'token': getToken(),
  280. 'Origin': $CwebUrl
  281. }
  282. });
  283. const result = await responseStatus.json();
  284. console.log(result)
  285. if (result.code == 200) {
  286. console.log("用户已经登录!");
  287. showToken.value = true;
  288. }
  289. if (result.code == -1) {
  290. isShow.value = false;
  291. showToken.value = false;
  292. removeToken();
  293. removeTicket();
  294. ElMessage.error('您没有权限登录该网站!')
  295. }
  296. if (result.code == -2) {
  297. isShow.value = false;
  298. showToken.value = false;
  299. removeToken();
  300. removeTicket();
  301. ElMessage.error('您已退出登录!')
  302. }
  303. }
  304. }
  305. getLoginStatus();
  306. setInterval(getLoginStatus, 3000);
  307. //从客户端获取广告
  308. //从客户端获取行政职能部门 加快打开速度
  309. const { $webUrl, $CwebUrl } = useNuxtApp();
  310. //广告1
  311. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_top`
  312. const responseAd1 = await fetch(url, {
  313. headers: {
  314. 'Content-Type': 'application/json',
  315. 'Userurl': $CwebUrl,
  316. 'Origin': $CwebUrl
  317. }
  318. });
  319. const resultAd1 = await responseAd1.json();
  320. adImg.value = resultAd1.data[0];
  321. //从客户端获取用户名
  322. let userInfoUrl = `${$webUrl}/user/getUserInfo`
  323. const userInfoResponse = await fetch(userInfoUrl, {
  324. headers: {
  325. 'Content-Type': 'application/json',
  326. 'Userurl': $CwebUrl,
  327. 'Origin': $CwebUrl
  328. }
  329. });
  330. const userInfo = await userInfoResponse.json();
  331. if (userInfo.code == 200) {
  332. username.value = userInfo.data.nickname
  333. }
  334. })
  335. //5.获取登录状态 end ---------------------------------------->
  336. //点击手机
  337. // 添加全局状态
  338. // const panelVisible = useState('panelVisible', () => false)
  339. const togglePanel = () => {
  340. panelVisible.value = true
  341. }
  342. </script>
  343. <style lang="less" scoped>
  344. //自适应 start ---------------------------------------->
  345. //大于1400px
  346. @media screen and (min-width: 1401px) {
  347. .headerContainer {
  348. width: 100%;
  349. }
  350. .headerBox {
  351. width: 100%;
  352. height: 40PX !important;
  353. margin-bottom: 20PX !important;
  354. display: flex;
  355. align-items: center;
  356. justify-content: center;
  357. background: rgba(255, 255, 255, .6);
  358. .headerMain {
  359. display: flex;
  360. align-items: center;
  361. justify-content: space-between;
  362. width: 1401PX !important;
  363. .headerBox_left {
  364. font-size: 18PX !important;
  365. color:#000;
  366. text-shadow:-1PX 0 #fff, 0PX 1PX #fff, 1PX 0 #fff, 0 -1PX #fff;
  367. }
  368. .headerBox_right {
  369. display: flex;
  370. align-items: center;
  371. justify-content: flex-end;
  372. a {
  373. font-size: 15PX !important;
  374. color:#000;
  375. text-shadow:-1PX 0 #fff, 0px 1PX #fff, 1PX 0 #fff, 0 -1PX #fff;
  376. margin-left: 6PX !important;
  377. }
  378. span {
  379. font-size: 12PX !important;
  380. // margin-left: 6PX !important;
  381. padding: 0 20PX;
  382. }
  383. }
  384. }
  385. }
  386. .logoBox {
  387. width: 1401PX !important;
  388. height: 220PX !important;
  389. margin: 0 auto;
  390. display: flex;
  391. align-items: center;
  392. justify-content: space-between;
  393. .logoBox_left {
  394. width: 200PX !important;
  395. img {
  396. width: 200PX !important;
  397. height: 161.5PX !important;
  398. margin-top: -40PX !important;
  399. }
  400. }
  401. .logoBox_right {
  402. width: 1100PX !important;
  403. height: 160PX !important;
  404. //background:blue;
  405. .logoBox_right_top {
  406. text-align: right;
  407. a {
  408. font-size: 22PX !important;
  409. color: #0828bb;
  410. font-weight: bold;
  411. padding-left: 2%;
  412. -webkit-text-stroke: 1PX #FFF !important;
  413. }
  414. }
  415. .scroll-rotate-container {
  416. position: relative;
  417. width: 1100PX !important; /* 容器宽度 */
  418. height: 160PX !important; /* 固定高度,和单个 item 高度一致 */
  419. //border: 1px solid #eee;
  420. overflow: hidden; /* 隐藏超出视口的内容 */
  421. .gdbox{
  422. width: 100%;
  423. height: 200%; /* 2倍视口高度(两个 item 各占1倍) */
  424. animation: scroll-up 8s linear infinite; /* 8秒一轮,匀速循环 */
  425. // background:red;
  426. .gundong{
  427. width: 100%;
  428. height: 50%;
  429. flex-direction: column;
  430. justify-content: center;
  431. align-items: center;
  432. background:block;
  433. .topText{
  434. width:1100PX !important;
  435. height: 120PX !important;
  436. letter-spacing:46PX;
  437. font-size:75PX;
  438. text-shadow:-2PX 0 4PX #fff,0PX 2PX 4PX #fff,2PX 0 4PX #fff,0 -2PX 4PX #fff;
  439. color:#a01c00;
  440. line_height:120PX;
  441. font-weight:normal;
  442. display: flex;
  443. align-items: center;
  444. justify-content: space-between;
  445. a{
  446. height: 90PX !important;
  447. color: #a01c00; /* 自定义颜色 */
  448. }
  449. .topText:deep(a) {
  450. color: inherit;
  451. text-decoration: none;
  452. }
  453. span{
  454. //background:blue;
  455. width: 242PX !important;
  456. height: 100PX !important;
  457. //padding-top:10px;
  458. }
  459. }
  460. .bottomText{
  461. height: 40PX !important;
  462. display: flex;
  463. align-items: center;
  464. justify-content: space-between;
  465. .g_text {
  466. width: 500PX !important;
  467. height: 40PX !important;
  468. display: block;
  469. //background:blue;
  470. margin-block-start: 1.33em;
  471. margin-block-end: 1.33em;
  472. margin-inline-start: 0PX;
  473. margin-inline-end: 0PX;
  474. font-weight: normal;
  475. unicode-bidi: isolate;
  476. font-size: 22PX;
  477. text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  478. a{
  479. color: #a01c00;
  480. }
  481. .g_text:deep(a) {
  482. color: inherit;
  483. text-decoration: none;
  484. }
  485. }
  486. .a_text{
  487. width: 500PX !important;
  488. height: 40PX !important;
  489. display: block;
  490. // background:blue;
  491. font-size: 22PX;
  492. font-weight: normal;
  493. text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  494. color: #a01c00;
  495. text-align:right;
  496. line_height:40PX;
  497. }
  498. .a_text:deep(a) {
  499. color: inherit;
  500. text-decoration: none;
  501. }
  502. }
  503. }
  504. }
  505. }
  506. /* 核心动画:向上滚动 */
  507. @keyframes scroll-up {
  508. 0% {
  509. transform: translateY(0); /* 初始位置:显示第一个 item */
  510. }
  511. 40% {
  512. transform: translateY(0); /* 停留:第一个 item 显示40%时长 */
  513. }
  514. 50% {
  515. transform: translateY(-50%); /* 滚动:向上移动50%(显示第二个 item) */
  516. }
  517. 90% {
  518. transform: translateY(-50%); /* 停留:第二个 item 显示40%时长 */
  519. }
  520. 100% {
  521. transform: translateY(0); /* 回到初始位置,循环 */
  522. }
  523. }
  524. }
  525. }
  526. }
  527. //大于800px小于等于1400px
  528. @media screen and (min-width: 801px) and (max-width: 1400px) {
  529. .headerContainer {
  530. width: 100%;
  531. }
  532. .headerBox {
  533. width: 100%;
  534. height: 40PX !important;
  535. margin-bottom: 20PX !important;
  536. display: flex;
  537. align-items: center;
  538. justify-content: center;
  539. background: rgba(255, 255, 255, .6);
  540. .headerMain {
  541. display: flex;
  542. align-items: center;
  543. justify-content: space-between;
  544. min-width: 801px !important;
  545. max-width: 1400px !important;
  546. .headerBox_left {
  547. font-size: 18PX !important;
  548. color:#000;
  549. text-shadow:-1PX 0 #fff, 0PX 1PX #fff, 1PX 0 #fff, 0 -1PX #fff;
  550. }
  551. .headerBox_right {
  552. display: flex;
  553. align-items: center;
  554. justify-content: flex-end;
  555. a {
  556. font-size: 15PX !important;
  557. color:#000;
  558. text-shadow:-1PX 0 #fff, 0px 1PX #fff, 1PX 0 #fff, 0 -1PX #fff;
  559. margin-left: 6PX !important;
  560. }
  561. a:last-child{
  562. margin-right: 12PX !important;
  563. }
  564. span {
  565. font-size: 12PX !important;
  566. // margin-left: 6PX !important;
  567. padding: 0 20PX;
  568. }
  569. }
  570. }
  571. }
  572. .logoBox {
  573. min-width: 801px !important;
  574. max-width: 1400px !important;
  575. // width: 1401PX !important;
  576. height: 220PX !important;
  577. margin: 0 auto;
  578. display: flex;
  579. align-items: center;
  580. justify-content: space-between;
  581. .logoBox_left {
  582. width: 16% !important;
  583. img {
  584. display: block;
  585. width: 100% !important;
  586. height: 100% !important;
  587. margin-top: -100PX !important;
  588. }
  589. }
  590. .logoBox_right {
  591. width: 84% !important;
  592. height: 160PX !important;
  593. // background:blue;
  594. .logoBox_right_top {
  595. // background: red;
  596. text-align: right;
  597. a {
  598. font-size: 15PX !important;
  599. color: #0828bb;
  600. font-weight: bold;
  601. padding-left: 2%;
  602. -webkit-text-stroke: 1PX #FFF !important;
  603. }
  604. }
  605. .scroll-rotate-container {
  606. // background: #a01c00;
  607. position: relative;
  608. width: 100% !important; /* 容器宽度 */
  609. height: 160PX !important; /* 固定高度,和单个 item 高度一致 */
  610. //border: 1px solid #eee;
  611. overflow: hidden; /* 隐藏超出视口的内容 */
  612. .gdbox{
  613. width: 100%;
  614. height: 200%; /* 2倍视口高度(两个 item 各占1倍) */
  615. animation: scroll-up 8s linear infinite; /* 8秒一轮,匀速循环 */
  616. // background:red;
  617. .gundong{
  618. width: 100%;
  619. height: 50%;
  620. flex-direction: column;
  621. justify-content: center;
  622. align-items: center;
  623. background:block;
  624. .topText{
  625. width:100% !important;
  626. height: 110PX !important;
  627. // background: blue;
  628. letter-spacing:46PX;
  629. font-size:33px;
  630. text-shadow:-2PX 0 4PX #fff,0PX 2PX 4PX #fff,2PX 0 4PX #fff,0 -2PX 4PX #fff;
  631. color:#a01c00;
  632. line-height:120PX;
  633. font-weight:normal;
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-between;
  637. a{
  638. height: 90PX !important;
  639. line-height: 90PX;
  640. color: #a01c00; /* 自定义颜色 */
  641. // background: yellow;
  642. }
  643. .topText:deep(a) {
  644. color: inherit;
  645. text-decoration: none;
  646. }
  647. span{
  648. // background:red;
  649. width: 30% !important;
  650. height: 90PX !important;
  651. line-height: 90PX;
  652. text-align: right;
  653. //padding-top:10px;
  654. }
  655. }
  656. .bottomText{
  657. height: 40PX !important;
  658. display: flex;
  659. align-items: center;
  660. justify-content: space-between;
  661. .g_text {
  662. width: 500PX !important;
  663. height: 40PX !important;
  664. display: block;
  665. //background:blue;
  666. margin-block-start: 1.33em;
  667. margin-block-end: 1.33em;
  668. margin-inline-start: 0PX;
  669. margin-inline-end: 0PX;
  670. font-weight: normal;
  671. unicode-bidi: isolate;
  672. font-size: 14px;
  673. text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  674. a{
  675. color: #a01c00;
  676. }
  677. .g_text:deep(a) {
  678. color: inherit;
  679. text-decoration: none;
  680. }
  681. }
  682. .a_text{
  683. width: 500PX !important;
  684. height: 40PX !important;
  685. display: block;
  686. // background:blue;
  687. font-size: 14px;
  688. font-weight: normal;
  689. text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  690. color: #a01c00;
  691. text-align:right;
  692. line-height:40PX;
  693. }
  694. .a_text:deep(a) {
  695. color: inherit;
  696. text-decoration: none;
  697. }
  698. }
  699. }
  700. }
  701. }
  702. /* 核心动画:向上滚动 */
  703. @keyframes scroll-up {
  704. 0% {
  705. transform: translateY(0); /* 初始位置:显示第一个 item */
  706. }
  707. 40% {
  708. transform: translateY(0); /* 停留:第一个 item 显示40%时长 */
  709. }
  710. 50% {
  711. transform: translateY(-50%); /* 滚动:向上移动50%(显示第二个 item) */
  712. }
  713. 90% {
  714. transform: translateY(-50%); /* 停留:第二个 item 显示40%时长 */
  715. }
  716. 100% {
  717. transform: translateY(0); /* 回到初始位置,循环 */
  718. }
  719. }
  720. }
  721. }
  722. }
  723. //小于等于800px
  724. @media screen and (max-width: 800px) {
  725. .headerContainer {
  726. width: 100%;
  727. // background: RED;
  728. }
  729. .headerBox {
  730. width: 100%;
  731. height: 40px;
  732. margin-bottom: 20px;
  733. display: flex;
  734. align-items: center;
  735. justify-content: center;
  736. background: rgba(255, 255, 255, .6);
  737. display: none;
  738. .headerMain {
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. width: 100%;
  743. .headerBox_left {
  744. font-size: 18px;
  745. color:#0f50d5;
  746. }
  747. .headerBox_right {
  748. display: flex;
  749. align-items: center;
  750. justify-content: flex-end;
  751. a {
  752. font-size: 18px;
  753. color:#0f50d5;
  754. margin-left: 6px;
  755. }
  756. span {
  757. margin-left: 6px;
  758. }
  759. }
  760. }
  761. }
  762. .logoBox {
  763. max-width: 800PX !important;
  764. height: 140PX !important;
  765. margin: 0 auto;
  766. display: flex;
  767. align-items: center;
  768. justify-content: space-between;
  769. .logoBox_left {
  770. width: 20% !important;
  771. margin-left: 10PX;
  772. // float: left;
  773. // margin-top: 0;
  774. img {
  775. width: 100% !important;
  776. height: 100%!important;
  777. margin-top: 20PX !important;
  778. }
  779. }
  780. .logoBox_right {
  781. width: 72% !important;
  782. height: 60PX !important;
  783. margin-right: 10PX;
  784. // background: green;
  785. // background:blue;
  786. margin-top: 40PX;
  787. .logoBox_right_top {
  788. text-align: right;
  789. a {
  790. font-size: 22PX !important;
  791. color: #0828bb;
  792. font-weight: bold;
  793. padding-left: 2%;
  794. -webkit-text-stroke: 1PX #FFF !important;
  795. }
  796. }
  797. .scroll-rotate-container {
  798. position: relative;
  799. width: 100% !important; /* 容器宽度 */
  800. height: 60PX !important; /* 固定高度,和单个 item 高度一致 */
  801. //border: 1px solid #eee;
  802. overflow: hidden; /* 隐藏超出视口的内容 */
  803. // background: BLUE;
  804. .gdbox{
  805. width: 100%;
  806. height: 210%; /* 2倍视口高度(两个 item 各占1倍) */
  807. animation: scroll-up 8s linear infinite; /* 8秒一轮,匀速循环 */
  808. // background:red;
  809. .gundong{
  810. width: 100%;
  811. height: 50%;
  812. flex-direction: column;
  813. justify-content: center;
  814. align-items: center;
  815. background:block;
  816. .topText{
  817. width:100% !important;
  818. height: 30PX !important;
  819. // letter-spacing:46PX;
  820. font-size:19PX;
  821. text-shadow:-2PX 0 4PX #fff,0PX 2PX 4PX #fff,2PX 0 4PX #fff,0 -2PX 4PX #fff;
  822. color:#a01c00;
  823. // line_height:120PX;
  824. font-weight:normal;
  825. display: flex;
  826. align-items: center;
  827. justify-content: space-between;
  828. a{
  829. // height: 90PX !important;
  830. color: #a01c00; /* 自定义颜色 */
  831. }
  832. .topText:deep(a) {
  833. color: inherit;
  834. text-decoration: none;
  835. }
  836. span{
  837. // background:blue;
  838. width: 40PX !important;
  839. height: 30PX !important;
  840. // line-height: 68PX;
  841. //padding-top:10px;
  842. }
  843. }
  844. .bottomText{
  845. height: 38PX !important;
  846. display: flex;
  847. align-items: center;
  848. justify-content: space-between;
  849. // background: yellow;
  850. .g_text {
  851. width: 60% !important;
  852. height: 40PX !important;
  853. display: block;
  854. //background:blue;
  855. margin-block-start: 1.33em;
  856. margin-block-end: 1.33em;
  857. margin-inline-start: 0PX;
  858. margin-inline-end: 0PX;
  859. font-weight: normal;
  860. unicode-bidi: isolate;
  861. font-size: 11PX;
  862. // text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  863. a{
  864. color: #cc1f19;
  865. }
  866. .g_text:deep(a) {
  867. color: inherit;
  868. text-decoration: none;
  869. }
  870. }
  871. .a_text{
  872. width: 40% !important;
  873. height: 40PX !important;
  874. display: block;
  875. // background:blue;
  876. font-size: 11PX;
  877. font-weight: normal;
  878. // text-shadow: -2PX 0 2PX #fff, 0PX 2PX 2PX #fff, 2PX 0 2PX #fff, 0 -2PX 2PX #fff;
  879. color: #cc1f19;
  880. text-align:right;
  881. line_height:40PX;
  882. }
  883. .a_text:deep(a) {
  884. color: inherit;
  885. text-decoration: none;
  886. }
  887. }
  888. }
  889. }
  890. }
  891. /* 核心动画:向上滚动 */
  892. @keyframes scroll-up {
  893. 0% {
  894. transform: translateY(0); /* 初始位置:显示第一个 item */
  895. }
  896. 40% {
  897. transform: translateY(0); /* 停留:第一个 item 显示40%时长 */
  898. }
  899. 50% {
  900. transform: translateY(-50%); /* 滚动:向上移动50%(显示第二个 item) */
  901. }
  902. 90% {
  903. transform: translateY(-50%); /* 停留:第二个 item 显示40%时长 */
  904. }
  905. 100% {
  906. transform: translateY(0); /* 回到初始位置,循环 */
  907. }
  908. }
  909. }
  910. }
  911. }
  912. //自适应 end ---------------------------------------->
  913. </style>