News.vue
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
<div class="page_news">
<cube-page type="New-view" title="活动公告">
<div slot="content">
<div class="cover"><img :src="NewsData.image"/></div>
<van-panel :title="NewsData.title" :desc="NewsData.updatetime">
<div class="con" v-html="NewsData.content"></div>
</van-panel>
</div>
</cube-page>
</div>
</template>
<script>
import CubePage from './TP/cube-page.vue'
import * as util from '@/utils/network'
export default {
data() {
return {
id:this.$route.query.id,
NewsData:[]
}
},
components: {
CubePage
},
methods:{
axios_Request: function() {
var url = "/addons/litestore/api.index/getnew"
let that = this;
//这里直接调用网络接口
util.get(url,{'new_id':that.id},
function (result) {
that.NewsData = result['data']['newdata']
},
);
},
},
created: function () {
this.axios_Request();
}
}
</script>
<style>
.page_news{
height: 100%;
position: absolute;
width: 100%;
top: 0;
z-index: 28;
}
.page_news .cover {
}
.page_news img {
max-width: 100%;
}
.page_news main.content {
text-align: left;
}
.page_news .van-cell__label {
text-align: right;
}
.page_news .con {
padding-bottom: 0.8em;
}
.page_news .van-hairline--top-bottom::after {
border-width: 0!important;
}
</style>