消息推送,详情页header

This commit is contained in:
熊丽君
2021-08-20 17:36:05 +08:00
parent eb782ddaf4
commit 19f379a826
7 changed files with 168 additions and 44 deletions

View File

@ -5,20 +5,35 @@
<div class="my_header">
<div class="title content p0-100">
<el-row :gutter="20">
<el-col :span="8"><span>嘉策科技创新服务平台</span></el-col>
<el-col :span="8"
><el-input
v-model.trim="input"
placeholder="请输入搜索关键字"
prefix-icon="el-icon-search"
@keyup.enter.native="toSearch"
></el-input
></el-col>
<el-col :span="8" style="text-align: right">
<el-col :span="8">
<!-- <span>嘉策科技创新服务平台</span> -->
<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-col :span="8" style="text-align: right">
<span
>服务热线<span style="color: #ffa32c">400-0507-580</span></span
>
</el-col>
</el-col> -->
</el-row>
</div>
</div>
@ -98,7 +113,7 @@
target="_blank"
:to="{
path: '/result',
query: { key: 'policy', id: item.id },
query: { key: 'policy', id: item.id }
}"
>
<span></span>{{ item.title }}
@ -115,12 +130,12 @@
<div class="footer_one content">
<p>
<span>
<i><img src="@/assets/image/icon1.png" alt="" /></i>
总浏览量{{total.count}}</span
<i><img src="@/assets/image/icon1.png" alt=""/></i>
总浏览量{{ total.count }}</span
>
<span>
<i><img src="@/assets/image/icon1.png" alt="" /></i>
今日浏览{{total.today}}</span
<i><img src="@/assets/image/icon1.png" alt=""/></i>
今日浏览{{ total.today }}</span
>
</p>
<div class="footer_two">
@ -128,7 +143,7 @@
<div class="footer_left_one">
<span class="footer_left_l">版权声明</span>
<span class="footer_left_r">
<i><img src="@/assets/image/icon3.png" alt="" /></i>
<i><img src="@/assets/image/icon3.png" alt=""/></i>
客服热线(周一至周五8:30-18:00)
</span>
</div>
@ -138,7 +153,7 @@
<div class="footer_left_three">
<span class="footer_left_l">意见反馈</span>
<span class="footer_left_r">
<i><img src="@/assets/image/icon2.png" alt="" /></i>
<i><img src="@/assets/image/icon2.png" alt=""/></i>
公司地址安徽省合肥市蜀山区黄山市601号412-414
</span>
</div>
@ -174,7 +189,7 @@ import {
getPolicyReadInfo,
getInfo,
getInfo2,
getInfo3,
getInfo3
} from '@/api/search';
import { getPolicyList, getRead } from '@/api/home/notice';
import { mapGetters } from 'vuex';
@ -182,7 +197,7 @@ import { add, cancel } from '@/api/search';
import Editor from '@/components/Editor';
export default {
components: {
Editor,
Editor
},
data() {
return {
@ -190,43 +205,43 @@ export default {
type: '',
formData: {},
noticeList: [],
total: {},
total: {}
};
},
watch: {
formData: {
handler: function () {
handler: function() {
this.$nextTick(() => {
this.formatRichText(this.formData.downloadUrl, this.formData.id);
});
},
}
},
deep: true,
deep: true
},
computed: {
...mapGetters(['token']),
...mapGetters(['token'])
},
methods: {
toSearch() {
if (!this.input.length) return this.msgError('请输入搜索关键字');
let routerJump = this.$router.resolve({
path: '/search',
query: { val: this.input },
query: { val: this.input }
});
window.open(routerJump.href, '_blank');
},
addItem() {
add({ policyId: this.formData.id }).then((res) => {
add({ policyId: this.formData.id }).then(res => {
this.formData.collected = 1;
this.msgSuccess('操作成功');
});
},
cancelItem() {
cancel({ policyId: this.formData.id }).then((res) => {
cancel({ policyId: this.formData.id }).then(res => {
this.formData.collected = 0;
this.msgSuccess('操作成功');
});
},
}
},
created() {
let { key, id } = this.$route.query;
@ -263,7 +278,7 @@ export default {
getPolicyList({ pageNum: 1, pageSize: 5 }).then(({ data }) => {
this.noticeList = data.list;
});
},
}
};
</script>
@ -292,11 +307,35 @@ export default {
position: fixed;
z-index: 1;
width: 100%;
height: 46px;
line-height: 46px;
height: 48px;
line-height: 48px;
background: #3d3e3e;
.title {
color: #fff;
.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;
}
}
}
}
}
.my_main {