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.
60 lines
985 B
60 lines
985 B
<template>
|
|
<div class="notice">
|
|
<div v-for="(item,index) in list" class="noticeItem" @click="getNoticeItem(item)">
|
|
<div class="noticeTitle">{{item.notice_title}}</div>
|
|
<div class="time">{{item.create_time}}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { getNoticeList } from '@/api/user.js';
|
|
export default{
|
|
data(){
|
|
return{
|
|
list:[]
|
|
}
|
|
},
|
|
methods:{
|
|
getNoticeList(){
|
|
getNoticeList().then(res=>{
|
|
|
|
this.list= res.data.list
|
|
})
|
|
},
|
|
getNoticeItem(item){
|
|
uni.navigateTo({
|
|
url:'/pages/goods_details/noticeItem?id='+item.notice_id
|
|
})
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getNoticeList()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.notice{
|
|
min-height:calc(100vh);
|
|
.noticeItem{
|
|
padding:39rpx 29rpx;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
margin:24rpx;
|
|
.noticeTitle{
|
|
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #333333;
|
|
}
|
|
.time{
|
|
|
|
font-weight: 400;
|
|
font-size: 24rpx;
|
|
color: #999999;
|
|
margin-top: 26rpx;
|
|
}
|
|
}
|
|
}
|
|
</style> |