提交 41017006 authored 作者: lihuihui's avatar lihuihui

update

上级 4fa11c15
......@@ -3,11 +3,11 @@ import { News } from '@api'
export default class NewsAction extends BaseACTION {
newsList(obj) {
return News.newsList(obj).then(res => res)
return News.newsList(obj).then(res => res.data)
}
news(id) {
return News.news(id).then(res => res)
news(id, params) {
return News.news(id, params).then(res => res.data)
}
postNes(obj) {
......
......@@ -17,10 +17,18 @@ export default class NewsAPI extends BaseAPI {
}
newsList(params) {
return this.get('/zws/v1/cms/news', params)
return this.get('/cms/api/v1/articles', params)
}
news(id) {
return this.get(`/zws/v1/cms/news/${id}`)
// newsList(params) {
// return this.get('/zws/v1/cms/news', params)
// }
// news(id) {
// return this.get(`/zws/v1/cms/news/${id}`)
// }
news(id, params) {
return this.get(`/cms/api/v1/article/${id}/detail`, params)
}
}
......@@ -3,7 +3,7 @@
<el-carousel arrow="never" class="banner-swiper">
<el-carousel-item v-for="item in bannerList" :key="item.src"><img :src="item.src"/></el-carousel-item>
</el-carousel>
<router-link to="profession">
<!-- <router-link to="profession">
<div class="cover">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/new-marywood/banner_block.png" />
<div class="cover-inner">
......@@ -14,7 +14,7 @@
</p>
</div>
</div>
</router-link>
</router-link> -->
<div class="video-box" v-show="isPlaying">
<video
ref="video"
......@@ -23,11 +23,20 @@
playsinline
></video>
</div>
<div class="intr-content">
<div class="cover-inner">
<h1>玛丽伍德大学</h1>
<h2>数字领导力方向MBA</h2>
<p>
赋能当今社会每位管理人,成就数字时代先锋领导者系统、实用、数字地赋能项目成长和企业转型升级
</p>
</div>
<div class="button-group">
<!-- <div class="button-item"><router-link to="profession">了解更多</router-link></div> -->
<div class="button-item button-play" :class="{ 'is-playing': isPlaying }" @click="togglePlay">学校视频</div>
</div>
</div>
</div>
</template>
<script>
......@@ -95,12 +104,55 @@ export default {
object-fit: fill;
}
}
.button-group {
z-index: 21;
.intr-content {
position: absolute;
top: 50%;
left: 100px;
bottom: 30%;
transform: translateY(-50%);
z-index: 11;
.cover-inner {
// position: absolute;
// left: 0;
// right: 0;
// top: 0;
// bottom: 0;
// z-index: 11;
// padding: 0 30px;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: flex-end;
// padding-bottom: 33%;
}
h1 {
font-size: 36px;
color: #fff;
font-weight: 500;
// text-align: right;
}
h2 {
margin-top: 16px;
font-size: 26px;
color: #faa634;
font-weight: 400;
// text-align: right;
}
p {
margin-top: 20px;
font-size: 16px;
color: #fff;
line-height: 2;
text-align: justify;
width: 380px;
}
}
.button-group {
z-index: 21;
position: relative;
// left: 100px;
// bottom: 30%;
display: flex;
margin-top: 20px;
.button-item {
width: 132px;
border: 1px solid;
......
......@@ -77,7 +77,12 @@ export default {
},
setDate() {
this.isloading = true
cAction.News.news(this.tempRoute.params.id)
const params = {
timestamp: parseInt(Date.now() / 1000),
nonce: Math.random(),
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d'
}
cAction.News.news(this.tempRoute.params.id, params)
.then(data => {
this.dataNews = Object.assign({}, data)
this.isloading = false
......
......@@ -18,10 +18,10 @@
>
<div class="list" v-if="(index + 1) % 2 !== 0">
<div class="list-time">
<span class="font-size-30">{{ item.created_time | formatDate }}</span>
<span class="font-size-15">{{ item.created_time | formatDate(item.created_time, true) }}</span>
<span class="font-size-30">{{ item.created_at | formatDate }}</span>
<span class="font-size-15">{{ item.created_at | formatDate(item.created_at, true) }}</span>
</div>
<img :src="item.photo_uri" />
<img :src="item.web_img_uri" />
<div class="list-title">
<span class="font-size-30">{{ item.title }}</span>
<span class="font-size-15">{{ item.summary }}</span>
......@@ -32,10 +32,10 @@
<span class="font-size-30">{{ item.title }}</span>
<span class="font-size-15">{{ item.summary }}</span>
</div>
<img :src="item.photo_uri" />
<img :src="item.web_img_uri" />
<div class="list-time">
<span class="font-size-30">{{ item.created_time | formatDate }}</span>
<span class="font-size-15">{{ item.created_time | formatDate(item.created_time, true) }}</span>
<span class="font-size-30">{{ item.created_at | formatDate }}</span>
<span class="font-size-15">{{ item.created_at | formatDate(item.created_at, true) }}</span>
</div>
</div>
</div>
......@@ -56,6 +56,7 @@ export default {
filters: {
formatDate(data, state = null) {
console.log(data, '123')
const date = new Date(data.replace(/-/g, '/'))
const y = date.getFullYear()
let m = date.getMonth() + 1
......@@ -75,7 +76,9 @@ export default {
quiuse: {
page: 1,
per_page: 4,
project_id: 1012
project_id: '6805762100502200320',
type_tag: 'article_news_hot',
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d'
}
}
},
......@@ -92,23 +95,28 @@ export default {
},
setDate() {
this.isloading = true
this.quiuse.timestamp = parseInt(Date.now() / 1000)
this.quiuse.nonce = Math.random()
.toString(36)
.slice(-8)
cAction.News.newsList(this.quiuse)
.then(data => {
if (this.listData.length === data.length) {
if (this.listData.length === data.data.length) {
this.showMany = true
this.isloading = false
return
}
this.listData = data.map(k => {
this.listData = data.data.map(k => {
k.hover = false
return k
})
console.log(this.listData, '123123')
this.showMany = false
this.isloading = false
})
.catch(e => {
this.isloading = false
console.log(e)
console.log(e, '1231231')
})
}
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论