71 lines
1.5 KiB
Vue
71 lines
1.5 KiB
Vue
|
<template>
|
||
|
<view>
|
||
|
<image :src="list.picture" class="picture" mode=""></image>
|
||
|
<view class="box">
|
||
|
<view class="info">
|
||
|
<text class="title u-line-2">{{ list.title }}</text>
|
||
|
<u-divider class="time">{{ list.addtime }}</u-divider>
|
||
|
<!-- <text class="time"></text> -->
|
||
|
</view>
|
||
|
<view class="content">{{ list.content }}</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
index: 0,
|
||
|
list: [],
|
||
|
};
|
||
|
},
|
||
|
onLoad(option) {
|
||
|
// console.log(option);
|
||
|
this.index = option.index;
|
||
|
// 获取数据
|
||
|
this.informationList();
|
||
|
},
|
||
|
methods: {
|
||
|
informationList(){
|
||
|
this.$u.api.informationList({}).then((res)=>{
|
||
|
if (res.errCode == 0) {
|
||
|
this.list = res.data[this.index];
|
||
|
console.log(this.list);
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
page {
|
||
|
}
|
||
|
.picture {
|
||
|
width: 100%;
|
||
|
}
|
||
|
.box {
|
||
|
width: 100%;
|
||
|
padding: 20rpx;
|
||
|
.info {
|
||
|
.title {
|
||
|
font-size: 38rpx;
|
||
|
color: rgba(0,0,0,.84);
|
||
|
line-height: 1.2;
|
||
|
}
|
||
|
.time {
|
||
|
padding: 40rpx 0;
|
||
|
}
|
||
|
}
|
||
|
.content {
|
||
|
padding: 0 6rpx;
|
||
|
font-size: 34rpx;
|
||
|
color: rgba(0,0,0,.6);
|
||
|
line-height: 1.4;
|
||
|
letter-spacing: 1rpx;
|
||
|
text-indent: 2rem;
|
||
|
}
|
||
|
}
|
||
|
</style>
|