添加公共头部,注册成功跳转基本信息页
This commit is contained in:
@ -1,42 +1,64 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="my_header">
|
<div class="my_header">
|
||||||
<div class="title content p0-100">
|
<!-- 整体宽度 -->
|
||||||
<el-row :gutter="20">
|
<div class="content">
|
||||||
<el-col :span="8">
|
<!-- 头部 -->
|
||||||
<img
|
<div class="header">
|
||||||
src="@/assets/logo/logo2.png"
|
<div class="login_btn" v-if="!avatar">
|
||||||
alt=""
|
<el-button type="text" @click="handlePage(true)">登录</el-button>
|
||||||
style="vertical-align: middle;"
|
<i class="mark">|</i>
|
||||||
/>
|
<el-button type="text" @click="handlePage(false)">注册</el-button>
|
||||||
</el-col>
|
</div>
|
||||||
<el-col :span="16">
|
<div
|
||||||
<el-row
|
class="login_btn avatar-wrapper"
|
||||||
style="justify-content: flex-end;height: 100%;align-items: center;padding-right: 30px;"
|
v-else
|
||||||
>
|
@click="handlePath('/mine')"
|
||||||
<el-col :span="8">
|
>
|
||||||
<div class="search">
|
<!-- <span>
|
||||||
<el-input
|
<i>20</i>
|
||||||
v-model.trim="input"
|
</span> -->
|
||||||
placeholder="请输入搜索关键字"
|
<el-badge :value="badge" :max="10" class="item">
|
||||||
@keyup.enter.native="toSearch"
|
<img :src="avatar" class="user-avatar" />
|
||||||
></el-input>
|
</el-badge>
|
||||||
<el-button type="warning" @click="toSearch">一站搜</el-button>
|
</div>
|
||||||
</div>
|
<div class="img2_box">
|
||||||
</el-col>
|
<img src="@/assets/image/02.png" alt="" />
|
||||||
</el-row>
|
<div class="search">
|
||||||
</el-col>
|
<el-input
|
||||||
</el-row>
|
v-model.trim="input"
|
||||||
|
placeholder="请输入搜索关键字"
|
||||||
|
@keyup.enter.native="toSearch"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button type="warning" @click="toSearch">一站搜</el-button>
|
||||||
|
<!-- <router-link
|
||||||
|
target="_blank"
|
||||||
|
:to="{ path: '/search', query: { val: input } }"
|
||||||
|
>
|
||||||
|
<el-button type="warning">一站搜</el-button>
|
||||||
|
</router-link> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['avatar', 'badge'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
input: ''
|
input: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handlePath(path) {
|
||||||
|
this.path = path;
|
||||||
|
this.$router.push({ path });
|
||||||
|
},
|
||||||
toSearch() {
|
toSearch() {
|
||||||
if (!this.input.length) return this.msgError('请输入搜索关键字');
|
if (!this.input.length) return this.msgError('请输入搜索关键字');
|
||||||
let routerJump = this.$router.resolve({
|
let routerJump = this.$router.resolve({
|
||||||
@ -50,36 +72,74 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my_header {
|
.my_header {
|
||||||
position: fixed;
|
// position: fixed;
|
||||||
z-index: 1;
|
// z-index: 1;
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
height: 48px;
|
// height: 48px;
|
||||||
line-height: 48px;
|
// line-height: 48px;
|
||||||
background: #3d3e3e;
|
// background: #3d3e3e;
|
||||||
.title {
|
background-color: #fff;
|
||||||
color: #fff;
|
.header {
|
||||||
padding: 0;
|
height: 177px;
|
||||||
.el-row {
|
background: url(~@/assets/image/01.png) no-repeat;
|
||||||
display: flex;
|
background-size: contain;
|
||||||
.search {
|
.login_btn {
|
||||||
align-items: center;
|
height: 60px;
|
||||||
display: flex;
|
text-align: right;
|
||||||
height: 30px;
|
.el-button {
|
||||||
overflow: hidden;
|
font-size: 16px;
|
||||||
/deep/input {
|
color: #4097e7;
|
||||||
color: #fff;
|
font-weight: bold;
|
||||||
border-left: 0;
|
}
|
||||||
border-right: 0;
|
.mark {
|
||||||
border-radius: 6px 0 0 6px;
|
width: 1px;
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
color: #dcdcdc;
|
||||||
|
margin: 0 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.avatar-wrapper {
|
||||||
|
text-align: right;
|
||||||
|
.el-badge {
|
||||||
|
// display: block;
|
||||||
|
// position: relative;
|
||||||
|
top: 10px;
|
||||||
|
right: 8px;
|
||||||
|
border: 1px solid #ffa32c;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 5px 5px 5px 0px #dadada;
|
||||||
|
.user-avatar {
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.img2_box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 63px;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding: 0px 10px 0 85px;
|
||||||
|
img {
|
||||||
|
width: 392px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/deep/.el-input--medium .el-input__inner {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-radius: 6px 0 0 6px;
|
||||||
|
border: 1px solid #ffa32c;
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
display: flex;
|
||||||
|
height: 40px;
|
||||||
.el-button {
|
.el-button {
|
||||||
height: 30px;
|
border-radius: 0 6px 6px 0;
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
background-color: #ffa32c;
|
background-color: #ffa32c;
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
padding: 0 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
88
src/views/components/header2/index.vue
Normal file
88
src/views/components/header2/index.vue
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<div class="my_header">
|
||||||
|
<div class="title content p0-100">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<img
|
||||||
|
src="@/assets/logo/logo2.png"
|
||||||
|
alt=""
|
||||||
|
style="vertical-align: middle;"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-row
|
||||||
|
style="justify-content: flex-end;height: 100%;align-items: center;padding-right: 30px;"
|
||||||
|
>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="search">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="input"
|
||||||
|
placeholder="请输入搜索关键字"
|
||||||
|
@keyup.enter.native="toSearch"
|
||||||
|
></el-input>
|
||||||
|
<el-button type="warning" @click="toSearch">一站搜</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
input: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toSearch() {
|
||||||
|
if (!this.input.length) return this.msgError('请输入搜索关键字');
|
||||||
|
let routerJump = this.$router.resolve({
|
||||||
|
path: '/search',
|
||||||
|
query: { val: this.input }
|
||||||
|
});
|
||||||
|
window.open(routerJump.href, '_blank');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.my_header {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
|
background: #3d3e3e;
|
||||||
|
.title {
|
||||||
|
color: #fff;
|
||||||
|
padding: 0;
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
.search {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
height: 30px;
|
||||||
|
overflow: hidden;
|
||||||
|
/deep/input {
|
||||||
|
color: #fff;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
border-radius: 6px 0 0 6px;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
height: 30px;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
background-color: #ffa32c;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -34,43 +34,8 @@
|
|||||||
<!-- <div class="img_box">
|
<!-- <div class="img_box">
|
||||||
<img src="@/assets/image/toubu.png" alt="" />
|
<img src="@/assets/image/toubu.png" alt="" />
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 整体宽度 -->
|
<headerPage />
|
||||||
<div class="content">
|
|
||||||
<!-- 头部 -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="login_btn" v-if="!avatar">
|
|
||||||
<el-button type="text" @click="handlePage(true)">登录</el-button>
|
|
||||||
<i class="mark">|</i>
|
|
||||||
<el-button type="text" @click="handlePage(false)">注册</el-button>
|
|
||||||
</div>
|
|
||||||
<div class="avatar-wrapper" v-else @click="handlePath('/mine')">
|
|
||||||
<!-- <span>
|
|
||||||
<i>20</i>
|
|
||||||
</span> -->
|
|
||||||
<el-badge :value="badge" :max="10" class="item">
|
|
||||||
<img :src="avatar" class="user-avatar" />
|
|
||||||
</el-badge>
|
|
||||||
</div>
|
|
||||||
<div class="img2_box">
|
|
||||||
<img src="@/assets/image/02.png" alt="" />
|
|
||||||
<div class="search">
|
|
||||||
<el-input
|
|
||||||
v-model.trim="input"
|
|
||||||
placeholder="请输入搜索关键字"
|
|
||||||
@keyup.enter.native="toSearch"
|
|
||||||
clearable
|
|
||||||
></el-input>
|
|
||||||
<el-button type="warning" @click="toSearch">一站搜</el-button>
|
|
||||||
<!-- <router-link
|
|
||||||
target="_blank"
|
|
||||||
:to="{ path: '/search', query: { val: input } }"
|
|
||||||
>
|
|
||||||
<el-button type="warning">一站搜</el-button>
|
|
||||||
</router-link> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- ul li 列表 -->
|
<!-- ul li 列表 -->
|
||||||
<div class="uls">
|
<div class="uls">
|
||||||
<div class="lis content">
|
<div class="lis content">
|
||||||
@ -98,6 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import headerPage from './components/header';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import footerPage from './components/footer';
|
import footerPage from './components/footer';
|
||||||
// import user from '@/store/modules/user';
|
// import user from '@/store/modules/user';
|
||||||
@ -105,6 +71,7 @@ import footerPage from './components/footer';
|
|||||||
export default {
|
export default {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
components: {
|
components: {
|
||||||
|
headerPage,
|
||||||
footerPage
|
footerPage
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -265,7 +232,8 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 63px;
|
height: 63px;
|
||||||
margin-top: 35px;
|
margin-top: 40px;
|
||||||
|
padding: 0px 10px 0 85px;
|
||||||
img {
|
img {
|
||||||
width: 392px;
|
width: 392px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -526,7 +526,7 @@ export default {
|
|||||||
this.$store
|
this.$store
|
||||||
.dispatch('Register', this.registerForm)
|
.dispatch('Register', this.registerForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$router.push({ path: this.redirect || '/' });
|
this.$router.push({ path: '/mine/info' });
|
||||||
// this.$router.go(-1);
|
// this.$router.go(-1);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
<span>CopyRight 2020-2021</span>
|
<span>CopyRight 2020-2021</span>
|
||||||
<span>版权所有 合肥嘉策信息技术服务有限公司</span>
|
<span>版权所有 合肥嘉策信息技术服务有限公司</span>
|
||||||
<span>皖ICP备45619723号-1</span>
|
<span>皖ICP备45619723号-1</span>
|
||||||
<span>技术支持:安徽商挈智能科技有限公司</span>
|
<!-- <span>技术支持:安徽商挈智能科技有限公司</span> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -192,10 +192,12 @@ import { mapGetters } from 'vuex';
|
|||||||
import { add, cancel } from '@/api/search';
|
import { add, cancel } from '@/api/search';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import headerPage from './components/header';
|
import headerPage from './components/header';
|
||||||
|
// import headerPage2 from './components/header2';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Editor,
|
Editor,
|
||||||
headerPage
|
headerPage
|
||||||
|
// headerPage2
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -310,43 +312,43 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.my_header {
|
// .my_header {
|
||||||
position: fixed;
|
// position: fixed;
|
||||||
z-index: 1;
|
// z-index: 1;
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
height: 48px;
|
// height: 48px;
|
||||||
line-height: 48px;
|
// line-height: 48px;
|
||||||
background: #3d3e3e;
|
// background: #3d3e3e;
|
||||||
.title {
|
// .title {
|
||||||
color: #fff;
|
// color: #fff;
|
||||||
.el-row {
|
// .el-row {
|
||||||
display: flex;
|
// display: flex;
|
||||||
.search {
|
// .search {
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
display: flex;
|
// display: flex;
|
||||||
height: 30px;
|
// height: 30px;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
/deep/input {
|
// /deep/input {
|
||||||
color: #fff;
|
// color: #fff;
|
||||||
border-left: 0;
|
// border-left: 0;
|
||||||
border-right: 0;
|
// border-right: 0;
|
||||||
border-radius: 6px 0 0 6px;
|
// border-radius: 6px 0 0 6px;
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
// background-color: rgba(255, 255, 255, 0.2);
|
||||||
}
|
// }
|
||||||
.el-button {
|
// .el-button {
|
||||||
height: 30px;
|
// height: 30px;
|
||||||
border-top-left-radius: 0;
|
// border-top-left-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
// border-bottom-left-radius: 0;
|
||||||
background-color: #ffa32c;
|
// background-color: #ffa32c;
|
||||||
font-size: 16px;
|
// font-size: 16px;
|
||||||
padding: 0 16px;
|
// padding: 0 16px;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
.my_main {
|
.my_main {
|
||||||
padding-top: 70px;
|
margin: 30px auto;
|
||||||
.r {
|
.r {
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -428,7 +430,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.footer_right {
|
.footer_right {
|
||||||
display: flex;
|
display: flex;
|
||||||
.item {
|
.item:nth-child(1) {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-right: 50px;
|
margin-right: 50px;
|
||||||
|
Reference in New Issue
Block a user