header.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249
  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 @click="goToCompanyHome" v-if="isCompanyAccount || !myInfo.nickname" class="nav-button nav-button-type1">
  218. 发布需求
  219. </div>
  220. <div @click="goToPersonalHome" v-if="isPersonalAccount || !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 + '/frontend/accountchange'"
  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. goToCompanyHome(){
  561. // 点击发布需求
  562. // 如没登录,跳到登录页
  563. if(this.myInfo.nickname){
  564. location.href = "/frontend/requirements"
  565. }else{
  566. location.href = this.loginUrl
  567. }
  568. },
  569. goToPersonalHome(){
  570. // 点击开发者入驻
  571. // 如没登录,跳到登录页
  572. if(this.myInfo.nickname){
  573. }else{
  574. location.href = this.loginUrl
  575. }
  576. },
  577. async clickQuit() {
  578. this.cnzz('我的','退出登录','');
  579. location.href = this.baseUrl + "/user/quit";
  580. },
  581. clickMessages(url) {
  582. location.href = this.baseUrl + url;
  583. },
  584. clickInputEnter() {
  585. let url = "";
  586. console.log(this.$route)
  587. if (this.$route.name === "job") {
  588. url = "/?keyword=" + this.keywork;
  589. } else if (this.$route.name==="user-searchTopic") {
  590. url = "/user/searchTopic?keyword=" + this.keywork;
  591. }
  592. console.log(url);
  593. this.cnzz('我的','放大镜搜索','');
  594. window.location.href = url;
  595. },
  596. async getMessageCount() {
  597. let res = await this.$axios.$get(
  598. "/api/message/getUnreadCount",
  599. {},
  600. { neverLogout: true }
  601. );
  602. if (res) {
  603. this.messageCount = res.data;
  604. }
  605. },
  606. handleTitleMouseover (index) {
  607. this.selectedDropTitle = index
  608. this.selectedDrop = index
  609. },
  610. handleTitleMouseout (index) {
  611. this.selectedDropTitle = ''
  612. }
  613. },
  614. created() {
  615. this.baseUrl = this.$store.state.domainConfig.siteUrl;
  616. this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
  617. this.kaifainUrl = this.$store.state.domainConfig.kaifainUrl;
  618. this.jobUrl = this.$store.state.domainConfig.jobUrl;
  619. }
  620. };
  621. </script>
  622. <style lang="scss" scoped>
  623. .dropDownArea {
  624. position: relative;
  625. .showDropDownArea {
  626. display: none;
  627. }
  628. &:hover {
  629. .showDropDownArea {
  630. margin-top: 28px;
  631. padding-top: 32px;
  632. display: block;
  633. position: absolute;
  634. left: 0;
  635. top: 0;
  636. background: transparent;
  637. transform: translateX(-30%);
  638. .contentArea {
  639. display: flex;
  640. box-sizing: content-box;
  641. width: 830px;
  642. height: 360px;
  643. background: #ffffff;
  644. border-radius: 6px;
  645. box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.06);
  646. .leftSelect {
  647. width: 180px;
  648. height: 100%;
  649. background: #f4f5f9;
  650. .downCell {
  651. height: 75px;
  652. box-sizing: border-box;
  653. padding-left: 30px;
  654. display: flex;
  655. justify-content: center;
  656. flex-direction: column;
  657. .cnName {
  658. height: 23px;
  659. font-size: 17px;
  660. text-align: left;
  661. color: #222222;
  662. line-height: 23px;
  663. font-weight: 600;
  664. }
  665. .enName {
  666. height: 17px;
  667. font-size: 12px;
  668. text-align: left;
  669. color: #999999;
  670. line-height: 17px;
  671. }
  672. &.choosed {
  673. background: #fff;
  674. position: relative;
  675. &:after {
  676. position: absolute;
  677. content: "";
  678. width: 3px;
  679. height: 31px;
  680. background: #308eff;
  681. left: 0;
  682. top: 50%;
  683. transform: translateY(-50%);
  684. }
  685. }
  686. }
  687. }
  688. .rightShow {
  689. width: 650px;
  690. background: #fff;
  691. height: 100%;
  692. box-sizing: border-box;
  693. padding: 0 34px 0 23px;
  694. .rightBigCell {
  695. display: none;
  696. justify-content: space-between;
  697. width: 594px;
  698. height: auto;
  699. // box-shadow: 0px -1px 0px 0px #e2e8ee inset;
  700. padding-bottom: 14px;
  701. box-sizing: border-box;
  702. flex-wrap: wrap;
  703. &:last-child {
  704. box-shadow: none;
  705. }
  706. .smallCell {
  707. height: 110px;
  708. margin-top: 14px;
  709. display: flex;
  710. justify-content: flex-start;
  711. align-items: center;
  712. width: 280px;
  713. cursor: pointer;
  714. box-sizing: border-box;
  715. padding-left: 40px;
  716. border-radius: 12px;
  717. .cellLeftIcon {
  718. flex-shrink: 0;
  719. width: 40px;
  720. height: 40px;
  721. img {
  722. width: 40px;
  723. height: 40px;
  724. }
  725. }
  726. .cellRightArea {
  727. margin-left: 11px;
  728. .cellRightName {
  729. height: 24px;
  730. font-size: 18px;
  731. text-align: left;
  732. color: #222222;
  733. line-height: 24px;
  734. font-weight: 600;
  735. }
  736. .cellRightDesc {
  737. margin-top: 1px;
  738. height: 19px;
  739. font-size: 14px;
  740. text-align: left;
  741. color: #999999;
  742. line-height: 19px;
  743. }
  744. }
  745. }
  746. &.ok {
  747. display: flex;
  748. .smallCell {
  749. background-color: rgb(238, 246, 254);
  750. }
  751. }
  752. }
  753. }
  754. }
  755. }
  756. }
  757. }
  758. .more-item {
  759. // padding: 4px 12px 4px 8px;
  760. display: flex;
  761. align-items: center;
  762. img {
  763. width: 24px;
  764. height: 24px;
  765. margin-right: 12px;
  766. }
  767. span {
  768. font-size: 15px;
  769. color: rgba(0, 0, 0, .85);
  770. font-weight: 500;
  771. }
  772. }
  773. .more-item.fuwu-item {
  774. img {
  775. width: 28px;
  776. height: 28px;
  777. }
  778. .text {
  779. display: flex;
  780. flex-direction: column;
  781. }
  782. .big {
  783. font-size: 15px;
  784. font-family: PingFangSC, PingFangSC-Semibold;
  785. font-weight: 600;
  786. color: #222;
  787. }
  788. .small {
  789. font-size: 12px;
  790. font-family: PingFangSC, PingFangSC-Regular;
  791. font-weight: 400;
  792. color: #666;
  793. }
  794. }
  795. .fuwu-dropdown {
  796. padding: 10px 0;
  797. // top: 60px;
  798. .el-dropdown-menu__item {
  799. line-height: 20px !important;
  800. padding: 12px 20px !important;
  801. }
  802. }
  803. .jiejuefangan-dropdown {
  804. display: flex;
  805. padding: 36px;
  806. .big-title {
  807. display: flex;
  808. align-items: center;
  809. padding-bottom: 12px;
  810. img {
  811. width: 28px;
  812. height: 28px;
  813. }
  814. span {
  815. font-size: 18px;
  816. font-family: PingFangSC, PingFangSC-Semibold;
  817. font-weight: 600;
  818. color: #222;
  819. margin-left: 6px;
  820. }
  821. }
  822. .more-item.fuwu-item {
  823. flex-direction: column;
  824. align-items: inherit;
  825. }
  826. .el-dropdown-menu__item {
  827. line-height: 20px !important;
  828. padding: 10px 10px 10px 34px;
  829. }
  830. }
  831. </style>
  832. <style scoped>
  833. #proginn-header {
  834. position: relative;
  835. display: flex;
  836. justify-content: center;
  837. width: 100%;
  838. background: white;
  839. z-index: 10;
  840. }
  841. .list {
  842. display: flex;
  843. justify-content: space-between;
  844. width: 1440px;
  845. }
  846. .header-left {
  847. display: flex;
  848. align-items: center;
  849. }
  850. .header-right {
  851. display: flex;
  852. align-items: center;
  853. }
  854. .nav-item {
  855. display: flex;
  856. height: 83px;
  857. align-items: center;
  858. font-size: 14px;
  859. color: #515151;
  860. /* padding: 0 15px; */
  861. box-sizing: border-box;
  862. padding: 0 20px;
  863. }
  864. .nav-item.logo {
  865. margin-right: 24px;
  866. padding: 0;
  867. }
  868. .nav-item:first-child {
  869. padding: 0;
  870. }
  871. .nav-item:nth-child(n + 2):hover {
  872. color: #1782d9;
  873. border-top: 5px solid transparent;
  874. border-bottom: 5px solid #1782d9;
  875. }
  876. .nav-dropdown,
  877. .nav-popover {
  878. --imgWidth: 28px;
  879. height: 40px;
  880. display: flex;
  881. align-items: center;
  882. }
  883. .nav-popover > .ref {
  884. display: flex;
  885. align-items: center;
  886. }
  887. .nav-header {
  888. position: relative;
  889. width: var(--imgWidth);
  890. height: var(--imgWidth);
  891. margin-right: 5px;
  892. }
  893. .logo {
  894. width: 126px;
  895. height: auto;
  896. }
  897. .input {
  898. width: 218px;
  899. height: 34px;
  900. background: #F7F8FA;
  901. border-radius: 4px;
  902. padding: 0 45px 0 16px;
  903. /* border: 1px solid #ebebeb; */
  904. font-size: 14px;
  905. &::placeholder {
  906. color: #828C99;
  907. }
  908. &:-ms-input-placeholder{
  909. color:#828C99
  910. }
  911. }
  912. .more-dropdown {
  913. padding:0 20px;
  914. }
  915. .el-icon-search {
  916. position: absolute;
  917. top: 50%;
  918. transform:translateY(-50%);
  919. right: 11px;
  920. color: grey;
  921. cursor: pointer;
  922. }
  923. .input-line{
  924. position: absolute;
  925. top: 50%;
  926. transform:translateY(-50%);
  927. right: 39px;
  928. width: 1px;
  929. height: 12px;
  930. border: 1px solid #EBECED;
  931. }
  932. .el-icon-credit {
  933. background: url("~@/assets/img/header/creditIconMine.png") no-repeat;
  934. background-size: cover;
  935. width: 16px;
  936. height: 16px;
  937. vertical-align: middle;
  938. margin: 0 9px !important;
  939. }
  940. .el-icon-download-app {
  941. background: url("~@/assets/img/header/download@2x.png") no-repeat;
  942. background-size: cover;
  943. width: 16px;
  944. height: 16px;
  945. vertical-align: middle;
  946. margin: 0 9px !important;
  947. }
  948. .el-icon-search::before {
  949. font-size: 14px;
  950. font-weight: 800;
  951. }
  952. i {
  953. margin-right: 4px;
  954. }
  955. i.circle {
  956. display: inline-block;
  957. --width: 12px;
  958. width: var(--width);
  959. height: var(--width);
  960. border-radius: calc(var(--width) / 2);
  961. }
  962. i.blue {
  963. background: #3b83c0;
  964. }
  965. i.orange {
  966. background: #e07b53;
  967. }
  968. i.red {
  969. background: #d95c5c;
  970. }
  971. i.green {
  972. background: #5bbd72;
  973. }
  974. i.pink {
  975. background: #d9499a;
  976. }
  977. i.yellow {
  978. background: #f2c61f;
  979. }
  980. .message-box {
  981. position: relative;
  982. display: flex;
  983. align-items: center;
  984. }
  985. .message-count {
  986. color: white;
  987. margin-left: 4px;
  988. display: block;
  989. line-height: 18px;
  990. padding: 0 8px;
  991. border-radius: 9px;
  992. background: grey;
  993. }
  994. .message-count.message-total {
  995. position: absolute;
  996. top: 0px;
  997. right: -10px;
  998. background: #d95c5c;
  999. }
  1000. span.other-icon {
  1001. display: block;
  1002. margin-left: 30px;
  1003. }
  1004. .nickname {
  1005. font-size: 15px;
  1006. }
  1007. .vip-info {
  1008. display: flex;
  1009. flex-direction: column;
  1010. justify-content: center;
  1011. align-items: center;
  1012. width: 206px;
  1013. height: 120px;
  1014. }
  1015. .vip-info-top {
  1016. display: flex;
  1017. width: 142px;
  1018. }
  1019. .vip-title {
  1020. color: #cb9d53;
  1021. font-size: 16px;
  1022. line-height: 36px;
  1023. }
  1024. .vip-icon {
  1025. width: 24px;
  1026. height: 24px;
  1027. margin: 10px 8px 0 0;
  1028. }
  1029. .vip-end-date {
  1030. font-size: 12px;
  1031. color: #999;
  1032. }
  1033. .vip-arcs {
  1034. display: flex;
  1035. justify-content: space-between;
  1036. width: 142px;
  1037. margin-top: 11px;
  1038. }
  1039. .vip-arc {
  1040. flex: 1;
  1041. font-size: 13px;
  1042. color: #cb9d53;
  1043. text-align: center;
  1044. }
  1045. .vip-arc:first-child {
  1046. border-right: 1px solid rgba(245, 245, 245, 1);
  1047. }
  1048. .vip-info-com .vip-title {
  1049. color: rgb(113, 177, 253);
  1050. }
  1051. .vip-info-com .vip-arc {
  1052. color: rgb(113, 177, 253);
  1053. }
  1054. .header-user {
  1055. width: var(--imgWidth);
  1056. height: var(--imgWidth);
  1057. border-radius: 20px;
  1058. }
  1059. .header-vip-icon {
  1060. position: absolute;
  1061. top: 16px;
  1062. left: 18px;
  1063. width: 16px;
  1064. height: 16px;
  1065. }
  1066. .vip-items {
  1067. display: flex;
  1068. flex-direction: column;
  1069. }
  1070. .vip-item {
  1071. line-height: 32px;
  1072. color: #606266;
  1073. }
  1074. .vip-item > i {
  1075. margin: 0 10px;
  1076. }
  1077. .divider {
  1078. border-top: 1px solid rgba(0, 0, 0, 0.05);
  1079. margin-top: 10px;
  1080. padding-top: 10px;
  1081. cursor: pointer;
  1082. }
  1083. .vip-info-com .is-dev {
  1084. color: #cb9d53;
  1085. }
  1086. .vip-info-com .is-newly {
  1087. color: #308eff;
  1088. }
  1089. .vip-info-com .is-premium {
  1090. color: #00c469;
  1091. }
  1092. .workstation {
  1093. color: #606266;
  1094. }
  1095. .account-ctrl {
  1096. color: #0B121A;
  1097. font-size: 14px;
  1098. }
  1099. .account-change{
  1100. color: #308EFF;
  1101. font-size: 14px;
  1102. }
  1103. #proginn-header a {
  1104. text-decoration: none !important;
  1105. }
  1106. #proginn-header.transparent {
  1107. background: transparent;
  1108. border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  1109. }
  1110. #proginn-header.transparent a {
  1111. color: white;
  1112. }
  1113. .message-box-title,
  1114. .dashboard-title {
  1115. color: #0B121A;
  1116. font-size: 14px;
  1117. font-weight: normal;
  1118. }
  1119. .dashboard-title.on {
  1120. color: #1782d9;
  1121. }
  1122. #proginn-header.transparent .message-box-title,
  1123. #proginn-header.transparent .dashboard-title {
  1124. color: white;
  1125. }
  1126. #proginn-header.transparent .nickname {
  1127. color: white;
  1128. }
  1129. .nav-button{
  1130. width: 94px;
  1131. height: 30px;
  1132. line-height: 30px;
  1133. text-align: center;
  1134. font-size: 14px;
  1135. font-weight: 400;
  1136. color: #FFFFFF;
  1137. cursor: pointer;
  1138. font-family: PingFangSC-Regular, PingFang SC;
  1139. }
  1140. .nav-button-type1{
  1141. background: #308EFF;
  1142. border-radius: 2px;
  1143. margin-right:14px;
  1144. }
  1145. .nav-button-type2{
  1146. background: #FF7640;
  1147. border-radius: 2px;
  1148. margin-right:20px;
  1149. }
  1150. </style>