index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. <template>
  2. <div class="app-header">
  3. <div class="header-wrapper">
  4. <div class="header-inner">
  5. <div class="left-info">
  6. <a class="title-sec" :href="jumpLink('/')">
  7. <img v-if="language == ''" src="@/assets/images/logo_cn2.png" alt="logo" class="logo cn-logo" />
  8. <img v-else src="@/assets/images/logo_en2.png" alt="logo" class="logo" />
  9. </a>
  10. </div>
  11. <template v-if="pcShow">
  12. <div class="home-nav-bar-top">
  13. <div class="search">
  14. <n-input-group>
  15. <n-button size="large" color="#355672" @click="handleSearch" style="padding: 0 10px"><n-icon :component="MdSearch" size="30" color="#fff" /></n-button>
  16. <n-input @keydown.enter="keyDown" type="text" size="large" :placeholder="t('report.content.keyword')" v-model:value="keyword" clearable style="background-color: #fafafa" />
  17. <n-select style="width: 200px" clearable :placeholder="t('report.content.keywordType')" v-model:value="selectTypeValue" :options="selectTypeList" />
  18. </n-input-group>
  19. </div>
  20. <div class="home-nav-link">
  21. <a id="nav-item" class="nav-item" :class="{'router-link-active':(route.name=='index___en'||route.name=='index___zh')}" :href="jumpLink('/')">
  22. <span class="txt">{{ t("common.navigate.home") }}</span>
  23. </a>
  24. <n-dropdown :options="reportOptions" trigger="hover" size="huge" @select="chooseReportMenu">
  25. <a id="nav-item" class="nav-item" :class="{'router-link-active':(route.name=='reports'||route.path=='/en/report-industries'||route.path=='/report-industries')}" :href="jumpLink('/report-industries')">
  26. <span class="txt">{{ t("common.navigate.report") }}</span>
  27. </a>
  28. </n-dropdown>
  29. <n-dropdown :options="bulletinOptions" trigger="hover" size="huge" @select="chooseBulletinMenu" v-if="language == ''">
  30. <!-- :to="{
  31. name: 'bulletinThinkTank',
  32. params: { marketType: 'industry-brief' },
  33. }" -->
  34. <a id="nav-item" class="nav-item" :class="{'router-link-active':route.name=='bulletinThinkTank'}" :href="jumpLink('/bulletin/bulletin-think-tank/industry-brief')">
  35. <span class="txt">简报智库</span>
  36. </a>
  37. </n-dropdown>
  38. <a id="nav-item" class="nav-item" :class="{'router-link-active':route.path=='/market'}" :href="jumpLink('/market')">
  39. <span class="txt">{{ t("common.navigate.market") }}</span>
  40. </a>
  41. <n-dropdown :options="newsOptions" trigger="hover" size="huge" @select="chooseNewsMenu">
  42. <a id="nav-item" class="nav-item" :class="{'router-link-active':(route.name=='newsCategories'||route.path=='/news-categories'||router.path=='/en/news-categories')}" :href="jumpLink('/news-categories')">
  43. <span class="txt">{{ t("common.navigate.news") }}</span>
  44. </a>
  45. </n-dropdown>
  46. <n-dropdown :options="aboutOptions" trigger="hover" size="huge" @select="chooseAboutMenu">
  47. <a id="nav-item" class="nav-item" :class="{'router-link-active':route.path=='/about'||route.path=='/link'||route.path=='/order'||route.path=='/term'||route.path=='/qualify'}" :href="jumpLink('/about')">
  48. <span class="txt">{{ t("common.navigate.aboutUs") }}</span>
  49. </a>
  50. </n-dropdown>
  51. <a id="nav-item" class="nav-item" :class="{'router-link-active':route.path=='/contactUs'}" :href="jumpLink('/contactUs')">
  52. <span class="txt">{{ t("common.navigate.contactUs") }}</span>
  53. </a>
  54. </div>
  55. </div>
  56. <div class="home-nav">
  57. <!-- <template v-if="language == ''"> -->
  58. <template v-if="isLogin">
  59. <div class="userInfo">
  60. <img class="avatar" src="@/assets/images/avatar.png" alt="avatar" width="30" />
  61. <span class="username" @click="toMine">{{
  62. userInfo.name
  63. }}</span>
  64. <span>|</span>
  65. <span class="logout" @click="handleLogout">{{t('common.login.logout')}}</span>
  66. </div>
  67. </template>
  68. <template v-if="!isLogin">
  69. <div class="login" @click="handleSignIn">{{t('common.login.title')}}</div>
  70. </template>
  71. <!-- </template> -->
  72. <!-- <p class="home-tel" v-else>
  73. <n-icon :component="IosCall" size="30" />
  74. <a href="tel:1-8884226999">+1-888 422 6999 (US)</a>
  75. </p> -->
  76. <div id="nav-item" class="lang">
  77. <n-icon :component="IosGlobe" size="22" />
  78. <select class="lang-select" @change="langChange($event.target.value)" v-model="langSelected">
  79. <option value="zh">中文</option>
  80. <option value="en">English</option>
  81. </select>
  82. </div>
  83. </div>
  84. </template>
  85. <!--手机端导航-->
  86. <div v-if="!pcShow" class="mobile">
  87. <n-dropdown trigger="click" :size="language ? 'small' : 'huge'" :options="mobileMenu" @select="chooseMenu" placement="bottom-start" :class="language">
  88. <n-icon :component="MdApps" size="80" color="#fff" />
  89. </n-dropdown>
  90. </div>
  91. </div>
  92. <div v-if="!pcShow" class="header-lang">
  93. <div class="mobile-search">
  94. <n-input-group>
  95. <n-button size="large" color="#355672" @click="handleSearch" style="padding: 0 10px"><n-icon :component="MdSearch" size="30" color="#fff" /></n-button>
  96. <n-input type="text" size="large" :placeholder="t('report.content.keyword')" v-model:value="keyword" clearable style="background-color: #fafafa" />
  97. <n-select style="width: 240px" clearable :placeholder="t('report.content.keywordType')" v-model:value="selectTypeValue" :options="selectTypeList" />
  98. </n-input-group>
  99. </div>
  100. <div class="top-login">
  101. <template v-if="language == ''">
  102. <div class="userInfo" v-if="isLogin">
  103. <span>{{ userInfo.name }}</span>
  104. <span>|</span>
  105. <span @click="toMine">{{t('common.login.personalCenter')}}</span>
  106. <span>|</span>
  107. <span class="logout" @click="handleLogout">{{t('common.login.logout')}}</span>
  108. </div>
  109. <div class="login" @click="handleSignIn" v-if="!isLogin">{{t('common.login.title')}}</div>
  110. </template>
  111. <div>
  112. <a class="txt" @click="langChange('zh')">{{
  113. t("common.lang.zh-CN")
  114. }}</a>
  115. <span class="separator txt">|</span>
  116. <a class="txt" @click="langChange('en')">{{
  117. t("common.lang.en-US")
  118. }}</a>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <n-modal :show="signInVisible" preset="dialog" :title="signInTitle" :showIcon="false" :close-on-esc="false" :mask-closable="false" @close="signInVisible = false" :class="{ 'login-dialog': !pcShow }">
  124. <SignInLogin @closeSginDialog="closeSginDialog" v-if="sginType == 'login'"></SignInLogin>
  125. <SignInRegister @closeSginDialog="closeSginDialog" v-if="sginType == 'register'"></SignInRegister>
  126. <SignInForgot @closeSginDialog="closeSginDialog" v-if="sginType == 'forgot'"></SignInForgot>
  127. </n-modal>
  128. <n-modal v-model:show="logoutVisible" preset="dialog" title="提示" :showIcon="false" content="确认退出登录吗?" positive-text="确认" negative-text="取消" :close-on-esc="false" :mask-closable="false" @positive-click="submitLogoutCallback" @negative-click="cancelLogoutCallback" :class="{ 'login-dialog': !pcShow }" />
  129. </div>
  130. </template>
  131. <script lang="ts" setup>
  132. import { useI18n } from "#imports";
  133. import SignInLogin from "@/components/Login/index.vue";
  134. import SignInRegister from "@/components/Login/register.vue";
  135. import SignInForgot from "@/components/Login/forgot.vue";
  136. import { useLocaleStoreWithOut } from "@/store";
  137. import {
  138. // Component,
  139. // h,
  140. onMounted,
  141. ref,
  142. onUnmounted,
  143. onBeforeMount,
  144. watch,
  145. computed,
  146. inject,
  147. onServerPrefetch,
  148. } from "vue";
  149. import { createDiscreteApi } from "naive-ui";
  150. import { useRouter, useRoute } from "vue-router";
  151. import {
  152. MdApps,
  153. MdHome,
  154. IosPaper,
  155. IosSearch,
  156. MdToday,
  157. MdPeople,
  158. MdSearch,
  159. IosCall,
  160. IosGlobe,
  161. } from "@vicons/ionicons4";
  162. import { useUserStore } from "@/store/user";
  163. const message = createDiscreteApi(["message"]);
  164. const { t, locale, setLocale } = useI18n();
  165. const switchLocalePath = useSwitchLocalePath();
  166. const router = useRouter();
  167. const route = useRoute();
  168. const userStore = useUserStore();
  169. const pcShow = ref(true);
  170. const keyword = ref<string>(""); //关键字
  171. userStore.setLang(locale.value == "en" ? "en-US" : "zh-CN");
  172. const value = userStore.getLang;
  173. const language = ref("");
  174. const langSelected = ref("zh");
  175. language.value = value === "en-US" ? "en" : "";
  176. langSelected.value = value === "en-US" ? "en" : "zh";
  177. const renderIcon = (icon: string) => {
  178. return () => {
  179. return h("span", { class: icon });
  180. };
  181. };
  182. const renderIconC4 = (icon: Component) => {
  183. return () => {
  184. return h(NIcon, null, {
  185. default: () => h(icon),
  186. });
  187. };
  188. };
  189. // const renderIconLabel = (option: DropdownOption) => {
  190. // return h('a',{ onclick: () => chooseMenu, target: '_blank' },{ default: () => option.label});
  191. // }
  192. const reportOptions = [] as any; //报告列表
  193. const newsOptions = [] as any; //行业资讯
  194. const aboutOptions = [] as any; //关于我们
  195. const bulletinOptions = [] as any; // 简报智库
  196. const mobileMenu = [
  197. { label: t("common.navigate.home"), key: "home", name: "home" },
  198. {
  199. label: t("common.navigate.report"),
  200. key: "reports",
  201. children: reportOptions,
  202. name: "reports",
  203. },
  204. { label: t("common.navigate.market"), key: "market", name: "marketIndex" },
  205. {
  206. label: t("common.navigate.news"),
  207. key: "newsCategories",
  208. children: newsOptions,
  209. name: "newsCategories",
  210. },
  211. {
  212. label: t("common.navigate.aboutUs"),
  213. key: "about",
  214. children: aboutOptions,
  215. name: "about",
  216. },
  217. {
  218. label: t("common.navigate.contactUs"),
  219. key: "contactUs",
  220. name: "contactUsIndex",
  221. },
  222. // {
  223. // label: "简报智库",
  224. // key: "bulletin",
  225. // children: bulletinOptions,
  226. // name: "bulletin",
  227. // },
  228. ];
  229. const selectTypeValue = ref();
  230. const selectTypeList = ref([
  231. {
  232. label: t("common.navigate.report"),
  233. value: "reports",
  234. },
  235. {
  236. label: t("common.navigate.news"),
  237. value: "newsCategories",
  238. },
  239. {
  240. label: t("common.navigate.bulletin"),
  241. value: "bulletinThinkTank",
  242. },
  243. ]);
  244. const signInVisible = ref<boolean>(false);
  245. const signInTitle = ref<string>("");
  246. const sginType = ref<string>("login");
  247. const logoutVisible = ref(false);
  248. const userInfo = computed(() => userStore.getUserInfo);
  249. const isLogin = computed(() =>
  250. userStore.getToken && userStore.getUserInfo ? true : false
  251. );
  252. const jumpLink = (url: string) => {
  253. return (language.value == "en" ? "/en" : "") + url;
  254. };
  255. watch(
  256. () => userStore.getSearchType,
  257. (val) => {
  258. selectTypeValue.value = val || null;
  259. }
  260. );
  261. watch(langSelected, () => {
  262. if (langSelected.value == "en") {
  263. selectTypeList.value = [
  264. {
  265. label: t("common.navigate.report"),
  266. value: "reports",
  267. },
  268. {
  269. label: t("common.navigate.news"),
  270. value: "newsCategories",
  271. },
  272. ];
  273. // userStore.resetState();
  274. }
  275. });
  276. watch(
  277. () => userStore.getShowLoginDialog,
  278. (newval, oldval) => {
  279. signInVisible.value = newval;
  280. sginType.value = "login";
  281. signInTitle.value = t("common.login.title");
  282. }
  283. );
  284. watch(signInVisible, (val) => {
  285. if (val === false) {
  286. userStore.setShowLoginDialog(false);
  287. }
  288. });
  289. // 中英文切换
  290. const langChange = async (lng: string) => {
  291. userStore.setLang(lng == "zh" ? "zh-CN" : "en-US");
  292. const path = switchLocalePath(lng);
  293. setLocale(lng);
  294. // router.push(path);
  295. // location.reload();
  296. location.href = path;
  297. };
  298. // 研究报告菜单切换
  299. function chooseReportMenu(key: string | number, _option: DropdownOption) {
  300. router.push({
  301. name: "reports",
  302. params: { category: key, lang: language.value },
  303. });
  304. }
  305. // 行业资讯
  306. function chooseNewsMenu(key: string | number) {
  307. router.push({
  308. name: "newsCategories",
  309. params: { marketType: key, lang: language.value },
  310. });
  311. }
  312. onBeforeMount(async () => {
  313. pcShow.value = !isMobile();
  314. });
  315. // 关于我们跳转
  316. function chooseAboutMenu(key: string | number, option: DropdownOption) {
  317. router.push({ name: option.name, params: { lang: language.value } });
  318. }
  319. // 关于简报智库
  320. function chooseBulletinMenu(key: string | number, _option: DropdownOption) {
  321. router.push({
  322. name: "bulletinThinkTank",
  323. params: {
  324. marketType: _option.marketType,
  325. },
  326. });
  327. }
  328. // 手机端跳转
  329. function chooseMenu(key: string | number, option: DropdownOption) {
  330. if ("reports" === option.name) {
  331. router.push({
  332. name: option.name,
  333. params: { category: key, lang: language.value },
  334. });
  335. } else if ("newsCategories" === option.name) {
  336. router.push({
  337. name: option.name,
  338. params: { marketType: key, lang: language.value },
  339. });
  340. } else if ("home" === option.name) {
  341. // router.push({
  342. // name: language.value === "" ? "home" : "homeEn",
  343. // params: { marketType: key, lang: language.value },
  344. // });
  345. jumpLink("/");
  346. } else {
  347. router.push({ name: option.name, params: { lang: language.value } });
  348. }
  349. }
  350. function handleSearch() {
  351. switch (selectTypeValue.value) {
  352. case "reports":
  353. router.push({
  354. name: "reports",
  355. params: { lang: language.value, keyword: keyword.value },
  356. });
  357. break;
  358. case "newsCategories":
  359. router.push({
  360. name: "newsCategories",
  361. params: { lang: language.value, keyword: keyword.value },
  362. });
  363. break;
  364. case "bulletinThinkTank":
  365. router.push({
  366. name: "bulletinThinkTank",
  367. params: { marketType: "industry-brief", title: keyword.value },
  368. });
  369. break;
  370. default:
  371. router.push({
  372. name: "reports",
  373. params: { lang: language.value, keyword: keyword.value },
  374. });
  375. break;
  376. }
  377. }
  378. function keyDown() {
  379. handleSearch();
  380. }
  381. const handleSignIn = () => {
  382. signInVisible.value = true;
  383. sginType.value = "login";
  384. signInTitle.value = t("common.login.title");
  385. };
  386. const toMine = () => {
  387. router.push({
  388. name: "mine",
  389. });
  390. };
  391. const handleLogout = () => {
  392. logoutVisible.value = true;
  393. };
  394. const submitLogoutCallback = () => {
  395. logOut_Api().then((res) => {
  396. message.message.success(t("report.demand.success"));
  397. userStore.resetState();
  398. router.push("/");
  399. });
  400. };
  401. const cancelLogoutCallback = () => {
  402. logoutVisible.value = false;
  403. };
  404. const closeSginDialog = (type: string) => {
  405. switch (type) {
  406. case "success":
  407. signInVisible.value = false;
  408. break;
  409. case "login":
  410. signInTitle.value = t("common.login.title");
  411. break;
  412. case "register":
  413. sginType.value = type;
  414. signInTitle.value = t("common.login.register");
  415. break;
  416. case "forgot":
  417. sginType.value = type;
  418. signInTitle.value = t("common.login.forgetPasswordTitle");
  419. break;
  420. default:
  421. break;
  422. }
  423. };
  424. // onMounted(async () => {
  425. //window.addEventListener('scroll',onScroll);
  426. // 下拉菜单
  427. const getDictListData = async () => {
  428. const cacheDict = await getLocalSessionReport();
  429. cacheDict?.forEach(
  430. (vo: { dictLabel: any; dictValue: any; dictIcon: any }) => {
  431. reportOptions.push({
  432. label: vo.dictLabel,
  433. key: vo.dictValue,
  434. icon: renderIcon(vo.dictIcon),
  435. name: "reports",
  436. });
  437. }
  438. );
  439. const cacheDictNews = await getLocalSessionNews();
  440. cacheDictNews?.forEach((vo: any) => {
  441. newsOptions.push({
  442. label: vo.dictLabel,
  443. key: vo.dictValue,
  444. icon: renderIcon(vo.dictIcon),
  445. name: "newsCategories",
  446. });
  447. });
  448. aboutOptions.push({
  449. label: t("common.navAboutUs.comp"),
  450. name: "about",
  451. icon: renderIcon("iconfont iconfont icon-ziyuan"),
  452. });
  453. aboutOptions.push({
  454. label: t("common.navAboutUs.method"),
  455. name: "link",
  456. icon: renderIcon("iconfont icon-chaxun"),
  457. });
  458. aboutOptions.push({
  459. label: t("common.navAboutUs.order"),
  460. name: "order",
  461. icon: renderIcon("iconfont icon-a-dingdanguanli2x"),
  462. });
  463. aboutOptions.push({
  464. label: t("common.navAboutUs.term"),
  465. name: "term",
  466. icon: renderIcon("iconfont icon-shejiyukaifa-"),
  467. });
  468. aboutOptions.push({
  469. label: t("common.navAboutUs.qualify"),
  470. name: "qualify",
  471. icon: renderIcon("iconfont iconfont icon-ziyuan"),
  472. });
  473. bulletinOptions.push({
  474. label: "行业简报",
  475. name: "bulletinThinkTank",
  476. marketType: "industry-brief",
  477. icon: renderIcon("bqfl-iconfont bqfl-iconfont icon-zhinengjianbao"),
  478. });
  479. bulletinOptions.push({
  480. label: "企业洞察",
  481. name: "bulletinThinkTank",
  482. marketType: "enterprise-hole-analysis",
  483. icon: renderIcon("bqfl-iconfont bqfl-iconfont icon-yanjiubaogao"),
  484. });
  485. };
  486. watch(
  487. () => route.path,
  488. (val) => {
  489. getDictListData();
  490. }
  491. );
  492. getDictListData();
  493. </script>
  494. <style lang='scss' >
  495. .app-header {
  496. z-index: 9;
  497. width: 100%;
  498. position: fixed;
  499. left: 0;
  500. top: 0;
  501. background: #fff;
  502. height: 140px;
  503. box-shadow: 2.5px 4.33px 15px 0px rgb(0 0 0 / 15%);
  504. .header-wrapper {
  505. transition: all 0.3s;
  506. .header-inner {
  507. // width: 1200px;
  508. margin: 0 auto;
  509. height: 140px;
  510. display: flex;
  511. flex-flow: row nowrap;
  512. align-items: center;
  513. justify-content: space-between;
  514. .left-info {
  515. display: flex;
  516. flex-flow: row nowrap;
  517. align-items: center;
  518. flex-shrink: 0;
  519. .title-sec {
  520. display: flex;
  521. flex-flow: row nowrap;
  522. align-items: center;
  523. margin-right: 15px;
  524. cursor: pointer;
  525. .logo {
  526. height: 80px;
  527. width: 100%;
  528. max-width: 240px;
  529. object-fit: contain;
  530. }
  531. .cn-logo {
  532. height: 120px;
  533. }
  534. .sub-title {
  535. font-size: 12px;
  536. color: #fff;
  537. margin-bottom: 2px;
  538. }
  539. .title {
  540. font-size: 18px;
  541. font-weight: bold;
  542. color: #fff;
  543. }
  544. }
  545. }
  546. .login-box {
  547. display: flex;
  548. flex-flow: row nowrap;
  549. align-items: center;
  550. .msg-box {
  551. color: #fff;
  552. font-size: 15px;
  553. margin-right: 15px;
  554. transition: all 0.5s;
  555. cursor: pointer;
  556. &:hover {
  557. color: $blue;
  558. }
  559. }
  560. .avator-box {
  561. width: 30px;
  562. height: 30px;
  563. margin-right: 15px;
  564. border-radius: 15px;
  565. overflow: hidden;
  566. .avator {
  567. display: block;
  568. width: 100%;
  569. height: 100%;
  570. }
  571. }
  572. .basic-info {
  573. cursor: pointer;
  574. color: #fff;
  575. outline: none !important;
  576. }
  577. .btn-group {
  578. .register {
  579. background: #fff;
  580. color: #000;
  581. border-color: #fff;
  582. margin-left: 5px;
  583. &:hover {
  584. color: $blue;
  585. border-color: $blue;
  586. }
  587. }
  588. }
  589. }
  590. .tool-group {
  591. display: flex;
  592. flex-flow: row nowrap;
  593. align-items: center;
  594. .tool-item {
  595. margin-right: 20px;
  596. color: #409eff;
  597. font-size: 15px;
  598. cursor: pointer;
  599. }
  600. .icon {
  601. font-size: 20px;
  602. }
  603. }
  604. }
  605. // .home-nav-bar {
  606. // margin: 0;
  607. // height: 140px;
  608. // display: flex;
  609. // flex-flow: row nowrap;
  610. // align-items: center;
  611. // justify-content: center;
  612. // width: calc(100% - 350px);
  613. // flex-wrap: wrap;
  614. //border-top: 1px solid rgba(255, 255, 255, 0.2);
  615. .home-nav-bar-top {
  616. flex: 1;
  617. height: 100%;
  618. // width: 100%;
  619. display: flex;
  620. flex-direction: column;
  621. justify-content: space-around;
  622. align-items: center;
  623. // justify-content: space-between;
  624. .search {
  625. width: 45rem;
  626. .n-base-selection {
  627. height: 100%;
  628. --n-border: 1px solid #18a058 !important;
  629. .n-base-selection-label {
  630. height: 100%;
  631. background-color: #18a058 !important;
  632. .n-base-selection-input,
  633. .n-base-selection-placeholder__inner {
  634. color: #fff;
  635. }
  636. }
  637. }
  638. }
  639. .home-nav-link {
  640. display: flex;
  641. .nav-item {
  642. height: 100%;
  643. margin-right: 2rem;
  644. display: flex;
  645. flex-flow: row nowrap;
  646. align-items: center;
  647. justify-content: center;
  648. cursor: pointer;
  649. &:last-child {
  650. margin-right: 0;
  651. }
  652. .txt {
  653. font-size: 1.2rem;
  654. color: #000;
  655. font-weight: 600;
  656. }
  657. &.router-link-active {
  658. position: relative;
  659. &::after {
  660. position: absolute;
  661. left: 0;
  662. bottom: 0;
  663. content: "";
  664. width: 100%;
  665. height: 3px;
  666. background: #000;
  667. }
  668. }
  669. &:hover {
  670. position: relative;
  671. &::after {
  672. position: absolute;
  673. left: 0;
  674. bottom: 0;
  675. content: "";
  676. width: 100%;
  677. height: 3px;
  678. background: #000;
  679. }
  680. }
  681. }
  682. }
  683. }
  684. .home-nav {
  685. height: 100%;
  686. // width: 100%;
  687. display: flex;
  688. flex-direction: column;
  689. justify-content: space-around;
  690. align-items: flex-end;
  691. flex-shrink: 0;
  692. .home-tel {
  693. //color: #fff;
  694. .n-icon {
  695. vertical-align: middle;
  696. border-radius: 100%;
  697. //border: 1px solid #fff;
  698. margin-right: 10px;
  699. }
  700. > a {
  701. font-size: 18px;
  702. }
  703. }
  704. .userInfo {
  705. display: flex;
  706. align-items: center;
  707. .avatar {
  708. width: 30px;
  709. height: 30px;
  710. margin-right: 10px;
  711. vertical-align: middle;
  712. border-radius: 50%;
  713. }
  714. .username {
  715. font-size: 16px;
  716. }
  717. span {
  718. margin-right: 10px;
  719. cursor: pointer;
  720. &:last-child {
  721. margin-right: 0;
  722. }
  723. }
  724. }
  725. .login {
  726. width: 110px;
  727. height: 40px;
  728. text-align: center;
  729. line-height: 40px;
  730. color: #ffffff;
  731. font-size: 16px;
  732. background-color: #18a058;
  733. border-radius: 20px;
  734. cursor: pointer;
  735. }
  736. }
  737. // }
  738. }
  739. }
  740. .lang {
  741. font-weight: 600;
  742. font-size: 18px;
  743. margin: 0 20px;
  744. .separator {
  745. padding: 0 7px;
  746. }
  747. .n-icon {
  748. vertical-align: middle;
  749. //color: #fff;
  750. }
  751. .lang-select {
  752. border: none;
  753. outline: none;
  754. margin-left: 2px;
  755. width: 100px;
  756. font-size: 15px;
  757. background: none;
  758. //color: #fff;
  759. option {
  760. color: #000;
  761. }
  762. }
  763. }
  764. .nav-search {
  765. width: 200px;
  766. .n-icon {
  767. margin-right: -25px;
  768. vertical-align: middle;
  769. }
  770. .nav-search-ipt {
  771. border: none;
  772. width: 200px;
  773. height: 30px;
  774. font-size: 1em;
  775. padding-left: 30px;
  776. }
  777. }
  778. .n-dropdown-option-body__label {
  779. font-weight: 600;
  780. }
  781. .n-dialog {
  782. min-width: 550px;
  783. padding-top: 48px;
  784. border-radius: 20px;
  785. .n-dialog__title {
  786. display: flex;
  787. justify-content: center;
  788. align-items: center;
  789. font-size: 24px;
  790. color: #1a1a1a;
  791. font-weight: bold;
  792. text-align: center;
  793. }
  794. }
  795. .n-dropdown-option-body__label {
  796. font-weight: 600;
  797. }
  798. .n-dialog {
  799. min-width: 550px;
  800. padding-top: 48px;
  801. border-radius: 20px;
  802. .n-dialog__title {
  803. display: flex;
  804. justify-content: center;
  805. align-items: center;
  806. font-size: 24px;
  807. color: #1a1a1a;
  808. font-weight: bold;
  809. text-align: center;
  810. }
  811. }
  812. .login-dialog.n-dialog {
  813. min-width: auto;
  814. padding-top: 20px;
  815. border-radius: 10px;
  816. .n-dialog__title {
  817. font-size: 18px;
  818. }
  819. .n-dialog__content {
  820. .container {
  821. padding: 20px 10px;
  822. .login-btn {
  823. height: 45px;
  824. }
  825. .n-form {
  826. .n-form-item {
  827. .n-form-item-label {
  828. width: 85px !important;
  829. font-size: 12px;
  830. }
  831. .n-form-item-feedback-wrapper {
  832. min-height: 10px;
  833. }
  834. }
  835. }
  836. }
  837. }
  838. }
  839. </style>