This commit is contained in:
zhaofang
2022-09-14 16:37:46 +08:00
parent 5146759a08
commit 03c7d17095
5 changed files with 94 additions and 52 deletions

View File

@@ -4,12 +4,12 @@
<div class="xtop-content xcontent">
<div class="xtop-left">
<!-- <div> -->
<router-link class="routerLink" to="/index"><img src="../../../assets/logo/logo2.png" style="width:240px;height: 30px;" /></router-link>
<router-link class="routerLink" to="/index"><img src="../../../assets/logo/logo2.png" style="width:240px;height: 40px;" /></router-link>
<!-- </div> -->
<div class="xtop-nav">
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
<div><a :href="`${webBaseUrl}/case`">案例</a></div>
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
<div>
@@ -24,29 +24,42 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div><a :href="`${webBaseUrl}/case`">推荐案例</a></div>
<div><a :href="`${webBaseUrl}/follow`">我的关注</a></div>
</div>
</div>
<div class="xtop-right" style="display: flex;justify-content: flex-end;align-items: center;">
<div style="margin-left:250px;margin-right:50px;">
<el-input placeholder="搜索" style="width: 260px;border-radius: 20px !important;" @keyup.enter.native="searchJump()" clearable maxlength="50" v-model="keyword" class="input-with-select">
<!-- <div style="margin-left:250px;margin-right:50px;"> -->
<!-- <el-input placeholder="搜索" style="width: 260px;border-radius: 20px !important;" @keyup.enter.native="searchJump()" clearable maxlength="50" v-model="keyword" class="input-with-select">
<el-select v-model="findType" style="width: 75px;" slot="prepend" placeholder="请选择">
<el-option label="课程" value="1"></el-option>
<el-option label="案例" value="2"></el-option>
<el-option label="文章" value="3"></el-option>
<el-option label="问答" value="4"></el-option>
<!-- <el-option label="专区" value="5"></el-option> -->
</el-select>
<!-- <el-button slot="append" icon="el-icon-search" @click="searchJump()">搜索</el-button> -->
<el-button slot="append" icon="el-icon-search" @click="searchJump()" class="input-with-select-btn"></el-button>
</el-input>
</div>
</el-input> -->
<!-- </div> -->
<div>
<el-badge :value="userMsg" :hidden="userMsg==0" class="message-count">
<el-link type="primary" :href="`${webBaseUrl}/message`" target="_blank" icon="el-icon-message-solid" :underline="false"></el-link>
<!-- <el-link type="primary" :href="`${webBaseUrl}/message`" target="_blank" icon="el-icon-message-solid" :underline="false"></el-link> -->
<svg-icon style="margin-right: 0;font-size:26px;" icon-class="messfff"></svg-icon>
</el-badge>
</div>
<div style="margin-left: 50px;"><el-avatar :src="userInfo.avatar" style="vertical-align: middle;width:28px;height:28px;margin-right:2px;"></el-avatar></div>
<div style="margin-left: 5px;">
<el-dropdown class="person-action-index" style="margin-left: 44px;">
<span class="el-dropdown-link">
<span v-if="current == 'qa'" style="color: #333;">学员</span>
<span v-else style="color: #fff;">学员</span><i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>学员</el-dropdown-item>
<el-dropdown-item>教师</el-dropdown-item>
<el-dropdown-item>管理员</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div style="margin-left: 50px;color: #fff;"><el-avatar :src="userInfo.avatar" style="vertical-align: middle;width:40px;height:40px;margin-right:10px;"></el-avatar>{{userInfo.name}}</div>
<!-- <div style="margin-left: 5px;">
<el-dropdown @command="handleUcCommand">
<span class="el-dropdown-link">
{{userInfo.name}}<i class="el-icon-arrow-down el-icon--right"></i>
@@ -55,25 +68,10 @@
<el-dropdown-item command="logout">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div> -->
<div class="person-action">
<el-badge :value="userMsg" :hidden="userMsg == 0" class="message-count">
<el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false"></el-link>
</el-badge>
<!-- <el-avatar :src="userInfo.avatar"></el-avatar> -->
<!-- <el-link type="primary" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link> -->
<el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button>
<el-button @click="logout()" type="text"><svg-icon style="margin-right: 4px;font-size:22px;color: #000;" icon-class="white-out"></svg-icon>退出</el-button>
</div>
<!-- <ul>
<li @mouseover="mouseOver(1)" @mouseleave="mouseLeave(1)" :class="{ xactive: mouseIndex == 1 }">
<el-badge :value="userMsg" :hidden="userMsg==0" style="margin-top: 10px;margin-right: -10px;">
<el-link type="primary" :href="`${webBaseUrl}/message`" target="_blank" icon="el-icon-bell" style="margin-top: -10px;" :underline="false">消息</el-link>
</el-badge>
</li>
<li @mouseover="mouseOver(9)" @mouseleave="mouseLeave(9)" :class="{ xactive: mouseIndex == 9 }" style="padding-right: 10px;">
<el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button>
</li>
</ul> -->
</div>
</div>
</div>
@@ -332,8 +330,8 @@ export default {
justify-content: space-between
}
.xtop {
height: 56px;
line-height: 56px;
height: 72px;
line-height: 72px;
background-color: #302F33;
position: fixed;
top: 0px;
@@ -345,11 +343,9 @@ export default {
border-bottom: 1px solid #e9e9e9;
z-index: 9999;
.xtop-content{
//width: 1500px;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.xtop .xtop-left {
@@ -365,24 +361,23 @@ export default {
.xtop-nav {
display: flex;
justify-content: flex-start;
// justify-content: flex-start;
a{
display: inline-block;
}
}
.xtop-nav > div {
line-height: 56px;
line-height:72px;
padding: 0px 24px;
color: #fff;
}
.xtop .xtop-right {
float: right;
.person-action{
display: flex;
justify-content: flex-end;
align-items: center;
margin-left: 100px;
margin-left: 44px;
::v-deep .message-count{
margin-right: 30px;
i{