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.
xxdj1/user/pages/gonggao/list.vue

84 lines
1.5 KiB

2 years ago
<template>
<view class="content">
2 years ago
<view class="item" v-for="(item,index) in list" :key="index" @click="godetail(item)">
<view class="view">
<text>{{item.title}}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<!-- <u-collapse
2 years ago
@change="change"
@close="close"
@open="open"
>
<u-collapse-item
2 years ago
:title="item.title"
2 years ago
name="Docs guide"
2 years ago
v-for="(item,index) in list"
:key="index"
2 years ago
>
2 years ago
<text class="u-collapse-content" v-html="item.content"></text>
2 years ago
</u-collapse-item>
2 years ago
2 years ago
2 years ago
</u-collapse> -->
2 years ago
</view>
</template>
<script>
export default {
2 years ago
data(){
return{
list:[]
}
},
2 years ago
methods: {
open(e) {
// console.log('open', e)
},
close(e) {
// console.log('close', e)
},
change(e) {
// console.log('change', e)
2 years ago
},
async getAnnouncementList(){
let res = await this.$api.mine.getAnnouncementList()
console.log(res,"0000")
this.list = res.list
},
godetail(item){
console.log(item)
uni.navigateTo({
url:"/user/pages/gonggao/item?id="+item.id
})
2 years ago
}
2 years ago
},
onLoad() {
this.getAnnouncementList()
2 years ago
}
}
</script>
<style lang="scss" scpoed>
.content{
background: #FFFFFF;
margin:24rpx;
overflow: hidden;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(16,132,86,0.06);
border-radius: 30rpx;
2 years ago
}.item{
.view{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom:1px solid #EAEAEA;
margin:0 30upx;
padding:40upx 0upx;
}
2 years ago
}
</style>