header.vue 35 KB

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