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

update

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