修改细节
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="list" style="background-color:#fff; margin-top: 3rem;">
|
||||
<div class="list" style="background-color:#fff; margin-top: 3rem;">
|
||||
<!--{{value}}-->
|
||||
<div class="query">
|
||||
<el-row>
|
||||
@@ -7,47 +7,50 @@
|
||||
<!--<div style="width: 95%;">-->
|
||||
<div>
|
||||
<!--<input class="query_input" v-model="query"/>-->
|
||||
<el-input class="query_input" v-model="query" size="small" :placeholder="$t('message.placeholder')"></el-input>
|
||||
<el-input class="query_input" v-model="query" size="small"
|
||||
:placeholder="$t('message.placeholder')"></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="10" :sm="10" :md="10" :lg="4" :xl="4" style="float: right">
|
||||
<el-button class="query_button" type="primary" size="small" icon="el-icon-search" @click="handleCurrentChange(-1)">
|
||||
{{ $t('message.search') }}</el-button>
|
||||
<el-button class="query_button" type="primary" size="small" icon="el-icon-search"
|
||||
@click="handleCurrentChange(-1)">
|
||||
{{ $t('message.search') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div>
|
||||
<!--正文内容-->
|
||||
<div class="context">
|
||||
<div v-for="(item,index) in value.data" class="tw">
|
||||
<el-row>
|
||||
<el-col :xs="6" :sm="6" :md="5" :lg="4" :xl="4">
|
||||
<div class="tw_time">
|
||||
<div class="tw_top">
|
||||
{{ getDay(item.publishTime) }}
|
||||
</div>
|
||||
<div class="tw_bottoms">
|
||||
{{ getTime(item.publishTime) }}
|
||||
</div>
|
||||
<!--正文内容-->
|
||||
<div class="context">
|
||||
<div v-for="(item,index) in value.data" class="tw">
|
||||
<el-row>
|
||||
<el-col :xs="6" :sm="6" :md="5" :lg="4" :xl="4">
|
||||
<div class="tw_time">
|
||||
<div class="tw_top">
|
||||
{{ getDay(item.publishTime) }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="18" :sm="18" :md="18" :lg="16" :xl="17">
|
||||
<div class="tw_context">
|
||||
<div class="tw_context_title" @click="getContext(item)">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="tw_context_text" v-html="item.content"></div>
|
||||
<div class="tw_bottoms">
|
||||
{{ getTime(item.publishTime) }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-show="width>992" :xs="1" :sm="1" :md="3" :lg="4" :xl="3">
|
||||
<div class="tw_img">
|
||||
<img :src="item.imgurl" alt="">
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="18" :sm="18" :md="18" :lg="16" :xl="17">
|
||||
<div class="tw_context">
|
||||
<div class="tw_context_title" @click="getContext(item)">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr v-if="index != value.data.length-1" style="border: 0.1rem solid #E6E6E6;" class="hr">
|
||||
</div>
|
||||
<div class="tw_context_text" v-html="item.content"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-show="width>992" :xs="1" :sm="1" :md="3" :lg="4" :xl="3">
|
||||
<div class="tw_img">
|
||||
<img :src="item.imgurl" alt="">
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr v-if="index != value.data.length-1" style="border: 0.1rem solid #E6E6E6;" class="hr">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row>
|
||||
<el-col class="pagination_p">
|
||||
@@ -83,23 +86,23 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
width: document.documentElement.clientWidth,
|
||||
small:document.documentElement.clientWidth<=992,
|
||||
query:'',
|
||||
small: document.documentElement.clientWidth <= 992,
|
||||
query: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getContext(context){
|
||||
getContext(context) {
|
||||
let type = this.$route.query && this.$route.query.type
|
||||
let router = ''
|
||||
if (type!=null){
|
||||
router = "?id="+context.id+'&type='+type+"&lang="+sessionStorage.getItem("lang")
|
||||
}else {
|
||||
router="/" +this.value.navId+"?id="+context.id+"&lang="+sessionStorage.getItem("lang")
|
||||
if (type != null) {
|
||||
router = "?id=" + context.id + '&type=' + type + "&lang=" + sessionStorage.getItem("lang")
|
||||
} else {
|
||||
router = "/" + this.value.navId + "?id=" + context.id + "&lang=" + sessionStorage.getItem("lang")
|
||||
}
|
||||
if (this.width <=992){
|
||||
this.$router.push("/mobile/" + this.value.secondId +router);
|
||||
}else {
|
||||
this.$router.push("/pc/" + this.value.secondId +router);
|
||||
if (this.width <= 992) {
|
||||
this.$router.push("/mobile/" + this.value.secondId + router);
|
||||
} else {
|
||||
this.$router.push("/pc/" + this.value.secondId + router);
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
@@ -108,19 +111,19 @@ export default {
|
||||
handleCurrentChange(val) {
|
||||
if (val == -1) {
|
||||
this.value.pageNum = 1
|
||||
}else {
|
||||
} else {
|
||||
this.value.pageNum = val
|
||||
}
|
||||
let data = {
|
||||
title:this.query,
|
||||
title: this.query,
|
||||
id: this.value.navId,
|
||||
pageNum: this.value.pageNum,
|
||||
pageSize: 5
|
||||
}
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type != null&&this.type!=0){
|
||||
if (this.type != null && this.type != 0) {
|
||||
data.id = this.value.secondId
|
||||
}else {
|
||||
} else {
|
||||
console.log(this.value);
|
||||
}
|
||||
console.log(data);
|
||||
@@ -141,7 +144,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-input__inner{
|
||||
.el-input__inner {
|
||||
|
||||
border-color: #1956BC !important;
|
||||
border-radius: 0 !important;
|
||||
@@ -152,13 +155,13 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.query_input{
|
||||
.query_input {
|
||||
border-color: #1956BC !important;
|
||||
border-radius: 0 !important;
|
||||
|
||||
}
|
||||
|
||||
.query_button{
|
||||
.query_button {
|
||||
//height: 3.5rem;
|
||||
border-radius: 0rem 1rem 1rem 0rem;
|
||||
background-color: #1956BC;
|
||||
@@ -221,6 +224,7 @@ export default {
|
||||
padding-right: 2rem;
|
||||
|
||||
}
|
||||
|
||||
//.tw_context_title:hover{
|
||||
// font-weight: bolder;
|
||||
//}
|
||||
@@ -251,16 +255,18 @@ export default {
|
||||
color: #3C3C3C;
|
||||
}
|
||||
}
|
||||
.pagination_p{
|
||||
|
||||
.pagination_p {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
.pagination{
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
.query{
|
||||
|
||||
.query {
|
||||
//margin: 1rem 0;
|
||||
z-index: 999;
|
||||
width: 30%;
|
||||
@@ -269,17 +275,19 @@ export default {
|
||||
top: -2.4rem;
|
||||
//float: right;
|
||||
}
|
||||
@media screen and (min-width: 1100px) and (max-width: 1400px) {
|
||||
|
||||
@media screen and (min-width: 1100px) and (max-width: 1400px) {
|
||||
.query {
|
||||
width: 40% !important;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1100px){
|
||||
|
||||
@media screen and (max-width: 1100px) {
|
||||
.query {
|
||||
margin-top: 3rem;
|
||||
width: 80% !important;
|
||||
}
|
||||
.context{
|
||||
.context {
|
||||
margin-top: 6rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<span> > </span>
|
||||
<!--<span style="color: #1956BC;font-size: 1.4rem">-->
|
||||
<!--<router-link to="">-->
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
<!--</router-link>-->
|
||||
<!--</span>-->
|
||||
<span> > </span>
|
||||
@@ -124,7 +124,7 @@
|
||||
<!--<router-link to="">-->
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
<!--</router-link>-->
|
||||
<!--</router-link>-->
|
||||
</span>
|
||||
<!--<span> > </span>-->
|
||||
<!-- <span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>-->
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
/**
|
||||
* 获得面包屑导航
|
||||
*/
|
||||
getCrumbs(){
|
||||
getCrumbs() {
|
||||
crumbs(this.secondId).then(res => {
|
||||
this.crumbs = res.data
|
||||
})
|
||||
@@ -373,7 +373,7 @@ export default {
|
||||
//if (index != this.showIndex) {
|
||||
this.showIndex = index
|
||||
this.type = nav.type
|
||||
this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId+"?lang="+sessionStorage.getItem("lang"));
|
||||
this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId + "?lang=" + sessionStorage.getItem("lang"));
|
||||
//this.getContent(nav)
|
||||
//}
|
||||
}
|
||||
@@ -385,13 +385,16 @@ export default {
|
||||
.content {
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
.english{
|
||||
|
||||
.english {
|
||||
margin: 0 !important;
|
||||
width: 80% !important;
|
||||
.lab{
|
||||
|
||||
.lab {
|
||||
width: 100% !important;
|
||||
}
|
||||
.lab_list{
|
||||
|
||||
.lab_list {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user