1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="center">
- <view class="massage" v-for="(item, index) in list" :key="index" @click="nav('/pages/index/messageInfo?id='+item.id)">
- <view class="title">{{item.title}}</view>
- <view class="time">{{item.add_time}}</view>
- </view>
- </view>
- </template>
- <script>
- import { article } from '@/api/user.js';
- export default {
- data() {
- return {
- list:[]
- }
- },
- onLoad() {
- let obj = this;
- article({page:1,limit:1000},1).then(({data}) =>{
- this.list = data
- })
- },
- methods:{
- nav(url){
- uni.navigateTo({
- url
- })
- }
- }
- }
- </script>
- <style lang="less">
- .center {
- background: #f3f3f3;
- }
- .massage {
- background: #FFFFFF;
- padding: 30rpx;
- border-bottom: 1px solid #E9E9E9;
- .title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .time{
- margin-top: 18rpx;
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- }
- </style>
|