提交 06296b8a authored 作者: 王鹏飞's avatar 王鹏飞

update

上级 f4f90b22
......@@ -22,7 +22,7 @@ body {
'Hiragino Sans GB', 'Wenquanyi Micro Hei', sans-serif;
padding: 0;
margin: 0;
background: #F9F8F8;
background: #eee;
}
p {
margin: 0;
......@@ -171,4 +171,3 @@ img {
a {
color: currentColor;
}
......@@ -252,13 +252,13 @@ export default {
getNameActive() {
return item => {
const currentPath = this.$route.path
if (item.path === currentPath) {
if (currentPath.includes(item.path)) {
return 'name active'
} else {
let className = 'name'
if (item.childern) {
item.childern.map(cData => {
cData.path === currentPath && (className = 'name active')
currentPath.includes(cData.path) && (className = 'name active')
})
}
return className
......@@ -303,6 +303,9 @@ li {
font-style: normal;
padding: 0 14px;
}
.logout {
cursor: pointer;
}
}
.login-btn-box {
margin-left: auto;
......
......@@ -4,7 +4,7 @@
<li
v-for="(item, index) in data.slider"
:class="item.pathActive.findIndex(path => {
return path === $route.path
return $route.path.includes(path)
}) !== -1 && 'active'"
:key="index"
@click="goPage(item.path)"
......
......@@ -2,8 +2,8 @@
<div class="news-content-box">
<ul class="list-content">
<template v-for="(item, index) in data">
<li @click="goDetail(item)" :key="index">
<img :src="item.photo_uri" alt="">
<li @click="handleClick(item)" :key="index">
<img :src="item.photo_uri" alt="" />
<div class="right-con">
<div class="time">{{ item.created_time }}</div>
<div class="title">{{ item.title }}</div>
......@@ -27,64 +27,52 @@ export default {
}
},
methods: {
goDetail(item) {
if (item.source === '') {
const path = this.$route.path
let routePath = ''
if (path.indexOf('alumni') > -1) {
routePath = '/alumni/detail'
} else {
routePath = this.$route.path.indexOf('hot') === -1 ? '/news/interview-detail' : '/news/hot-detail'
}
this.$router.push({
path: routePath,
query: {
id: item.id
}
})
} else {
handleClick(item) {
if (item.source) {
window.open(item.source)
} else {
this.$emit('onClick', item)
}
}
}
}
</script>
<style lang="scss" scoped>
.news-content-box{
.list-content{
.news-content-box {
.list-content {
width: 900px;
margin: 0 auto;
background: #fff;
li{
li {
display: flex;
flex-wrap: wrap;
border-bottom: 1px solid #E6E6E6;
border-bottom: 1px solid #e6e6e6;
margin-bottom: 20px;
padding-bottom: 36px;
cursor: pointer;
&:hover{
.right-con{
.text{
&:hover {
.right-con {
.text {
color: #141414;
}
}
}
img{
img {
width: 320px;
height: 210px;
display: block;
}
.right-con{
.right-con {
width: 550px;
margin-left: 30px;
.time{
.time {
font-size: 16px;
font-weight: 300;
line-height: 100%;
color: #AA1941;
color: #aa1941;
padding-top: 13px;
}
.title{
.title {
font-size: 22px;
font-weight: bold;
line-height: 32px;
......@@ -96,7 +84,7 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.text{
.text {
font-size: 14px;
font-weight: 300;
line-height: 24px;
......
<template>
<div>
<Nuxt :key="$route.fullPath" />
</div>
<Nuxt />
</template>
<template>
<div>
<Head />
<Nuxt :key="$route.fullPath" />
<Foot />
<Nuxt />
<Foot v-if="hasFooter" />
</div>
</template>
<script>
export default {
props: { hasFooter: { Boolean, default: true } }
}
</script>
<style>
html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
......
......@@ -61,7 +61,6 @@
import * as api from '@/api/my'
export default {
layout: 'normal',
name: 'LetterIndex',
data() {
return {
......
......@@ -94,7 +94,7 @@ export default {
},
handlePageChange(value) {
this.currentActive = value
this.$router.push({ path: this.$route.path, query: { active: value } }).catch(() => {})
this.$router.push({ path: this.$route.path, query: { active: value } })
},
handleTabChange(value) {
this.tabActive = value
......
......@@ -13,21 +13,6 @@
</div>
</template>
<script>
export default {
props: {},
data() {
return {}
},
mounted() {
document.body.style = 'background-color:#eee;'
},
destroyed() {
document.body.style = ''
}
}
</script>
<style lang="scss" scoped>
.layout {
max-width: 1200px;
......
......@@ -24,7 +24,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -25,7 +25,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -34,7 +34,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -31,9 +31,9 @@
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import appFrame from '@/components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......@@ -58,7 +58,7 @@ export default {
}
},
async fetch() {
this.data = await this.$axios.get(`/api/zws/v1/cms/news/${this.$route.query.id}`).then(res => {
this.data = await this.$axios.get(`/api/zws/v1/cms/news/${this.$route.params.id}`).then(res => {
return res
})
const params = {
......@@ -76,16 +76,10 @@ export default {
mounted() {},
methods: {
goPage(item) {
if (item.source === '') {
// this.$router.push({
// path: '/about/news-detail',
// query: {
// id: item.id
// }
// })
window.open(`${window.location.origin}/about/news-detail?id=${item.id}`)
} else {
if (item.source) {
window.open(item.source)
} else {
this.$router.push({ name: 'alumni-sharing-id', params: { id: item.id } })
}
}
}
......
<template>
<div class="sharing">
<app-frame :data="frameParams">
<newsItem :data="newsList" class="news-item" />
<newsItem :data="newsList" class="news-item" @onClick="handleClick" />
</app-frame>
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import newsItem from '../../components/news/newsItem'
import appFrame from '@/components/appFrame'
import newsItem from '@/components/news/newsItem'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame,
newsItem
......@@ -44,6 +44,11 @@ export default {
]
}
}
},
methods: {
handleClick(item) {
this.$router.push({ name: 'alumni-sharing-id', params: { id: item.id } })
}
}
}
</script>
......
......@@ -22,7 +22,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -21,7 +21,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -22,7 +22,7 @@
<script>
import appFrame from '../../components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......
......@@ -29,7 +29,7 @@ import commonProblem from '../components/home/commonProblem'
import openClass from '../components/home/openClass'
import rightAside from '../components/rightAside'
export default {
layout: 'main',
layout: 'normal',
components: {
banner,
projectFeatures,
......
......@@ -31,9 +31,9 @@
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import appFrame from '@/components/appFrame'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame
},
......@@ -58,7 +58,7 @@ export default {
}
},
async fetch() {
this.data = await this.$axios.get(`/api/zws/v1/cms/news/${this.$route.query.id}`).then(res => {
this.data = await this.$axios.get(`/api/zws/v1/cms/news/${this.$route.params.id}`).then(res => {
return res
})
const params = {
......@@ -73,19 +73,12 @@ export default {
})
})
},
mounted() {},
methods: {
goPage(item) {
if (item.source === '') {
this.$router.push({
path: '/news/hot-detail',
query: {
id: item.id
}
})
// window.open(`${window.location.origin}/news/hot-detail?id=${item.id}`)
} else {
if (item.source) {
window.open(item.source)
} else {
this.$router.push({ name: 'news-hot-id', params: { id: item.id } })
}
}
}
......
<template>
<div class="hot-content-box">
<app-frame :data="frameParams">
<newsItem :data="newsList" class="news-item" />
<newsItem :data="newsList" class="news-item" @onClick="handleClick" />
</app-frame>
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import newsItem from '../../components/news/newsItem'
import appFrame from '@/components/appFrame'
import newsItem from '@/components/news/newsItem'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame,
newsItem
......@@ -45,8 +45,10 @@ export default {
}
}
},
mounted() {
console.log(this.$route)
methods: {
handleClick(item) {
this.$router.push({ name: 'news-hot-id', params: { id: item.id } })
}
}
}
</script>
......
......@@ -31,9 +31,10 @@
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import appFrame from '@/components/appFrame'
export default {
layout: 'main',
layout: 'normal',
watchQuery: true,
components: {
appFrame
},
......@@ -76,16 +77,10 @@ export default {
mounted() {},
methods: {
goPage(item) {
if (item.source === '') {
// this.$router.push({
// path: '/about/news-detail',
// query: {
// id: item.id
// }
// })
window.open(`${window.location.origin}/about/news-detail?id=${item.id}`)
} else {
if (item.source) {
window.open(item.source)
} else {
this.$router.push({ name: 'news-interview-id', params: { id: item.id } })
}
}
}
......
<template>
<div class="hot-content-box">
<app-frame :data="frameParams">
<newsItem :data="newsList" class="news-item" />
<newsItem :data="newsList" class="news-item" @onClick="handleClick" />
</app-frame>
</div>
</template>
<script>
import appFrame from '../../components/appFrame'
import newsItem from '../../components/news/newsItem'
import appFrame from '@/components/appFrame'
import newsItem from '@/components/news/newsItem'
export default {
layout: 'main',
layout: 'normal',
components: {
appFrame,
newsItem
......@@ -44,6 +45,11 @@ export default {
]
}
}
},
methods: {
handleClick(item) {
this.$router.push({ name: 'news-interview-id', params: { id: item.id } })
}
}
}
</script>
......
......@@ -85,7 +85,7 @@
</template>
<script>
export default {
layout: 'main',
layout: 'normal',
data() {
return {
tabActive: 'zjjy',
......
......@@ -19,7 +19,7 @@
</template>
<script>
export default {
layout: 'main',
layout: 'normal',
data() {
return {
frameParams: {
......
......@@ -17,7 +17,7 @@
</template>
<script>
export default {
layout: 'main',
layout: 'normal',
data() {
return {
list: [
......
......@@ -6,7 +6,8 @@ export default (routes, resolve) => {
routes.push(
{
path: '/my',
component: resolve(__dirname, '../layouts/main.vue'),
component: resolve(__dirname, '../layouts/normal.vue'),
props: { hasFooter: false },
children: [
{
name: 'apply',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论