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

update

上级 4fa11c15
...@@ -3,11 +3,11 @@ import { News } from '@api' ...@@ -3,11 +3,11 @@ import { News } from '@api'
export default class NewsAction extends BaseACTION { export default class NewsAction extends BaseACTION {
newsList(obj) { newsList(obj) {
return News.newsList(obj).then(res => res) return News.newsList(obj).then(res => res.data)
} }
news(id) { news(id, params) {
return News.news(id).then(res => res) return News.news(id, params).then(res => res.data)
} }
postNes(obj) { postNes(obj) {
......
...@@ -17,10 +17,18 @@ export default class NewsAPI extends BaseAPI { ...@@ -17,10 +17,18 @@ export default class NewsAPI extends BaseAPI {
} }
newsList(params) { newsList(params) {
return this.get('/zws/v1/cms/news', params) return this.get('/cms/api/v1/articles', params)
} }
news(id) { // newsList(params) {
return this.get(`/zws/v1/cms/news/${id}`) // 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 @@ ...@@ -3,7 +3,7 @@
<el-carousel arrow="never" class="banner-swiper"> <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-item v-for="item in bannerList" :key="item.src"><img :src="item.src"/></el-carousel-item>
</el-carousel> </el-carousel>
<router-link to="profession"> <!-- <router-link to="profession">
<div class="cover"> <div class="cover">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/new-marywood/banner_block.png" /> <img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/new-marywood/banner_block.png" />
<div class="cover-inner"> <div class="cover-inner">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</p> </p>
</div> </div>
</div> </div>
</router-link> </router-link> -->
<div class="video-box" v-show="isPlaying"> <div class="video-box" v-show="isPlaying">
<video <video
ref="video" ref="video"
...@@ -23,9 +23,18 @@ ...@@ -23,9 +23,18 @@
playsinline playsinline
></video> ></video>
</div> </div>
<div class="button-group"> <div class="intr-content">
<!-- <div class="button-item"><router-link to="profession">了解更多</router-link></div> --> <div class="cover-inner">
<div class="button-item button-play" :class="{ 'is-playing': isPlaying }" @click="togglePlay">学校视频</div> <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>
</div> </div>
</template> </template>
...@@ -95,12 +104,55 @@ export default { ...@@ -95,12 +104,55 @@ export default {
object-fit: fill; object-fit: fill;
} }
} }
.button-group { .intr-content {
z-index: 21;
position: absolute; position: absolute;
top: 50%;
left: 100px; 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; display: flex;
margin-top: 20px;
.button-item { .button-item {
width: 132px; width: 132px;
border: 1px solid; border: 1px solid;
......
...@@ -77,7 +77,12 @@ export default { ...@@ -77,7 +77,12 @@ export default {
}, },
setDate() { setDate() {
this.isloading = true 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 => { .then(data => {
this.dataNews = Object.assign({}, data) this.dataNews = Object.assign({}, data)
this.isloading = false this.isloading = false
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
> >
<div class="list" v-if="(index + 1) % 2 !== 0"> <div class="list" v-if="(index + 1) % 2 !== 0">
<div class="list-time"> <div class="list-time">
<span class="font-size-30">{{ item.created_time | formatDate }}</span> <span class="font-size-30">{{ item.created_at | formatDate }}</span>
<span class="font-size-15">{{ item.created_time | formatDate(item.created_time, true) }}</span> <span class="font-size-15">{{ item.created_at | formatDate(item.created_at, true) }}</span>
</div> </div>
<img :src="item.photo_uri" /> <img :src="item.web_img_uri" />
<div class="list-title"> <div class="list-title">
<span class="font-size-30">{{ item.title }}</span> <span class="font-size-30">{{ item.title }}</span>
<span class="font-size-15">{{ item.summary }}</span> <span class="font-size-15">{{ item.summary }}</span>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
<span class="font-size-30">{{ item.title }}</span> <span class="font-size-30">{{ item.title }}</span>
<span class="font-size-15">{{ item.summary }}</span> <span class="font-size-15">{{ item.summary }}</span>
</div> </div>
<img :src="item.photo_uri" /> <img :src="item.web_img_uri" />
<div class="list-time"> <div class="list-time">
<span class="font-size-30">{{ item.created_time | formatDate }}</span> <span class="font-size-30">{{ item.created_at | formatDate }}</span>
<span class="font-size-15">{{ item.created_time | formatDate(item.created_time, true) }}</span> <span class="font-size-15">{{ item.created_at | formatDate(item.created_at, true) }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
filters: { filters: {
formatDate(data, state = null) { formatDate(data, state = null) {
console.log(data, '123')
const date = new Date(data.replace(/-/g, '/')) const date = new Date(data.replace(/-/g, '/'))
const y = date.getFullYear() const y = date.getFullYear()
let m = date.getMonth() + 1 let m = date.getMonth() + 1
...@@ -75,7 +76,9 @@ export default { ...@@ -75,7 +76,9 @@ export default {
quiuse: { quiuse: {
page: 1, page: 1,
per_page: 4, per_page: 4,
project_id: 1012 project_id: '6805762100502200320',
type_tag: 'article_news_hot',
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d'
} }
} }
}, },
...@@ -92,23 +95,28 @@ export default { ...@@ -92,23 +95,28 @@ export default {
}, },
setDate() { setDate() {
this.isloading = true this.isloading = true
this.quiuse.timestamp = parseInt(Date.now() / 1000)
this.quiuse.nonce = Math.random()
.toString(36)
.slice(-8)
cAction.News.newsList(this.quiuse) cAction.News.newsList(this.quiuse)
.then(data => { .then(data => {
if (this.listData.length === data.length) { if (this.listData.length === data.data.length) {
this.showMany = true this.showMany = true
this.isloading = false this.isloading = false
return return
} }
this.listData = data.map(k => { this.listData = data.data.map(k => {
k.hover = false k.hover = false
return k return k
}) })
console.log(this.listData, '123123')
this.showMany = false this.showMany = false
this.isloading = false this.isloading = false
}) })
.catch(e => { .catch(e => {
this.isloading = false this.isloading = false
console.log(e) console.log(e, '1231231')
}) })
} }
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论