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}/outsource/hirernew?is_package=1&hotsale_id=4`">
  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}/outsource/sitePublicity?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}/cloud?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. <span class="nickname">{{ myInfo.nickname }}</span>
  332. </div>
  333. <div class="menu">
  334. <div v-if="myInfo.is_vip" class="vip-info vip-info-com">
  335. <div class="vip-info-top">
  336. <img
  337. class="vip-icon"
  338. :src="baseUrl + `/Public/image/h5/vip_icon${vipImage}.png`"
  339. alt="vip-icon"
  340. />
  341. <span class="vip-content">
  342. <span class="vip-title" :class="vipTextClass">{{
  343. vipText
  344. }}</span>
  345. <br />
  346. <span class="vip-end-date">{{ vipInfo.endDate }}到期</span>
  347. </span>
  348. </div>
  349. <div class="vip-arcs">
  350. <a
  351. class="vip-arc"
  352. :class="vipTextClass"
  353. :href="baseUrl + '/type/vip/' + vipType"
  354. >查看权益</a
  355. >
  356. <a
  357. class="vip-arc"
  358. :class="vipTextClass"
  359. :href="
  360. baseUrl +
  361. '/vip/pay?number=3&amp;product_id=' +
  362. this.$store.state.userinfo.vip_type_id +
  363. '&amp;next=/type/vip/' +
  364. vipType
  365. "
  366. >立即续费</a
  367. >
  368. </div>
  369. </div>
  370. <div class="vip-items">
  371. <!-- <a class="vip-item divider" :href="baseUrl + '/wo/work_platform'">
  372. <i class="el-icon-date"></i>我的项目
  373. </a>
  374. <a class="vip-item" :href="baseUrl + '/wo/work_hire'">
  375. <i class="el-icon-news"></i>我的雇佣
  376. </a>
  377. <a class="vip-item" :href="baseUrl + '/wo/work_cloud'">
  378. <i class="el-icon-service"></i>我的远程
  379. </a> -->
  380. <a
  381. class="vip-item divider"
  382. @click="cnzz('我的','我的主页','')"
  383. :href="baseUrl + `/wo/manage_homepage/`"
  384. >
  385. <i class="el-icon-document"></i>我的主页
  386. </a>
  387. <a class="vip-item" @click="cnzz('我的','技术信用','')" :href="baseUrl + '/credit/pages'">
  388. <i class="el-icon-credit"></i>技术信用
  389. </a>
  390. <a
  391. class="vip-item"
  392. @click="cnzz('我的','收藏中心','')"
  393. :href="baseUrl + '/otherpage/user/collection'"
  394. >
  395. <i class="el-icon-collection"></i>收藏中心
  396. </a>
  397. <a class="vip-item divider" @click="cnzz('我的','APP下载','')" :href="baseUrl + '/index/app'">
  398. <i class="el-icon-download-app"></i>APP下载
  399. </a>
  400. <a class="vip-item" @click="clickQuit">
  401. <i class="el-icon-back" style="margin: 0 10px !important;"></i
  402. >退出
  403. </a>
  404. </div>
  405. </div>
  406. </el-popover>
  407. </template>
  408. <div v-else>
  409. <a
  410. class="account-ctrl"
  411. style="margin-left: 14px;"
  412. @click="cnzz('导航栏目','APP下载','')"
  413. :href="baseUrl + '/index/app'"
  414. >APP下载</a
  415. >
  416. <a class="account-ctrl" @click="cnzz('导航栏目','登录','')" style="margin-left: 26px;margin-right:26px;" :href="loginUrl">登录</a>
  417. <a
  418. class="account-ctrl"
  419. @click="cnzz('导航栏目','注册','')"
  420. :href="baseUrl + '/user/register'"
  421. >注册</a
  422. >
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. </template>
  428. <script>
  429. import WhiteLogo from "@/assets/img/white_logo@2x.png";
  430. import KaifainIcon from "@/assets/img/header/new/kaifain2@2x.png"
  431. import JishuinIcon from "@/assets/img/header/new/jishuin@2x.png"
  432. import YesDevIcon from "@/assets/img/header/new/yesdev@2x.png"
  433. // import DropDownData from "./headers/dropDownData.js";
  434. export default {
  435. props: ["transparent"],
  436. data() {
  437. return {
  438. KaifainIcon,
  439. JishuinIcon,
  440. YesDevIcon,
  441. baseUrl: "",
  442. jishuBaseUrl: "",
  443. kaifainUrl: "",
  444. jobUrl: "",
  445. // 搜索的关键词
  446. keywork: "",
  447. // 消息数量
  448. messageCount: {},
  449. WhiteLogo,
  450. loginUrl: "",
  451. // dropDownData: [],
  452. selectedDropTitle: '',
  453. selectedDrop: 0,
  454. showDropDown: false
  455. };
  456. },
  457. computed: {
  458. vipInfo() {
  459. let userinfo = this.$store.state.userinfo;
  460. return {
  461. id: userinfo.vip_type_id,
  462. endDate: userinfo.vip_end_date
  463. };
  464. },
  465. myInfo() {
  466. return this.$store.state.userinfo;
  467. },
  468. isCom() {
  469. return this.$store.state.userinfo.vip_type_id === "1";
  470. },
  471. vipImage() {
  472. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  473. case 1:
  474. return "_com";
  475. case 2:
  476. return "";
  477. case 3:
  478. return "_premium";
  479. default:
  480. return "";
  481. }
  482. },
  483. vipType() {
  484. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  485. case 1:
  486. case 3:
  487. return "enterprise";
  488. break;
  489. case 2:
  490. return "developer";
  491. }
  492. },
  493. vipTextClass() {
  494. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  495. case 1:
  496. return "is-newly";
  497. case 2:
  498. return "is-dev";
  499. case 3:
  500. return "is-premium";
  501. default:
  502. return "";
  503. }
  504. },
  505. vipText() {
  506. switch (parseInt(this.$store.state.userinfo.vip_type_id)) {
  507. case 1:
  508. return "初创版会员";
  509. case 2:
  510. return "开发者会员";
  511. case 3:
  512. return "企业版会员";
  513. default:
  514. return "";
  515. }
  516. },
  517. customPosition () {
  518. let customPosition = 'relative'
  519. const routeName = this.$route.name
  520. if (routeName.indexOf('SeoConsultUser') > -1) {
  521. customPosition = 'fixed'
  522. }
  523. return customPosition
  524. }
  525. },
  526. mounted() {
  527. // console.error(this.app.co)
  528. if (this.myInfo && this.myInfo.nickname) {
  529. this.getMessageCount();
  530. }
  531. this.loginUrl =
  532. this.baseUrl +
  533. "/?loginbox=show&next=" +
  534. encodeURIComponent(location.href);
  535. this.keywork = this.$route.query.keyword;
  536. // console.log("this.keywork = ", this.key)
  537. },
  538. methods: {
  539. async clickQuit() {
  540. this.cnzz('我的','退出登录','');
  541. location.href = this.baseUrl + "/user/quit";
  542. },
  543. clickMessages(url) {
  544. location.href = this.baseUrl + url;
  545. },
  546. clickInputEnter() {
  547. let url = "";
  548. console.log(this.$route)
  549. if (this.$route.name === "job") {
  550. url = "/?keyword=" + this.keywork;
  551. } else if (this.$route.name==="user-searchTopic") {
  552. url = "/user/searchTopic?keyword=" + this.keywork;
  553. }
  554. console.log(url);
  555. this.cnzz('我的','放大镜搜索','');
  556. window.location.href = url;
  557. },
  558. async getMessageCount() {
  559. let res = await this.$axios.$get(
  560. "/api/message/getUnreadCount",
  561. {},
  562. { neverLogout: true }
  563. );
  564. if (res) {
  565. this.messageCount = res.data;
  566. }
  567. },
  568. handleTitleMouseover (index) {
  569. this.selectedDropTitle = index
  570. this.selectedDrop = index
  571. },
  572. handleTitleMouseout (index) {
  573. this.selectedDropTitle = ''
  574. }
  575. },
  576. created() {
  577. this.baseUrl = this.$store.state.domainConfig.siteUrl;
  578. this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
  579. this.kaifainUrl = this.$store.state.domainConfig.kaifainUrl;
  580. this.jobUrl = this.$store.state.domainConfig.jobUrl;
  581. }
  582. };
  583. </script>
  584. <style lang="scss" scoped>
  585. .dropDownArea {
  586. position: relative;
  587. .showDropDownArea {
  588. display: none;
  589. }
  590. &:hover {
  591. .showDropDownArea {
  592. margin-top: 28px;
  593. padding-top: 32px;
  594. display: block;
  595. position: absolute;
  596. left: 0;
  597. top: 0;
  598. background: transparent;
  599. transform: translateX(-30%);
  600. .contentArea {
  601. display: flex;
  602. box-sizing: content-box;
  603. width: 830px;
  604. height: 360px;
  605. background: #ffffff;
  606. border-radius: 6px;
  607. box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.06);
  608. .leftSelect {
  609. width: 180px;
  610. height: 100%;
  611. background: #f4f5f9;
  612. .downCell {
  613. height: 75px;
  614. box-sizing: border-box;
  615. padding-left: 30px;
  616. display: flex;
  617. justify-content: center;
  618. flex-direction: column;
  619. .cnName {
  620. height: 23px;
  621. font-size: 17px;
  622. text-align: left;
  623. color: #222222;
  624. line-height: 23px;
  625. font-weight: 600;
  626. }
  627. .enName {
  628. height: 17px;
  629. font-size: 12px;
  630. text-align: left;
  631. color: #999999;
  632. line-height: 17px;
  633. }
  634. &.choosed {
  635. background: #fff;
  636. position: relative;
  637. &:after {
  638. position: absolute;
  639. content: "";
  640. width: 3px;
  641. height: 31px;
  642. background: #308eff;
  643. left: 0;
  644. top: 50%;
  645. transform: translateY(-50%);
  646. }
  647. }
  648. }
  649. }
  650. .rightShow {
  651. width: 650px;
  652. background: #fff;
  653. height: 100%;
  654. box-sizing: border-box;
  655. padding: 0 34px 0 23px;
  656. .rightBigCell {
  657. display: none;
  658. justify-content: space-between;
  659. width: 594px;
  660. height: auto;
  661. // box-shadow: 0px -1px 0px 0px #e2e8ee inset;
  662. padding-bottom: 14px;
  663. box-sizing: border-box;
  664. flex-wrap: wrap;
  665. &:last-child {
  666. box-shadow: none;
  667. }
  668. .smallCell {
  669. height: 110px;
  670. margin-top: 14px;
  671. display: flex;
  672. justify-content: flex-start;
  673. align-items: center;
  674. width: 280px;
  675. cursor: pointer;
  676. box-sizing: border-box;
  677. padding-left: 40px;
  678. border-radius: 12px;
  679. .cellLeftIcon {
  680. flex-shrink: 0;
  681. width: 40px;
  682. height: 40px;
  683. img {
  684. width: 40px;
  685. height: 40px;
  686. }
  687. }
  688. .cellRightArea {
  689. margin-left: 11px;
  690. .cellRightName {
  691. height: 24px;
  692. font-size: 18px;
  693. text-align: left;
  694. color: #222222;
  695. line-height: 24px;
  696. font-weight: 600;
  697. }
  698. .cellRightDesc {
  699. margin-top: 1px;
  700. height: 19px;
  701. font-size: 14px;
  702. text-align: left;
  703. color: #999999;
  704. line-height: 19px;
  705. }
  706. }
  707. }
  708. &.ok {
  709. display: flex;
  710. .smallCell {
  711. background-color: rgb(238, 246, 254);
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. }
  719. }
  720. .more-item {
  721. // padding: 4px 12px 4px 8px;
  722. display: flex;
  723. align-items: center;
  724. img {
  725. width: 24px;
  726. height: 24px;
  727. margin-right: 12px;
  728. }
  729. span {
  730. font-size: 15px;
  731. color: rgba(0, 0, 0, .85);
  732. font-weight: 500;
  733. }
  734. }
  735. .more-item.fuwu-item {
  736. img {
  737. width: 28px;
  738. height: 28px;
  739. }
  740. .text {
  741. display: flex;
  742. flex-direction: column;
  743. }
  744. .big {
  745. font-size: 15px;
  746. font-family: PingFangSC, PingFangSC-Semibold;
  747. font-weight: 600;
  748. color: #222;
  749. }
  750. .small {
  751. font-size: 12px;
  752. font-family: PingFangSC, PingFangSC-Regular;
  753. font-weight: 400;
  754. color: #666;
  755. }
  756. }
  757. .fuwu-dropdown {
  758. padding: 10px 0;
  759. // top: 60px;
  760. .el-dropdown-menu__item {
  761. line-height: 20px !important;
  762. padding: 12px 20px !important;
  763. }
  764. }
  765. .jiejuefangan-dropdown {
  766. display: flex;
  767. padding: 36px;
  768. .big-title {
  769. display: flex;
  770. align-items: center;
  771. padding-bottom: 12px;
  772. img {
  773. width: 28px;
  774. height: 28px;
  775. }
  776. span {
  777. font-size: 18px;
  778. font-family: PingFangSC, PingFangSC-Semibold;
  779. font-weight: 600;
  780. color: #222;
  781. margin-left: 6px;
  782. }
  783. }
  784. .more-item.fuwu-item {
  785. flex-direction: column;
  786. align-items: inherit;
  787. }
  788. .el-dropdown-menu__item {
  789. line-height: 20px !important;
  790. padding: 10px 10px 10px 34px;
  791. }
  792. }
  793. </style>
  794. <style scoped>
  795. #proginn-header {
  796. position: relative;
  797. display: flex;
  798. justify-content: center;
  799. width: 100%;
  800. background: white;
  801. z-index: 10;
  802. }
  803. .list {
  804. display: flex;
  805. justify-content: space-between;
  806. width: 1200px;
  807. }
  808. .header-left {
  809. display: flex;
  810. align-items: center;
  811. }
  812. .header-right {
  813. display: flex;
  814. align-items: center;
  815. }
  816. .nav-item {
  817. display: flex;
  818. height: 83px;
  819. align-items: center;
  820. font-size: 15px;
  821. color: #515151;
  822. /* padding: 0 15px; */
  823. box-sizing: border-box;
  824. padding: 0 14px;
  825. }
  826. .nav-item.logo {
  827. margin-right: 24px;
  828. padding: 0;
  829. }
  830. .nav-item:first-child {
  831. padding: 0;
  832. }
  833. .nav-item:nth-child(n + 2):hover {
  834. color: #1782d9;
  835. border-top: 5px solid transparent;
  836. border-bottom: 5px solid #1782d9;
  837. }
  838. .nav-dropdown,
  839. .nav-popover {
  840. --imgWidth: 28px;
  841. height: 40px;
  842. display: flex;
  843. align-items: center;
  844. }
  845. .nav-popover > .ref {
  846. display: flex;
  847. align-items: center;
  848. }
  849. .nav-header {
  850. position: relative;
  851. width: var(--imgWidth);
  852. height: var(--imgWidth);
  853. margin-right: 5px;
  854. }
  855. .logo {
  856. width: 140px;
  857. height: auto;
  858. }
  859. .input {
  860. width: 234px;
  861. height: 40px;
  862. border-radius: 20px;
  863. background: #f6f6f6;
  864. padding: 0 40px;
  865. border: 1px solid #ebebeb;
  866. font-size: 13px;
  867. }
  868. .more-dropdown {
  869. padding: 0 14px;
  870. }
  871. .el-icon-search {
  872. position: absolute;
  873. top: 12px;
  874. right: 20px;
  875. color: grey;
  876. cursor: pointer;
  877. }
  878. .el-icon-credit {
  879. background: url("~@/assets/img/header/creditIconMine.png") no-repeat;
  880. background-size: cover;
  881. width: 16px;
  882. height: 16px;
  883. vertical-align: middle;
  884. margin: 0 9px !important;
  885. }
  886. .el-icon-download-app {
  887. background: url("~@/assets/img/header/download@2x.png") no-repeat;
  888. background-size: cover;
  889. width: 16px;
  890. height: 16px;
  891. vertical-align: middle;
  892. margin: 0 9px !important;
  893. }
  894. .el-icon-search::before {
  895. font-size: 14px;
  896. font-weight: 800;
  897. }
  898. i {
  899. margin-right: 4px;
  900. }
  901. i.circle {
  902. display: inline-block;
  903. --width: 12px;
  904. width: var(--width);
  905. height: var(--width);
  906. border-radius: calc(var(--width) / 2);
  907. }
  908. i.blue {
  909. background: #3b83c0;
  910. }
  911. i.orange {
  912. background: #e07b53;
  913. }
  914. i.red {
  915. background: #d95c5c;
  916. }
  917. i.green {
  918. background: #5bbd72;
  919. }
  920. i.pink {
  921. background: #d9499a;
  922. }
  923. i.yellow {
  924. background: #f2c61f;
  925. }
  926. .message-box {
  927. position: relative;
  928. display: flex;
  929. align-items: center;
  930. }
  931. .message-count {
  932. color: white;
  933. margin-left: 4px;
  934. display: block;
  935. line-height: 18px;
  936. padding: 0 8px;
  937. border-radius: 9px;
  938. background: grey;
  939. }
  940. .message-count.message-total {
  941. position: absolute;
  942. top: 0px;
  943. right: -10px;
  944. background: #d95c5c;
  945. }
  946. span.other-icon {
  947. display: block;
  948. margin-left: 30px;
  949. }
  950. .nickname {
  951. font-size: 15px;
  952. }
  953. .vip-info {
  954. display: flex;
  955. flex-direction: column;
  956. justify-content: center;
  957. align-items: center;
  958. width: 206px;
  959. height: 120px;
  960. }
  961. .vip-info-top {
  962. display: flex;
  963. width: 142px;
  964. }
  965. .vip-title {
  966. color: #cb9d53;
  967. font-size: 16px;
  968. line-height: 36px;
  969. }
  970. .vip-icon {
  971. width: 24px;
  972. height: 24px;
  973. margin: 10px 8px 0 0;
  974. }
  975. .vip-end-date {
  976. font-size: 12px;
  977. color: #999;
  978. }
  979. .vip-arcs {
  980. display: flex;
  981. justify-content: space-between;
  982. width: 142px;
  983. margin-top: 11px;
  984. }
  985. .vip-arc {
  986. flex: 1;
  987. font-size: 13px;
  988. color: #cb9d53;
  989. text-align: center;
  990. }
  991. .vip-arc:first-child {
  992. border-right: 1px solid rgba(245, 245, 245, 1);
  993. }
  994. .vip-info-com .vip-title {
  995. color: rgb(113, 177, 253);
  996. }
  997. .vip-info-com .vip-arc {
  998. color: rgb(113, 177, 253);
  999. }
  1000. .header-user {
  1001. width: var(--imgWidth);
  1002. height: var(--imgWidth);
  1003. border-radius: 20px;
  1004. }
  1005. .header-vip-icon {
  1006. position: absolute;
  1007. top: 16px;
  1008. left: 18px;
  1009. width: 16px;
  1010. height: 16px;
  1011. }
  1012. .vip-items {
  1013. display: flex;
  1014. flex-direction: column;
  1015. }
  1016. .vip-item {
  1017. line-height: 32px;
  1018. color: #606266;
  1019. }
  1020. .vip-item > i {
  1021. margin: 0 10px;
  1022. }
  1023. .divider {
  1024. border-top: 1px solid rgba(0, 0, 0, 0.05);
  1025. margin-top: 10px;
  1026. padding-top: 10px;
  1027. cursor: pointer;
  1028. }
  1029. .vip-info-com .is-dev {
  1030. color: #cb9d53;
  1031. }
  1032. .vip-info-com .is-newly {
  1033. color: #308eff;
  1034. }
  1035. .vip-info-com .is-premium {
  1036. color: #00c469;
  1037. }
  1038. .workstation {
  1039. color: #606266;
  1040. }
  1041. .account-ctrl {
  1042. color: #606266;
  1043. font-size: 15px;
  1044. }
  1045. #proginn-header a {
  1046. text-decoration: none !important;
  1047. }
  1048. #proginn-header.transparent {
  1049. background: transparent;
  1050. border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  1051. }
  1052. #proginn-header.transparent a {
  1053. color: white;
  1054. }
  1055. .message-box-title,
  1056. .dashboard-title {
  1057. color: #515151;
  1058. font-size: 15px;
  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>