header.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. <template>
  2. <div id="proginn-header" :class="{ transparent: transparent }" :style="{ position: customPosition }">
  3. <div class="list">
  4. <div class="header-left">
  5. <a :href="baseUrl" @click="cnzz('导航栏目','logo','')" class="nav-item logo">
  6. <img
  7. class="logo"
  8. :src="
  9. transparent
  10. ? WhiteLogo
  11. : 'https://stacdn.proginn.com/image/common/logo3@2x.png'
  12. "
  13. />
  14. </a>
  15. <a :href="baseUrl" @click="cnzz('导航栏目','首页','')" class="nav-item">首页</a>
  16. <a :href="baseUrl + '/users'" @click="cnzz('导航栏目','程序员','')" class="nav-item">程序员</a>
  17. <!-- <div class="dropDownArea">
  18. <el-button
  19. type="text"
  20. @click="cnzz('导航栏目','解决方案','')"
  21. class="dashboard-title"
  22. :class="{ on: selectedDropTitle === 0 }"
  23. @mouseover.native="handleTitleMouseover(0)"
  24. @mouseout.native="handleTitleMouseout(0)">解决方案<i class="el-icon-arrow-down"></i></el-button>
  25. <el-button
  26. type="text"
  27. class="dashboard-title"
  28. @click="cnzz('导航栏目','服务','')"
  29. :class="{ on: selectedDropTitle === 1 }"
  30. style="margin-left: 20px !important;"
  31. @mouseover.native="handleTitleMouseover(1)"
  32. @mouseout.native="handleTitleMouseout(1)">服务<i class="el-icon-arrow-down"></i></el-button>
  33. <div class="showDropDownArea">
  34. <div class="contentArea">
  35. <div class="leftSelect">
  36. <div
  37. class="downCell"
  38. v-for="(item, index) in dropDownData"
  39. @mouseover="selectedDrop = index"
  40. :key="index"
  41. :class="{ choosed: index === selectedDrop }"
  42. >
  43. <div class="cnName">{{ item.title }}</div>
  44. <div class="enName">{{ item.titleEn }}</div>
  45. </div>
  46. </div>
  47. <div class="rightShow">
  48. <div
  49. class="rightBigCell"
  50. v-for="(big, bigIndex) in dropDownData"
  51. :key="bigIndex"
  52. :class="{ ok: selectedDrop === bigIndex }"
  53. >
  54. <a
  55. class="smallCell"
  56. v-for="(small, smallIndex) in big.list"
  57. @click="cnzz('导航栏目',small.title,'')"
  58. :href="small.href"
  59. :key="smallIndex"
  60. :target="small.blank ? '_blank' : ''"
  61. >
  62. <div class="cellLeftIcon">
  63. <img :src="small.icon" alt="" />
  64. </div>
  65. <div class="cellRightArea">
  66. <div class="cellRightName">{{ small.title }}</div>
  67. <div class="cellRightDesc">{{ small.desc }}</div>
  68. </div>
  69. </a>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div> -->
  75. <!-- 解决方案 -->
  76. <el-dropdown class="more-dropdown" placement="bottom-start">
  77. <el-button type="text" @click="cnzz('导航栏目','解决方案','')" class="dashboard-title">解决方案<i class="el-icon-arrow-down"></i></el-button>
  78. <el-dropdown-menu slot="dropdown" class="jiejuefangan-dropdown">
  79. <div class="deal-item" style="padidng-right:40px;">
  80. <div class="big-title">
  81. <img src="@/assets/img/header/new/jiejuefangan1@2x.png" alt="项目研发" >
  82. <span>项目研发</span>
  83. </div>
  84. <div>
  85. <el-dropdown-item>
  86. <a class="more-item fuwu-item" @click="cnzz('导航栏目','需求梳理','')" :href="`${baseUrl}/fworks/p1980?from=global_publish`">
  87. <span class="big">需求梳理</span>
  88. <span class="small">规划落地您的想法</span>
  89. </a>
  90. </el-dropdown-item>
  91. <el-dropdown-item>
  92. <a class="more-item fuwu-item" @click="cnzz('导航栏目','项目管理','')" :href="`${baseUrl}/outsource/sitePublicity/28?from=top_nav`">
  93. <span class="big">项目管理</span>
  94. <span class="small">实现可视化价值交流</span>
  95. </a>
  96. </el-dropdown-item>
  97. <el-dropdown-item>
  98. <a class="more-item fuwu-item" @click="cnzz('导航栏目','整包开发','')" :href="`${baseUrl}/type/service?from=index`">
  99. <span class="big">整包开发</span>
  100. <span class="small">一站式软件开发</span>
  101. </a>
  102. </el-dropdown-item>
  103. </div>
  104. </div>
  105. <div class="deal-item">
  106. <div class="big-title">
  107. <img src="@/assets/img/header/new/jiejuefangan2@2x.png" alt="招聘用人" >
  108. <span>招聘用人</span>
  109. </div>
  110. <div>
  111. <el-dropdown-item>
  112. <a class="more-item fuwu-item" @click="cnzz('导航栏目','自由工作','')" :href="`${baseUrl}/cloud?from=top_nav`">
  113. <span class="big">云端工作</span>
  114. <span class="small">自由工作、远程工作</span>
  115. </a>
  116. </el-dropdown-item>
  117. <el-dropdown-item>
  118. <a class="more-item fuwu-item" @click="cnzz('导航栏目','人力外包','')" :href="`${baseUrl}/outsource/sitePublicity?from=top_nav`">
  119. <span class="big">人力外包</span>
  120. <span class="small">高效技术人力灵活用工</span>
  121. </a>
  122. </el-dropdown-item>
  123. </div>
  124. </div>
  125. </el-dropdown-menu>
  126. </el-dropdown>
  127. <!-- 服务 -->
  128. <el-dropdown class="more-dropdown" placement="bottom-start">
  129. <el-button type="text" @click="cnzz('导航栏目','服务','')" class="dashboard-title">服务<i class="el-icon-arrow-down"></i></el-button>
  130. <el-dropdown-menu slot="dropdown" class="fuwu-dropdown">
  131. <el-dropdown-item>
  132. <a class="more-item fuwu-item" @click="cnzz('导航栏目','资源商城','')" :href="`${baseUrl}/works/?from=top_nav`">
  133. <img src="@/assets/img/header/new/fuwu1@2x.png" alt="资源商城" >
  134. <div class="text">
  135. <span class="big">资源商城</span>
  136. <span class="small">各种源码资源任您挑选</span>
  137. </div>
  138. </a>
  139. </el-dropdown-item>
  140. <el-dropdown-item>
  141. <a class="more-item fuwu-item" @click="cnzz('导航栏目','咨询服务','')" :href="`${baseUrl}/consult/?from=top_nav`">
  142. <img src="@/assets/img/header/new/fuwu2@2x.png" alt="咨询服务" >
  143. <div class="text">
  144. <span class="big">咨询服务</span>
  145. <span class="small">技术专家面对面咨询</span>
  146. </div>
  147. </a>
  148. </el-dropdown-item>
  149. <el-dropdown-item>
  150. <a class="more-item fuwu-item" @click="cnzz('导航栏目','客栈学院','')" :href="`${baseUrl}/learn/?from=top_nav`">
  151. <img src="@/assets/img/header/new/fuwu3@2x.png" alt="客栈学院" >
  152. <div class="text">
  153. <span class="big">客栈学院</span>
  154. <span class="small">程序员技术学院</span>
  155. </div>
  156. </a>
  157. </el-dropdown-item>
  158. <el-dropdown-item>
  159. <a class="more-item fuwu-item" @click="cnzz('导航栏目','开源充电','')" :href="`${baseUrl}/opensource/?from=top_nav`">
  160. <img src="@/assets/img/header/new/fuwu4@2x.png" alt="开源充电" >
  161. <div class="text">
  162. <span class="big">开源充电</span>
  163. <span class="small">程序员开源社区</span>
  164. </div>
  165. </a>
  166. </el-dropdown-item>
  167. </el-dropdown-menu>
  168. </el-dropdown>
  169. </div>
  170. <div class="header-right">
  171. <!-- 搜索 -->
  172. <div style="margin-right:14px;">
  173. <div style="position: relative;">
  174. <input
  175. class="input"
  176. autocomplete="off"
  177. placeholder="搜索您感兴趣的内容"
  178. v-model="keywork"
  179. @keyup.enter="clickInputEnter"
  180. />
  181. <i class="el-icon-search" @click="clickInputEnter"></i>
  182. </div>
  183. <div class="dropdown" style="display:none;"></div>
  184. <div class="dropdown" style="display:none;"></div>
  185. </div>
  186. <!-- 更多 -->
  187. <el-dropdown class="more-dropdown" placement="bottom-start" style="padding: 0 14px;">
  188. <el-button type="text" @click="cnzz('导航栏目','更多','')" class="dashboard-title">更多</el-button>
  189. <el-dropdown-menu slot="dropdown">
  190. <el-dropdown-item>
  191. <a class="more-item" @click="cnzz('导航栏目','开发屋','')" :href="kaifainUrl">
  192. <img :src="KaifainIcon" alt="" >
  193. <span>开发屋</span>
  194. </a>
  195. </el-dropdown-item>
  196. <el-dropdown-item>
  197. <a class="more-item" @click="cnzz('导航栏目','技术圈','')" :href="jishuBaseUrl">
  198. <img :src="JishuinIcon" alt="" >
  199. <span>技术圈</span>
  200. </a>
  201. </el-dropdown-item>
  202. <el-dropdown-item>
  203. <a class="more-item" @click="cnzz('导航栏目','UniSMS','')" href="https://unisms.apistd.com/?source=pi.pc.nav" target="_blank">
  204. <img src="https://uni-cdn.oss-cn-hangzhou.aliyuncs.com/public/img/unisms-icon.png" alt="" >
  205. <span>UniSMS (合一短信)</span>
  206. </a>
  207. </el-dropdown-item>
  208. <el-dropdown-item>
  209. <a class="more-item" @click="cnzz('导航栏目','YesDev','')" href="https://www.yesdev.cn/" target="_blank">
  210. <img :src="YesDevIcon" alt="" >
  211. <span>YesDev</span>
  212. </a>
  213. </el-dropdown-item>
  214. </el-dropdown-menu>
  215. </el-dropdown>
  216. <template v-if="myInfo.nickname">
  217. <el-dropdown class="nav-dropdown" style="padding:0 14px;">
  218. <el-button type="text" @click="cnzz('导航栏目','工作台','')" class="dashboard-title">
  219. <!-- <i class="el-icon-tickets"></i>工作台 -->
  220. <a class="workstation" :href="baseUrl + '/wo/work_todo'">
  221. <!-- <i class="el-icon-tickets"></i> -->
  222. 工作台
  223. </a>
  224. </el-button>
  225. <!-- <el-dropdown-menu slot="dropdown">
  226. <el-dropdown-item>
  227. <a class="workstation" @click="cnzz('导航栏目','待办任务','')" :href="baseUrl + '/wo/work_todo'">
  228. <i class="el-icon-edit"></i>待办任务
  229. </a>
  230. </el-dropdown-item>
  231. <el-dropdown-item>
  232. <a class="workstation" @click="cnzz('导航栏目','整包项目','')" :href="baseUrl + '/wo/work_platform'">
  233. <i class="el-icon-date"></i>整包项目
  234. </a>
  235. </el-dropdown-item>
  236. <el-dropdown-item>
  237. <a class="workstation" @click="cnzz('导航栏目','按月雇佣','')" :href="baseUrl + '/wo/work_hire'">
  238. <i class="el-icon-news"></i>按月雇佣
  239. </a>
  240. </el-dropdown-item>
  241. <el-dropdown-item>
  242. <a class="workstation" :href="baseUrl + '/wo/work_cloud'">
  243. <i class="el-icon-service"></i>我的远程
  244. </a>
  245. </el-dropdown-item>
  246. </el-dropdown-menu> -->
  247. </el-dropdown>
  248. <el-dropdown class="nav-dropdown" style="padding:0 14px;margin-right: 14px;">
  249. <el-button type="text" @click="cnzz('导航栏目','消息','')" class="message-box-title">
  250. <!-- <i class="el-icon-message"></i> -->
  251. 消息
  252. <span
  253. v-if="messageCount.total > 0"
  254. class="message-count message-total"
  255. >{{ messageCount.total }}</span
  256. >
  257. </el-button>
  258. <el-dropdown-menu slot="dropdown">
  259. <el-dropdown-item
  260. class="message-box"
  261. @click.native="clickMessages('/message/system')"
  262. >
  263. <i class="circle blue"></i>系统消息
  264. <span v-if="messageCount.system" class="message-count">{{
  265. messageCount.system
  266. }}</span>
  267. </el-dropdown-item>
  268. <el-dropdown-item
  269. class="message-box"
  270. @click.native="clickMessages('/message/project')"
  271. >
  272. <i class="circle orange"></i>工作通知
  273. <span v-if="messageCount.work" class="message-count">{{
  274. messageCount.work
  275. }}</span>
  276. </el-dropdown-item>
  277. <el-dropdown-item
  278. class="message-box"
  279. @click.native="clickMessages('/message/comment')"
  280. >
  281. <i class="circle red"></i>评论回复
  282. <span v-if="messageCount.reply" class="message-count">{{
  283. messageCount.reply
  284. }}</span>
  285. </el-dropdown-item>
  286. <el-dropdown-item
  287. class="message-box"
  288. @click.native="clickMessages('/message/at')"
  289. >
  290. <i class="circle green"></i>@我的
  291. <span v-if="messageCount.at" class="message-count">{{
  292. messageCount.at
  293. }}</span>
  294. </el-dropdown-item>
  295. <el-dropdown-item
  296. class="message-box"
  297. @click.native="clickMessages('/message/plus')"
  298. >
  299. <i class="circle pink"></i>赞及其它
  300. <span v-if="messageCount.community_other" class="message-count">{{
  301. messageCount.community_other
  302. }}</span>
  303. </el-dropdown-item>
  304. <el-dropdown-item
  305. class="message-box"
  306. @click.native="clickMessages('/message/coin')"
  307. >
  308. <i class="circle yellow"></i>收支信息
  309. <span v-if="messageCount.balance" class="message-count">{{
  310. messageCount.balance
  311. }}</span>
  312. </el-dropdown-item>
  313. </el-dropdown-menu>
  314. </el-dropdown>
  315. <el-popover
  316. class="nav-popover"
  317. placement="bottom"
  318. width="226"
  319. trigger="hover"
  320. >
  321. <div class="ref" slot="reference">
  322. <a class="nav-header" :href="baseUrl + '/wo/work_todo'">
  323. <img class="header-user" :src="myInfo.icon_url" />
  324. <img
  325. v-if="myInfo.is_vip"
  326. class="header-vip-icon"
  327. :src="baseUrl + `/Public/image/h5/vip_icon${vipImage}.png`"
  328. alt="vip-icon"
  329. />
  330. </a>
  331. </div>
  332. <div class="menu">
  333. <div v-if="myInfo.is_vip" class="vip-info vip-info-com">
  334. <div class="vip-info-top">
  335. <img
  336. class="vip-icon"
  337. :src="baseUrl + `/Public/image/h5/vip_icon${vipImage}.png`"
  338. alt="vip-icon"
  339. />
  340. <span class="vip-content">
  341. <span class="vip-title" :class="vipTextClass">{{
  342. vipText
  343. }}</span>
  344. <br />
  345. <span class="vip-end-date">{{ vipInfo.endDate }}到期</span>
  346. </span>
  347. </div>
  348. <div class="vip-arcs">
  349. <a
  350. class="vip-arc"
  351. :class="vipTextClass"
  352. :href="baseUrl + '/type/vip/' + vipType"
  353. >查看权益</a
  354. >
  355. <a
  356. class="vip-arc"
  357. :class="vipTextClass"
  358. :href="
  359. baseUrl +
  360. '/vip/pay?number=3&amp;product_id=' +
  361. this.$store.state.userinfo.vip_type_id +
  362. '&amp;next=/type/vip/' +
  363. vipType
  364. "
  365. >立即续费</a
  366. >
  367. </div>
  368. </div>
  369. <div class="vip-items">
  370. <!-- <a class="vip-item divider" :href="baseUrl + '/wo/work_platform'">
  371. <i class="el-icon-date"></i>我的项目
  372. </a>
  373. <a class="vip-item" :href="baseUrl + '/wo/work_hire'">
  374. <i class="el-icon-news"></i>我的雇佣
  375. </a>
  376. <a class="vip-item" :href="baseUrl + '/wo/work_cloud'">
  377. <i class="el-icon-service"></i>我的远程
  378. </a> -->
  379. <a
  380. class="vip-item divider"
  381. @click="cnzz('我的','我的主页','')"
  382. :href="baseUrl + `/wo/manage_homepage/`"
  383. >
  384. <i class="el-icon-document"></i>我的主页
  385. </a>
  386. <a class="vip-item" @click="cnzz('我的','技术信用','')" :href="baseUrl + '/credit/pages'">
  387. <i class="el-icon-credit"></i>技术信用
  388. </a>
  389. <a
  390. class="vip-item"
  391. @click="cnzz('我的','收藏中心','')"
  392. :href="baseUrl + '/otherpage/user/collection'"
  393. >
  394. <i class="el-icon-collection"></i>收藏中心
  395. </a>
  396. <a class="vip-item divider" @click="cnzz('我的','APP下载','')" :href="baseUrl + '/index/app'">
  397. <i class="el-icon-download-app"></i>APP下载
  398. </a>
  399. <a class="vip-item" @click="clickQuit">
  400. <i class="el-icon-back" style="margin: 0 10px !important;"></i
  401. >退出
  402. </a>
  403. </div>
  404. </div>
  405. </el-popover>
  406. </template>
  407. <div v-else>
  408. <a
  409. class="account-ctrl"
  410. style="margin-left: 14px;"
  411. @click="cnzz('导航栏目','APP下载','')"
  412. :href="baseUrl + '/index/app'"
  413. >APP下载</a
  414. >
  415. <a class="account-ctrl" @click="cnzz('导航栏目','登录','')" style="margin-left: 26px;margin-right:26px;" :href="loginUrl">登录</a>
  416. <a
  417. class="account-ctrl"
  418. @click="cnzz('导航栏目','注册','')"
  419. :href="baseUrl + '/user/register'"
  420. >注册</a
  421. >
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. </template>
  427. <script>
  428. import WhiteLogo from "@/assets/img/white_logo@2x.png";
  429. import KaifainIcon from "@/assets/img/header/new/kaifain2@2x.png"
  430. import JishuinIcon from "@/assets/img/header/new/jishuin@2x.png"
  431. import YesDevIcon from "@/assets/img/header/new/yesdev@2x.png"
  432. // import DropDownData from "./headers/dropDownData.js";
  433. export default {
  434. props: ["transparent"],
  435. data() {
  436. return {
  437. KaifainIcon,
  438. JishuinIcon,
  439. YesDevIcon,
  440. baseUrl: "",
  441. jishuBaseUrl: "",
  442. kaifainUrl: "",
  443. jobUrl: "",
  444. // 搜索的关键词
  445. keywork: "",
  446. // 消息数量
  447. messageCount: {},
  448. WhiteLogo,
  449. loginUrl: "",
  450. // dropDownData: [],
  451. selectedDropTitle: '',
  452. selectedDrop: 0,
  453. showDropDown: false
  454. };
  455. },
  456. computed: {
  457. vipInfo() {
  458. let userinfo = this.$store.state.userinfo;
  459. return {
  460. id: userinfo.vip_type_id,
  461. endDate: userinfo.vip_end_date
  462. };
  463. },
  464. myInfo() {
  465. return this.$store.state.userinfo;
  466. },
  467. isCom() {
  468. return this.$store.state.userinfo.vip_type_id === "1";
  469. },
  470. vipImage() {
  471. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  472. case 1:
  473. return "_com";
  474. case 2:
  475. return "";
  476. case 3:
  477. return "_premium";
  478. default:
  479. return "";
  480. }
  481. },
  482. vipType() {
  483. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  484. case 1:
  485. case 3:
  486. return "enterprise";
  487. break;
  488. case 2:
  489. return "developer";
  490. }
  491. },
  492. vipTextClass() {
  493. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  494. case 1:
  495. return "is-newly";
  496. case 2:
  497. return "is-dev";
  498. case 3:
  499. return "is-premium";
  500. default:
  501. return "";
  502. }
  503. },
  504. vipText() {
  505. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  506. case 1:
  507. return "初创版会员";
  508. case 2:
  509. return "开发者会员";
  510. case 3:
  511. return "企业版会员";
  512. default:
  513. return "";
  514. }
  515. },
  516. customPosition () {
  517. let customPosition = 'relative'
  518. const routeName = this.$route.name
  519. if (routeName.indexOf('SeoConsultUser') > -1) {
  520. customPosition = 'fixed'
  521. }
  522. return customPosition
  523. }
  524. },
  525. mounted() {
  526. // console.error(this.app.co)
  527. if (this.myInfo && this.myInfo.nickname) {
  528. this.getMessageCount();
  529. }
  530. this.loginUrl =
  531. this.baseUrl +
  532. "/?loginbox=show&next=" +
  533. encodeURIComponent(location.href);
  534. this.keywork = this.$route.query.keyword;
  535. // console.log("this.keywork = ", this.key)
  536. },
  537. methods: {
  538. async clickQuit() {
  539. this.cnzz('我的','退出登录','');
  540. location.href = this.baseUrl + "/user/quit";
  541. },
  542. clickMessages(url) {
  543. location.href = this.baseUrl + url;
  544. },
  545. clickInputEnter() {
  546. let url = "";
  547. console.log(this.$route)
  548. if (this.$route.name === "job") {
  549. url = "/?keyword=" + this.keywork;
  550. } else if (this.$route.name==="user-searchTopic") {
  551. url = "/user/searchTopic?keyword=" + this.keywork;
  552. }
  553. console.log(url);
  554. this.cnzz('我的','放大镜搜索','');
  555. window.location.href = url;
  556. },
  557. async getMessageCount() {
  558. let res = await this.$axios.$get(
  559. "/api/message/getUnreadCount",
  560. {},
  561. { neverLogout: true }
  562. );
  563. if (res) {
  564. this.messageCount = res.data;
  565. }
  566. },
  567. handleTitleMouseover (index) {
  568. this.selectedDropTitle = index
  569. this.selectedDrop = index
  570. },
  571. handleTitleMouseout (index) {
  572. this.selectedDropTitle = ''
  573. }
  574. },
  575. created() {
  576. this.baseUrl = this.$store.state.domainConfig.siteUrl;
  577. this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
  578. this.kaifainUrl = this.$store.state.domainConfig.kaifainUrl;
  579. this.jobUrl = this.$store.state.domainConfig.jobUrl;
  580. }
  581. };
  582. </script>
  583. <style lang="scss" scoped>
  584. .dropDownArea {
  585. position: relative;
  586. .showDropDownArea {
  587. display: none;
  588. }
  589. &:hover {
  590. .showDropDownArea {
  591. margin-top: 28px;
  592. padding-top: 32px;
  593. display: block;
  594. position: absolute;
  595. left: 0;
  596. top: 0;
  597. background: transparent;
  598. transform: translateX(-30%);
  599. .contentArea {
  600. display: flex;
  601. box-sizing: content-box;
  602. width: 830px;
  603. height: 360px;
  604. background: #ffffff;
  605. border-radius: 6px;
  606. box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.06);
  607. .leftSelect {
  608. width: 180px;
  609. height: 100%;
  610. background: #f4f5f9;
  611. .downCell {
  612. height: 75px;
  613. box-sizing: border-box;
  614. padding-left: 30px;
  615. display: flex;
  616. justify-content: center;
  617. flex-direction: column;
  618. .cnName {
  619. height: 23px;
  620. font-size: 17px;
  621. text-align: left;
  622. color: #222222;
  623. line-height: 23px;
  624. font-weight: 600;
  625. }
  626. .enName {
  627. height: 17px;
  628. font-size: 12px;
  629. text-align: left;
  630. color: #999999;
  631. line-height: 17px;
  632. }
  633. &.choosed {
  634. background: #fff;
  635. position: relative;
  636. &:after {
  637. position: absolute;
  638. content: "";
  639. width: 3px;
  640. height: 31px;
  641. background: #308eff;
  642. left: 0;
  643. top: 50%;
  644. transform: translateY(-50%);
  645. }
  646. }
  647. }
  648. }
  649. .rightShow {
  650. width: 650px;
  651. background: #fff;
  652. height: 100%;
  653. box-sizing: border-box;
  654. padding: 0 34px 0 23px;
  655. .rightBigCell {
  656. display: none;
  657. justify-content: space-between;
  658. width: 594px;
  659. height: auto;
  660. // box-shadow: 0px -1px 0px 0px #e2e8ee inset;
  661. padding-bottom: 14px;
  662. box-sizing: border-box;
  663. flex-wrap: wrap;
  664. &:last-child {
  665. box-shadow: none;
  666. }
  667. .smallCell {
  668. height: 110px;
  669. margin-top: 14px;
  670. display: flex;
  671. justify-content: flex-start;
  672. align-items: center;
  673. width: 280px;
  674. cursor: pointer;
  675. box-sizing: border-box;
  676. padding-left: 40px;
  677. border-radius: 12px;
  678. .cellLeftIcon {
  679. flex-shrink: 0;
  680. width: 40px;
  681. height: 40px;
  682. img {
  683. width: 40px;
  684. height: 40px;
  685. }
  686. }
  687. .cellRightArea {
  688. margin-left: 11px;
  689. .cellRightName {
  690. height: 24px;
  691. font-size: 18px;
  692. text-align: left;
  693. color: #222222;
  694. line-height: 24px;
  695. font-weight: 600;
  696. }
  697. .cellRightDesc {
  698. margin-top: 1px;
  699. height: 19px;
  700. font-size: 14px;
  701. text-align: left;
  702. color: #999999;
  703. line-height: 19px;
  704. }
  705. }
  706. }
  707. &.ok {
  708. display: flex;
  709. .smallCell {
  710. background-color: rgb(238, 246, 254);
  711. }
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. }
  719. .more-item {
  720. // padding: 4px 12px 4px 8px;
  721. display: flex;
  722. align-items: center;
  723. img {
  724. width: 24px;
  725. height: 24px;
  726. margin-right: 12px;
  727. }
  728. span {
  729. font-size: 15px;
  730. color: rgba(0, 0, 0, .85);
  731. font-weight: 500;
  732. }
  733. }
  734. .more-item.fuwu-item {
  735. img {
  736. width: 28px;
  737. height: 28px;
  738. }
  739. .text {
  740. display: flex;
  741. flex-direction: column;
  742. }
  743. .big {
  744. font-size: 15px;
  745. font-family: PingFangSC, PingFangSC-Semibold;
  746. font-weight: 600;
  747. color: #222;
  748. }
  749. .small {
  750. font-size: 12px;
  751. font-family: PingFangSC, PingFangSC-Regular;
  752. font-weight: 400;
  753. color: #666;
  754. }
  755. }
  756. .fuwu-dropdown {
  757. padding: 10px 0;
  758. // top: 60px;
  759. .el-dropdown-menu__item {
  760. line-height: 20px !important;
  761. padding: 12px 20px !important;
  762. }
  763. }
  764. .jiejuefangan-dropdown {
  765. display: flex;
  766. padding: 36px;
  767. .big-title {
  768. display: flex;
  769. align-items: center;
  770. padding-bottom: 12px;
  771. img {
  772. width: 28px;
  773. height: 28px;
  774. }
  775. span {
  776. font-size: 18px;
  777. font-family: PingFangSC, PingFangSC-Semibold;
  778. font-weight: 600;
  779. color: #222;
  780. margin-left: 6px;
  781. }
  782. }
  783. .more-item.fuwu-item {
  784. flex-direction: column;
  785. align-items: inherit;
  786. }
  787. .el-dropdown-menu__item {
  788. line-height: 20px !important;
  789. padding: 10px 10px 10px 34px;
  790. }
  791. }
  792. </style>
  793. <style scoped>
  794. #proginn-header {
  795. position: relative;
  796. display: flex;
  797. justify-content: center;
  798. width: 100%;
  799. background: white;
  800. z-index: 10;
  801. }
  802. .list {
  803. display: flex;
  804. justify-content: space-between;
  805. width: 1200px;
  806. }
  807. .header-left {
  808. display: flex;
  809. align-items: center;
  810. }
  811. .header-right {
  812. display: flex;
  813. align-items: center;
  814. }
  815. .nav-item {
  816. display: flex;
  817. height: 83px;
  818. align-items: center;
  819. font-size: 15px;
  820. color: #515151;
  821. /* padding: 0 15px; */
  822. box-sizing: border-box;
  823. padding: 0 14px;
  824. }
  825. .nav-item.logo {
  826. margin-right: 24px;
  827. padding: 0;
  828. }
  829. .nav-item:first-child {
  830. padding: 0;
  831. }
  832. .nav-item:nth-child(n + 2):hover {
  833. color: #1782d9;
  834. border-top: 5px solid transparent;
  835. border-bottom: 5px solid #1782d9;
  836. }
  837. .nav-dropdown,
  838. .nav-popover {
  839. --imgWidth: 28px;
  840. height: 40px;
  841. display: flex;
  842. align-items: center;
  843. }
  844. .nav-popover > .ref {
  845. display: flex;
  846. align-items: center;
  847. }
  848. .nav-header {
  849. position: relative;
  850. width: var(--imgWidth);
  851. height: var(--imgWidth);
  852. margin-right: 5px;
  853. }
  854. .logo {
  855. width: 140px;
  856. height: auto;
  857. }
  858. .input {
  859. width: 234px;
  860. height: 40px;
  861. border-radius: 20px;
  862. background: #f6f6f6;
  863. padding: 0 40px;
  864. border: 1px solid #ebebeb;
  865. font-size: 13px;
  866. }
  867. .more-dropdown {
  868. padding: 0 14px;
  869. }
  870. .el-icon-search {
  871. position: absolute;
  872. top: 12px;
  873. right: 20px;
  874. color: grey;
  875. cursor: pointer;
  876. }
  877. .el-icon-credit {
  878. background: url("~@/assets/img/header/creditIconMine.png") no-repeat;
  879. background-size: cover;
  880. width: 16px;
  881. height: 16px;
  882. vertical-align: middle;
  883. margin: 0 9px !important;
  884. }
  885. .el-icon-download-app {
  886. background: url("~@/assets/img/header/download@2x.png") no-repeat;
  887. background-size: cover;
  888. width: 16px;
  889. height: 16px;
  890. vertical-align: middle;
  891. margin: 0 9px !important;
  892. }
  893. .el-icon-search::before {
  894. font-size: 14px;
  895. font-weight: 800;
  896. }
  897. i {
  898. margin-right: 4px;
  899. }
  900. i.circle {
  901. display: inline-block;
  902. --width: 12px;
  903. width: var(--width);
  904. height: var(--width);
  905. border-radius: calc(var(--width) / 2);
  906. }
  907. i.blue {
  908. background: #3b83c0;
  909. }
  910. i.orange {
  911. background: #e07b53;
  912. }
  913. i.red {
  914. background: #d95c5c;
  915. }
  916. i.green {
  917. background: #5bbd72;
  918. }
  919. i.pink {
  920. background: #d9499a;
  921. }
  922. i.yellow {
  923. background: #f2c61f;
  924. }
  925. .message-box {
  926. position: relative;
  927. display: flex;
  928. align-items: center;
  929. }
  930. .message-count {
  931. color: white;
  932. margin-left: 4px;
  933. display: block;
  934. line-height: 18px;
  935. padding: 0 8px;
  936. border-radius: 9px;
  937. background: grey;
  938. }
  939. .message-count.message-total {
  940. position: absolute;
  941. top: 0px;
  942. right: -10px;
  943. background: #d95c5c;
  944. }
  945. span.other-icon {
  946. display: block;
  947. margin-left: 30px;
  948. }
  949. .nickname {
  950. font-size: 15px;
  951. }
  952. .vip-info {
  953. display: flex;
  954. flex-direction: column;
  955. justify-content: center;
  956. align-items: center;
  957. width: 206px;
  958. height: 120px;
  959. }
  960. .vip-info-top {
  961. display: flex;
  962. width: 142px;
  963. }
  964. .vip-title {
  965. color: #cb9d53;
  966. font-size: 16px;
  967. line-height: 36px;
  968. }
  969. .vip-icon {
  970. width: 24px;
  971. height: 24px;
  972. margin: 10px 8px 0 0;
  973. }
  974. .vip-end-date {
  975. font-size: 12px;
  976. color: #999;
  977. }
  978. .vip-arcs {
  979. display: flex;
  980. justify-content: space-between;
  981. width: 142px;
  982. margin-top: 11px;
  983. }
  984. .vip-arc {
  985. flex: 1;
  986. font-size: 13px;
  987. color: #cb9d53;
  988. text-align: center;
  989. }
  990. .vip-arc:first-child {
  991. border-right: 1px solid rgba(245, 245, 245, 1);
  992. }
  993. .vip-info-com .vip-title {
  994. color: rgb(113, 177, 253);
  995. }
  996. .vip-info-com .vip-arc {
  997. color: rgb(113, 177, 253);
  998. }
  999. .header-user {
  1000. width: var(--imgWidth);
  1001. height: var(--imgWidth);
  1002. border-radius: 20px;
  1003. }
  1004. .header-vip-icon {
  1005. position: absolute;
  1006. top: 16px;
  1007. left: 18px;
  1008. width: 16px;
  1009. height: 16px;
  1010. }
  1011. .vip-items {
  1012. display: flex;
  1013. flex-direction: column;
  1014. }
  1015. .vip-item {
  1016. line-height: 32px;
  1017. color: #606266;
  1018. }
  1019. .vip-item > i {
  1020. margin: 0 10px;
  1021. }
  1022. .divider {
  1023. border-top: 1px solid rgba(0, 0, 0, 0.05);
  1024. margin-top: 10px;
  1025. padding-top: 10px;
  1026. cursor: pointer;
  1027. }
  1028. .vip-info-com .is-dev {
  1029. color: #cb9d53;
  1030. }
  1031. .vip-info-com .is-newly {
  1032. color: #308eff;
  1033. }
  1034. .vip-info-com .is-premium {
  1035. color: #00c469;
  1036. }
  1037. .workstation {
  1038. color: #606266;
  1039. }
  1040. .account-ctrl {
  1041. color: #606266;
  1042. font-size: 15px;
  1043. }
  1044. #proginn-header a {
  1045. text-decoration: none !important;
  1046. }
  1047. #proginn-header.transparent {
  1048. background: transparent;
  1049. border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  1050. }
  1051. #proginn-header.transparent a {
  1052. color: white;
  1053. }
  1054. .message-box-title,
  1055. .dashboard-title {
  1056. color: #515151;
  1057. font-size: 15px;
  1058. font-weight: normal;
  1059. }
  1060. .dashboard-title.on {
  1061. color: #1782d9;
  1062. }
  1063. #proginn-header.transparent .message-box-title,
  1064. #proginn-header.transparent .dashboard-title {
  1065. color: white;
  1066. }
  1067. #proginn-header.transparent .nickname {
  1068. color: white;
  1069. }
  1070. </style>