header.vue 34 KB

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