| | |
| | | <text class="grid-text">{{baseListItem.title}}</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | <u-tabs :list="list3" class="tabs"> |
| | | <u-tabs :list="tabs" class="tabs"> |
| | | <template #right> |
| | | <view |
| | | style="padding-left: 4px;" |
| | |
| | | </view> |
| | | </template> |
| | | </u-tabs> |
| | | <view class="card" v-for="(item,index) in list4" :key="index"> |
| | | <view class="card" v-for="(item,index) in announcementList" :key="index"> |
| | | <view class="left"> |
| | | <u-image :src="lbPng" :width="20" :height="20"></u-image> |
| | | </view> |
| | | <view class="right"> |
| | | <view class="c-top">{{ item.title }}</view> |
| | | <view class="c-middle">{{ item.content }}</view> |
| | | <view class="c-top">{{ item.airspaceName }}</view> |
| | | <view class="c-middle">{{ item.remarks || '暂无' }}</view> |
| | | <view class="c-bottom"> |
| | | <view>{{ item.time }}</view> |
| | | <view>{{ item.num }}</view> |
| | | <view>{{ item.like }}</view> |
| | | <view>{{ item.createTime }}</view> |
| | | <view>{{ item.num || 0 }}</view> |
| | | <view>{{ item.like || 0 }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, ref } from 'vue' |
| | | import { onMounted, reactive, ref } from 'vue' |
| | | import lbPng from '@/static/images/lb.png' |
| | | import kyxxPng from '@/static/images/kyxx.svg' |
| | | import fxsqPng from '@/static/images/fxsq.svg' |
| | | import flfgPng from '@/static/images/flfg.svg' |
| | | import zczdPng from '@/static/images/zczd.svg' |
| | | import { sysNoticePageInfoApi, flightAirspacePageInfoApi } from '@/api/index' |
| | | const lbList = reactive([]); |
| | | // lbPng 轮播图 5次 |
| | | for (let i = 0; i < 5; i++) { |
| | |
| | | }, |
| | | ]); |
| | | |
| | | const list3 = reactive([ |
| | | const tabs = ref([ |
| | | { name: '空域信息' }, |
| | | { name: '法律法规' }, |
| | | { name: '政策制度' }, |
| | | ]); |
| | | |
| | | const list4 = reactive([ |
| | | { title: '关于征求', content: '关于征求', time: '2025-10-23', num: '1660', like: '126' }, |
| | | { title: '解决燃气', content: '解决燃气', time: '2025-10-23', num: '126', like: '126' }, |
| | | ]); |
| | | const announcementList = ref([]); |
| | | function gridClick(index) { |
| | | if (index === 0) { |
| | | uni.navigateTo({ |
| | |
| | | }) |
| | | } |
| | | } |
| | | // 获取空域信息列表 |
| | | async function getFlightAirspaceList() { |
| | | try { |
| | | const res = await flightAirspacePageInfoApi({ |
| | | current: 1, |
| | | size: 10, |
| | | }) |
| | | announcementList.value = res.data.data.records |
| | | } catch (error) { |
| | | uni.showToast({ |
| | | title: error.message, |
| | | icon: 'none', |
| | | duration: 2000, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 获取通知公告列表 |
| | | async function getSysNoticeList() { |
| | | try { |
| | | const res = await sysNoticePageInfoApi({ |
| | | current: 1, |
| | | size: 10, |
| | | noticeType: 2, |
| | | }) |
| | | if (res.code === 200) { |
| | | announcementList.value = res.data.records |
| | | } |
| | | } catch (error) { |
| | | uni.showToast({ |
| | | title: error.message, |
| | | icon: 'none', |
| | | duration: 2000, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getFlightAirspaceList() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |