header.vue 33 KB

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