index1.vue 25 KB

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