菜大王uniapp开发
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.
 
 
 

52 lines
1.1 KiB

<script setup>
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import navv from "@/components/nav/nav.vue";
import topTitle from "@/components/topTitle/topTitle.vue";
import { getNoticesApi } from "@/libs/api";
const notices = ref([]);
async function getList() {
const res = await getNoticesApi();
if (res.code !== "0") {
return;
}
notices.value = res.data;
}
onLoad(() => {
getList();
});
</script>
<template>
<navv>
<template #default="{ screen, status, menu }">
<topTitle title="通知公告" />
<view
:style="{
borderTop: 'solid 1px #F0f0f0',
width: '100%',
height: `${screen - status - (menu || 0)}px`,
overflowY: 'auto',
}"
>
<view v-for="(item, index) in notices" :key="index" class="notice">
<rich-text :nodes="item" />
</view>
</view>
</template>
</navv>
</template>
<style lang="scss" scoped>
.notice{
padding: 30rpx 30rpx;
border-bottom: solid 20rpx #f0f0f0;
line-height: 48rpx;
font-size: 32rpx;
/* background: #ffffff; */
}
</style>