You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1006 B
55 lines
1006 B
<template>
|
|
<view>
|
|
<view class="message-list">
|
|
<view class="message-item" v-for="(item, i) in messageList" :key="i" @click="navClickHandler(item)">
|
|
<image src="/static/images/hpic.jpg" class="message-img"></image>
|
|
<text>{{item.title}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
messageList:[]
|
|
};
|
|
},
|
|
onLoad() {
|
|
this.getMessageList();
|
|
},
|
|
methods:{
|
|
async getMessageList() {
|
|
|
|
const {
|
|
data: res
|
|
} = await uni.$http.post('/small/project/message/listAll')
|
|
if (!res.success) return uni.$showMsg()
|
|
|
|
this.messageList = res.data
|
|
|
|
},
|
|
navClickHandler(item) {
|
|
uni.navigateTo({
|
|
url: '/subpkg/messageInfo/messageInfo?guid='+item.guid
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.message-list {
|
|
margin: 12px 0;
|
|
|
|
.message-img {
|
|
width: 99%;
|
|
height: 140rpx;
|
|
margin-bottom: 10rpx;
|
|
border-radius: 10px;
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
|