Header.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. <template>
  2. <nav class="navbar" v-loading.fullscreen.lock="fullScreenLoading">
  3. <div class="container" style="min-width: 1100px">
  4. <!--<div class="navbar-translate" style="text-align: center;vertical-align: middle;">-->
  5. <!--<span>-->
  6. <!--<a href="javascript:;">-->
  7. <!--<img :src="defaultValue.image" style="height: 50px;object-fit: contain;" >-->
  8. <!--</a>-->
  9. <!--</span>-->
  10. <!--<span style="margin-bottom: 20px"><a style="font-size: 25px">众测</a></span>-->
  11. <!--<button-->
  12. <!--type="button"-->
  13. <!--data-toggle="collapse"-->
  14. <!--aria-expanded="false"-->
  15. <!--aria-label="Toggle navigation"-->
  16. <!--@click="openNavBarFunc"-->
  17. <!--v-bind:class="['navbar-toggler',{ 'open-fixed': openNavBar}]"-->
  18. <!--&gt;-->
  19. <!--<span class="navbar-toggler-icon"></span>-->
  20. <!--<span class="navbar-toggler-icon"></span>-->
  21. <!--<span class="navbar-toggler-icon"></span>-->
  22. <!--</button>-->
  23. <!--</div>-->
  24. <div>
  25. <ul class="navbar-nav ml-auto">
  26. <li class="dropdown nav-item">
  27. <router-link to="/home">
  28. <a data-toggle="dropdown">
  29. <img style="height: 50px;padding-top: 10px" :src="defaultValue.image">
  30. </a>
  31. </router-link>
  32. </li>
  33. <li class="dropdown nav-item">
  34. <router-link to="/home">
  35. <a class="dropdown-toggle nav-link" data-toggle="dropdown">
  36. <span style="font-size: 20px">群智众测平台</span>
  37. </a>
  38. </router-link>
  39. </li>
  40. </ul>
  41. </div>
  42. <div style="margin-left: 0; flex: auto">
  43. <ul class="navbar-nav ml-auto">
  44. <li class="dropdown nav-item">
  45. <router-link to="/home">
  46. <a class="dropdown-toggle nav-link" data-toggle="dropdown">
  47. <img class="icon" src="@/assets/img/home_icon.svg">
  48. <span>首页</span>
  49. </a>
  50. </router-link>
  51. </li>
  52. <li class="dropdown nav-item">
  53. <router-link to="/square">
  54. <a class="dropdown-toggle nav-link" data-toggle="dropdown">
  55. <img class="icon" src="@/assets/img/square_icon.svg">
  56. <span>任务广场</span>
  57. </a>
  58. </router-link>
  59. </li>
  60. </ul>
  61. </div>
  62. <div>
  63. <ul class="navbar-nav ml-auto">
  64. <li class="dropdown nav-item">
  65. <router-link v-if="isLogin" to="/mine">
  66. <a class="dropdown-toggle nav-link" data-toggle="dropdown">
  67. <img class="icon" src="@/assets/img/mine_icon.svg">
  68. <span>我的众测</span>
  69. </a>
  70. </router-link>
  71. <a v-if="!isLogin" class="dropdown-toggle nav-link" data-toggle="dropdown"
  72. href="http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.mooctest.net%2f%23%2fmine">
  73. <img class="icon" src="@/assets/img/mine_icon.svg">
  74. <span>登录</span>
  75. </a>
  76. <div class="dropdown-menu dropdown-with-icons">
  77. <a href="./sections.html#headers" class="dropdown-item">
  78. <i class="material-icons"></i> Headers
  79. </a>
  80. <a href="./sections.html#features" class="dropdown-item">
  81. <i class="material-icons"></i> Features
  82. </a>
  83. </div>
  84. </li>
  85. <li class="dropdown nav-item" style="margin-left: 50px">
  86. <router-link v-if="isLogin" to="/mine">
  87. <a data-toggle="dropdown">
  88. <img class="user-img" :src="defaultValue.image">
  89. </a>
  90. </router-link>
  91. </li>
  92. <el-dropdown v-if="isLogin">
  93. <span class="dropdown-toggle nav-link el-dropdown-link">{{user.userVO.name}}<i
  94. class="el-icon-arrow-down el-icon--right"></i>
  95. </span>
  96. <el-dropdown-menu slot="dropdown">
  97. <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator">
  98. <router-link :to="{ name: 'AuthenticationManage'}">
  99. <el-link icon="el-icon-view" :underline="false">
  100. 审核认证信息
  101. </el-link>
  102. </router-link>
  103. </el-dropdown-item>
  104. <el-dropdown-item>
  105. <router-link :to="{ name: 'AuthenticationIndex'}">
  106. <el-link type="info" icon="el-icon-warning-outline" :underline="false">
  107. 未实名认证
  108. </el-link>
  109. </router-link>
  110. </el-dropdown-item>
  111. <el-dropdown-item @click.native="handleClickAuthChecking()">
  112. <el-link type="warning" icon="el-icon-loading" :underline="false">
  113. 认证审核中
  114. </el-link>
  115. </el-dropdown-item>
  116. <el-dropdown-item @click.native="handleClickAuthPass()">
  117. <el-link type="primary" icon="el-icon-check" :underline="false">
  118. 已认证
  119. </el-link>
  120. </el-dropdown-item>
  121. <el-dropdown-item @click.native="handleClickAuthReject()">
  122. <el-link type="danger" icon="el-icon-close" :underline="false">
  123. 认证失败
  124. </el-link>
  125. </el-dropdown-item>
  126. <el-dropdown-item divided @click.native="userLogout()">登出</el-dropdown-item>
  127. </el-dropdown-menu>
  128. </el-dropdown>
  129. <el-dialog title="认证信息审核中" :visible.sync="isShowAuthCheckingDialog" width="40%"
  130. :before-close="hideAuthCheckingDialog" center>
  131. <span>
  132. <el-card v-if="authInfo.type" class="box-card">
  133. <div slot="header" class="clearfix">
  134. <span>认证信息</span>
  135. </div>
  136. <div class="text item">
  137. <ul v-if="authInfo.type=='个人'" style="list-style-type:none">
  138. <li>认证类型:{{authInfo.type}}认证</li>
  139. <li>认证姓名:{{authInfo.realName}}</li>
  140. <li>认证账户:{{authInfo.bankAccount}}</li>
  141. <li>认证地址:{{authInfo.address}}</li>
  142. <li>申请时间:{{authInfo.createTime}}</li>
  143. <li>认证状态:{{authInfo.status}}</li>
  144. <li>失败原因:{{authInfo.rejectReason}}</li>
  145. </ul>
  146. <ul v-if="authInfo.type=='机构'" style="list-style-type:none">
  147. <li>认证类型:{{authInfo.type}}认证</li>
  148. <li>认证姓名:{{authInfo.evaluationAgencyName}}</li>
  149. <li>认证账户:{{authInfo.bankAccount}}</li>
  150. <li>认证地址:{{authInfo.address}}</li>
  151. <li>申请时间:{{authInfo.createTime}}</li>
  152. <li>认证状态:{{authInfo.status}}</li>
  153. <li>失败原因:{{authInfo.rejectReason}}</li>
  154. </ul>
  155. <ul v-if="authInfo.type=='企业'" style="list-style-type:none">
  156. <li>认证类型:{{authInfo.type}}认证</li>
  157. <li>认证企业名称:{{authInfo.companyName}}</li>
  158. <li>认证法人姓名:{{authInfo.legalPersonName}}</li>
  159. <li>认证账户:{{authInfo.bankAccount}}</li>
  160. <li>统一信用代码:{{authInfo.unifiedSocialCreditCode}}</li>
  161. <li>认证地址:{{authInfo.address}}</li>
  162. <li>申请时间:{{authInfo.createTime}}</li>
  163. <li>认证状态:{{authInfo.status}}</li>
  164. <li>失败原因:{{authInfo.rejectReason}}</li>
  165. </ul>
  166. </div>
  167. </el-card>
  168. </span>
  169. <span slot="footer" class="dialog-footer">
  170. <el-button size="mini" @click="hideAuthCheckingDialog">返回</el-button>
  171. <el-button size="mini" type="danger" @click="deleteOldAuthInfo">放弃认证</el-button>
  172. <el-button size="mini" type="primary" @click="handleUpdateAuthInfo">重新认证</el-button>
  173. </span>
  174. </el-dialog>
  175. <el-dialog title="认证成功" :visible.sync="isShowAuthPassDialog" width="40%" :before-close="hideAuthPassDialog"
  176. center>
  177. <span>
  178. <el-card v-if="authInfo.type" class="box-card">
  179. <div slot="header" class="clearfix">
  180. <span>认证信息</span>
  181. </div>
  182. <div class="text item">
  183. <ul v-if="authInfo.type=='个人'" style="list-style-type:none">
  184. <li>认证类型:{{authInfo.type}}认证</li>
  185. <li>认证姓名:{{authInfo.realName}}</li>
  186. <li>认证账户:{{authInfo.bankAccount}}</li>
  187. <li>认证地址:{{authInfo.address}}</li>
  188. <li>申请时间:{{authInfo.createTime}}</li>
  189. <li>认证状态:{{authInfo.status}}</li>
  190. <li>失败原因:{{authInfo.rejectReason}}</li>
  191. </ul>
  192. <ul v-if="authInfo.type=='机构'" style="list-style-type:none">
  193. <li>认证类型:{{authInfo.type}}认证</li>
  194. <li>认证姓名:{{authInfo.evaluationAgencyName}}</li>
  195. <li>认证账户:{{authInfo.bankAccount}}</li>
  196. <li>认证地址:{{authInfo.address}}</li>
  197. <li>申请时间:{{authInfo.createTime}}</li>
  198. <li>认证状态:{{authInfo.status}}</li>
  199. <li>失败原因:{{authInfo.rejectReason}}</li>
  200. </ul>
  201. <ul v-if="authInfo.type=='企业'" style="list-style-type:none">
  202. <li>认证类型:{{authInfo.type}}认证</li>
  203. <li>认证企业名称:{{authInfo.companyName}}</li>
  204. <li>认证法人姓名:{{authInfo.legalPersonName}}</li>
  205. <li>认证账户:{{authInfo.bankAccount}}</li>
  206. <li>统一信用代码:{{authInfo.unifiedSocialCreditCode}}</li>
  207. <li>认证地址:{{authInfo.address}}</li>
  208. <li>申请时间:{{authInfo.createTime}}</li>
  209. <li>认证状态:{{authInfo.status}}</li>
  210. <li>失败原因:{{authInfo.rejectReason}}</li>
  211. </ul>
  212. </div>
  213. </el-card>
  214. </span>
  215. <span slot="footer" class="dialog-footer">
  216. <el-button size="mini" @click="hideAuthPassDialog">返回</el-button>
  217. </span>
  218. </el-dialog>
  219. <el-dialog title="认证失败" :visible.sync="isShowAuthRejectDialog" width="40%"
  220. :before-close="hideAuthRejectDialog"
  221. center>
  222. <span>
  223. <el-card v-if="authInfo.type" class="box-card">
  224. <div slot="header" class="clearfix">
  225. <span>认证信息</span>
  226. </div>
  227. <div class="text item">
  228. <ul v-if="authInfo.type=='个人'" style="list-style-type:none">
  229. <li>认证类型:{{authInfo.type}}认证</li>
  230. <li>认证姓名:{{authInfo.realName}}</li>
  231. <li>认证账户:{{authInfo.bankAccount}}</li>
  232. <li>认证地址:{{authInfo.address}}</li>
  233. <li>申请时间:{{authInfo.createTime}}</li>
  234. <li>认证状态:{{authInfo.status}}</li>
  235. <li>失败原因:{{authInfo.rejectReason}}</li>
  236. </ul>
  237. <ul v-if="authInfo.type=='机构'" style="list-style-type:none">
  238. <li>认证类型:{{authInfo.type}}认证</li>
  239. <li>认证姓名:{{authInfo.evaluationAgencyName}}</li>
  240. <li>认证账户:{{authInfo.bankAccount}}</li>
  241. <li>认证地址:{{authInfo.address}}</li>
  242. <li>申请时间:{{authInfo.createTime}}</li>
  243. <li>认证状态:{{authInfo.status}}</li>
  244. <li>失败原因:{{authInfo.rejectReason}}</li>
  245. </ul>
  246. <ul v-if="authInfo.type=='企业'" style="list-style-type:none">
  247. <li>认证类型:{{authInfo.type}}认证</li>
  248. <li>认证企业名称:{{authInfo.companyName}}</li>
  249. <li>认证法人姓名:{{authInfo.legalPersonName}}</li>
  250. <li>认证账户:{{authInfo.bankAccount}}</li>
  251. <li>统一信用代码:{{authInfo.unifiedSocialCreditCode}}</li>
  252. <li>认证地址:{{authInfo.address}}</li>
  253. <li>申请时间:{{authInfo.createTime}}</li>
  254. <li>认证状态:{{authInfo.status}}</li>
  255. <li>失败原因:{{authInfo.rejectReason}}</li>
  256. </ul>
  257. </div>
  258. </el-card>
  259. </span>
  260. <span slot="footer" class="dialog-footer">
  261. <el-button size="mini" @click="hideAuthRejectDialog">返回</el-button>
  262. <el-button size="mini" type="danger" @click="deleteOldAuthInfo">放弃认证</el-button>
  263. <el-button size="mini" type="primary" @click="handleUpdateAuthInfo">修改认证信息</el-button>
  264. </span>
  265. </el-dialog>
  266. <!--<li class="dropdown nav-item">-->
  267. <!--<router-link v-if="isLogin" to="/mine">-->
  268. <!--<a class="dropdown-toggle nav-link" data-toggle="dropdown">-->
  269. <!--<span>{{user.userVO.name}}</span>-->
  270. <!--</a>-->
  271. <!--</router-link>-->
  272. <!--</li>-->
  273. <!--<li class="dropdown nav-item">-->
  274. <!--<router-link v-if="isLogin" to="/mine">-->
  275. <!--<div style="margin-top: 5px;margin-right: 20px">-->
  276. <!--<el-tooltip class="item" effect="dark" content="认证成功" placement="bottom">-->
  277. <!--<el-link type="info" disabled icon="el-icon-warning-outline">已认证</el-link>-->
  278. <!--</el-tooltip>-->
  279. <!--</div>-->
  280. <!--</router-link>-->
  281. <!--</li>-->
  282. <!--<li class="dropdown nav-item">-->
  283. <!--<router-link v-if="isLogin" to="/mine">-->
  284. <!--<div style="margin-top: 5px;margin-right: 20px">-->
  285. <!--<el-tooltip class="item" effect="dark" content="点击进行认证" placement="bottom">-->
  286. <!--<el-link type="danger" icon="el-icon-warning-outline">未实名认证</el-link>-->
  287. <!--</el-tooltip>-->
  288. <!--</div>-->
  289. <!--</router-link>-->
  290. <!--</li>-->
  291. <!--<li>-->
  292. <!--<a v-if="isLogin" class="dropdown-toggle nav-link" data-toggle="dropdown" href="#" @click="userLogout()">-->
  293. <!--<span>登出</span>-->
  294. <!--</a>-->
  295. <!--</li>-->
  296. </ul>
  297. </div>
  298. </div>
  299. </nav>
  300. </template>
  301. <script>
  302. import {
  303. defaultValue,
  304. deleteAuthInfo,
  305. getCurrentAuthenInfo,
  306. getCurrentUser,
  307. getRolesPermissions,
  308. logout,
  309. storageGet,
  310. storageSave
  311. } from '@/js/index'
  312. import {notify} from '@/constants/index'
  313. export default {
  314. name: 'header-container',
  315. data () {
  316. return {
  317. user: {},
  318. fullScreenLoading: true,
  319. authInfo: {},
  320. isShowAuthCheckingDialog: false,
  321. isShowAuthRejectDialog: false,
  322. isShowAuthPassDialog: false,
  323. //loading: true,
  324. openNavBar: false,
  325. defaultValue: defaultValue,
  326. userIdentity: '',
  327. isLogin: false,
  328. rolesPermissions: {}
  329. }
  330. },
  331. mounted () {
  332. this.$nextTick(() => {
  333. })
  334. },
  335. methods: {
  336. openNavBarFunc () {
  337. this.openNavBar = !this.openNavBar
  338. },
  339. setCurrUserByHttp () {
  340. // getCurrentUser().then((res) => {
  341. // console.log(res)
  342. // storageSave('user', res)
  343. // storageSave('rolesPermissions', getRolesPermissions(res.roleList))
  344. // this.isLogin = true
  345. // this.fullScreenLoading = false
  346. // }).catch(error => {
  347. // this.fullScreenLoading = false
  348. // console.log(error)
  349. // if (error.status == 401) {
  350. // notify('warning', error.data)
  351. // } else {
  352. // notify('error', error.data)
  353. // }
  354. // })
  355. },
  356. setUserInfo () {
  357. // storageGet('user').then((res)=>{
  358. // if (res == null){
  359. // this.setCurrUserByHttp()
  360. // }else{
  361. // this.fullScreenLoading = false
  362. // this.isLogin = true
  363. // }
  364. // }).catch((error)=>{
  365. // this.setCurrUserByHttp()
  366. // })
  367. if (storageGet('user') == null) {
  368. storageSave('rolesPermissions', {
  369. 'isRegionManager': false,
  370. 'isIndividualUser': false,
  371. 'isEnterpriseUser': false,
  372. 'isAgency': false,
  373. 'isSystemAdministrator': false
  374. })
  375. console.log('本地没有用户信息,开始加载用户信息')
  376. getCurrentUser().then((res) => {
  377. console.log(res)
  378. storageSave('user', res)
  379. this.user = res
  380. this.rolesPermissions = getRolesPermissions(res.roleList)
  381. storageSave('rolesPermissions', getRolesPermissions(res.roleList))
  382. console.log('用户信息加载成功')
  383. this.isLogin = true
  384. this.fullScreenLoading = false
  385. }).catch(error => {
  386. console.log('用户信息加载失败')
  387. this.fullScreenLoading = false
  388. // if (error.status == 401) {
  389. // notify('warning', error.data)
  390. // } else {
  391. // notify('error', error.data)
  392. // }
  393. })
  394. } else {
  395. this.user = storageGet('user')
  396. this.fullScreenLoading = false
  397. this.isLogin = true
  398. }
  399. },
  400. userLogout () {
  401. console.log('ee')
  402. this.isLogin = false
  403. logout().then((res) => {
  404. this.$router.push({
  405. name: 'Index',
  406. })
  407. })
  408. },
  409. showLoading () {
  410. this.fullScreenLoading = true
  411. },
  412. hideLoading () {
  413. this.fullScreenLoading = false
  414. },
  415. handleClickAuthReject () {
  416. this.getAuthInfo(this.showAuthRejectDialog)
  417. },
  418. handleClickAuthPass () {
  419. this.getAuthInfo(this.showAuthPassDialog)
  420. },
  421. handleClickAuthChecking () {
  422. this.getAuthInfo(this.showAuthCheckingDialog)
  423. },
  424. showAuthRejectDialog () {
  425. this.isShowAuthRejectDialog = true
  426. },
  427. showAuthPassDialog () {
  428. this.isShowAuthPassDialog = true
  429. },
  430. showAuthCheckingDialog () {
  431. this.isShowAuthCheckingDialog = true
  432. },
  433. hideAuthRejectDialog () {
  434. this.isShowAuthRejectDialog = false
  435. },
  436. hideAuthPassDialog () {
  437. this.isShowAuthPassDialog = false
  438. },
  439. hideAuthCheckingDialog () {
  440. this.isShowAuthCheckingDialog = false
  441. },
  442. deleteOldAuthInfo () {
  443. this.hideAuthCheckingDialog()
  444. this.hideAuthRejectDialog()
  445. this.hideAuthPassDialog()
  446. this.showLoading()
  447. deleteAuthInfo().then((res) => {
  448. this.hideLoading()
  449. notify('success', '成功删除认证信息')
  450. }).catch((error) => {
  451. this.hideLoading()
  452. notify('error', '删除认证信息失败:' + error.data)
  453. })
  454. },
  455. getAuthInfo (successMethod) {
  456. this.showLoading()
  457. getCurrentAuthenInfo().then((res) => {
  458. console.log(res)
  459. this.authInfo = res
  460. this.hideLoading()
  461. successMethod()
  462. }).catch((error) => {
  463. this.hideLoading()
  464. notify('error', '加载用户认证信息失败:' + error.data)
  465. })
  466. },
  467. handleUpdateAuthInfo () {
  468. this.hideAuthPassDialog()
  469. this.hideAuthRejectDialog()
  470. this.hideAuthCheckingDialog()
  471. if (this.authInfo.type == '个人') {
  472. this.$router.push({
  473. name: 'IndividualAuthentication',
  474. params: {
  475. userId: this.authInfo.userId
  476. }
  477. })
  478. }
  479. if (this.authInfo.type == '企业') {
  480. this.$router.push({
  481. name: 'EnterpriseAuthentication',
  482. params: {
  483. userId: this.authInfo.userId
  484. }
  485. })
  486. }
  487. if (this.authInfo.type == '机构') {
  488. this.$router.push({
  489. name: 'AgencyAuthentication',
  490. params: {
  491. userId: this.authInfo.userId
  492. }
  493. })
  494. }
  495. }
  496. },
  497. created () {
  498. },
  499. beforeMount () {
  500. this.setUserInfo()
  501. // if (storageGet('user' != null)){
  502. // this.isLogin = true
  503. // }
  504. console.log(this.isLogin)
  505. }
  506. }
  507. </script>
  508. <style lang="less" scoped>
  509. .open-fixed {
  510. position: fixed;
  511. right: 5px;
  512. z-index: 1033;
  513. }
  514. .navbar {
  515. background-color: #fff !important;
  516. box-shadow: none;
  517. padding-top: 10px;
  518. padding-bottom: 10px;
  519. color: #000;
  520. transition: all 0.15s ease 0s;
  521. display: flex;
  522. flex-wrap: wrap;
  523. align-items: center;
  524. justify-content: space-between;
  525. }
  526. @media (max-width: 991px) {
  527. [class*="navbar-expand-"] > .container {
  528. padding-left: 15px;
  529. padding-right: 15px;
  530. }
  531. }
  532. .navbar > .container {
  533. display: flex;
  534. flex-wrap: wrap;
  535. align-items: center;
  536. justify-content: space-between;
  537. flex: 1;
  538. }
  539. .navbar .navbar-brand {
  540. position: relative;
  541. color: inherit;
  542. font-size: 1.8rem;
  543. line-height: 30px;
  544. padding: 10px 0;
  545. margin-right: 1rem;
  546. display: inline-block;
  547. white-space: nowrap;
  548. }
  549. @media (max-width: 991px) {
  550. .navbar .navbar-translate {
  551. width: 100%;
  552. position: relative;
  553. display: flex;
  554. -ms-flex-pack: justify !important;
  555. justify-content: space-between !important;
  556. -ms-flex-align: center;
  557. align-items: center;
  558. transition: transform 0.5s cubic-bezier(0.685, 0.0473, 0.346, 1);
  559. }
  560. }
  561. .navbar-collapse {
  562. flex-basis: 100%;
  563. flex-grow: 1;
  564. align-items: center;
  565. }
  566. @media (max-width: 991px) {
  567. .navbar-collapse {
  568. position: fixed;
  569. display: block;
  570. top: 0;
  571. height: 100vh;
  572. width: 230px;
  573. right: 0;
  574. margin-right: 0 !important;
  575. z-index: 1032;
  576. visibility: visible;
  577. background-color: #fff;
  578. overflow-y: visible;
  579. border-top: none;
  580. text-align: left;
  581. padding-right: 0;
  582. padding-left: 0;
  583. max-height: none !important;
  584. -webkit-transform: translate3d(230px, 0, 0);
  585. transform: translate3d(230px, 0, 0);
  586. transition: all 0.5s cubic-bezier(0.685, 0.0473, 0.346, 1);
  587. }
  588. }
  589. @media (min-width: 992px) {
  590. .navbar-collapse {
  591. display: flex !important;
  592. flex-basis: auto;
  593. }
  594. }
  595. [type="reset"],
  596. [type="submit"],
  597. button,
  598. html [type="button"] {
  599. -webkit-appearance: button;
  600. }
  601. .navbar-toggler {
  602. padding: 0.25rem 0.75rem;
  603. font-size: 1.25rem;
  604. line-height: 1;
  605. background-color: transparent;
  606. border: 1px solid transparent;
  607. border-radius: 0.25rem;
  608. outline: none;
  609. }
  610. .navbar-toggler:not(:disabled):not(.disabled) {
  611. cursor: pointer;
  612. }
  613. @media (min-width: 992px) {
  614. .navbar-toggler {
  615. display: none;
  616. }
  617. }
  618. @media (max-width: 991px) {
  619. .navbar.navbar-transparent .navbar-toggler .navbar-toggler-icon {
  620. background-color: #fff;
  621. }
  622. }
  623. .navbar .navbar-toggler .navbar-toggler-icon + .navbar-toggler-icon {
  624. margin-top: 4px;
  625. }
  626. .navbar .navbar-toggler .navbar-toggler-icon {
  627. width: 22px;
  628. height: 2px;
  629. vertical-align: middle;
  630. outline: 0;
  631. display: block;
  632. border-radius: 1px;
  633. }
  634. .navbar .navbar-toggler .navbar-toggler-icon {
  635. background-color: #555;
  636. }
  637. .navbar-toggler-icon {
  638. display: inline-block;
  639. width: 1.5em;
  640. height: 1.5em;
  641. vertical-align: middle;
  642. content: "";
  643. background: no-repeat 50%;
  644. background-size: 100% 100%;
  645. }
  646. .navbar-nav {
  647. display: flex;
  648. flex-direction: column;
  649. padding-left: 0;
  650. margin-bottom: 0;
  651. list-style: none;
  652. text-align: center;
  653. }
  654. @media (min-width: 991px) {
  655. .navbar .navbar-nav {
  656. align-items: center;
  657. }
  658. }
  659. @media (min-width: 992px) {
  660. .navbar-nav {
  661. flex-direction: row;
  662. }
  663. }
  664. @media (max-width: 991px) {
  665. .navbar-nav {
  666. margin-top: 70px;
  667. text-align: right;
  668. }
  669. }
  670. .ml-auto,
  671. .mx-auto {
  672. margin-left: auto !important;
  673. }
  674. .collapsing,
  675. .dropdown,
  676. .dropup {
  677. position: relative;
  678. }
  679. .dropdown-menu {
  680. position: absolute;
  681. top: 100%;
  682. left: 0;
  683. z-index: 1000;
  684. float: left;
  685. min-width: 10rem;
  686. padding: 0.5rem 0;
  687. margin: 0.125rem 0 0;
  688. font-size: 1rem;
  689. color: #212529;
  690. text-align: left;
  691. list-style: none;
  692. background-color: #fff;
  693. background-clip: padding-box;
  694. border: 1px solid rgba(0, 0, 0, 0.15);
  695. border-radius: 0.25rem;
  696. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2),
  697. 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  698. display: none;
  699. padding: 0.3125rem 0;
  700. border: 0;
  701. opacity: 0;
  702. transform: scale(0);
  703. transform-origin: 0 0;
  704. will-change: transform, opacity;
  705. transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
  706. opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  707. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  708. }
  709. .navbar-nav .dropdown-menu {
  710. float: none;
  711. }
  712. @media (min-width: 992px) {
  713. .navbar-nav .dropdown-menu {
  714. position: absolute;
  715. }
  716. }
  717. @media (min-width: 992px) {
  718. .navbar-nav .nav-link {
  719. padding-right: 0.5rem;
  720. padding-left: 0.5rem;
  721. }
  722. }
  723. .navbar .navbar-nav .nav-item .nav-link {
  724. padding: 15px;
  725. // text-align: center;
  726. height: 20px;
  727. vertical-align: middle;
  728. color: inherit;
  729. display: block;
  730. }
  731. .nav-link > span {
  732. /* font-size: 1.2rem; */
  733. height: 100%;
  734. vertical-align: middle;
  735. display: inline-block;
  736. line-height: 20px;
  737. }
  738. </style>