| | |
| | | userInfo.key, |
| | | userInfo.code |
| | | ); |
| | | userStore.setUserInfo(res.data); |
| | | userStore.setUserInfo(res.data.data); |
| | | uni.reLaunch({ |
| | | url: "/pages/page/index", |
| | | }); |
| | |
| | | <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' |
| | | const lbList = reactive([]); |
| | | import { sysNoticePageInfoApi, flightAirspacePageInfoApi } from '@/api/index' |
| | | const lbList = reactive([]); |
| | | // lbPng 轮播图 5次 |
| | | for (let i = 0; i < 5; i++) { |
| | | lbList.push({ |
| | |
| | | } |
| | | } |
| | | |
| | | const baseList = ref([ |
| | | { |
| | | src: kyxxPng, |
| | | title: '空域信息' |
| | | }, |
| | | { |
| | | src: fxsqPng, |
| | | title: '飞行申请' |
| | | }, |
| | | { |
| | | src: flfgPng, |
| | | title: '法律法规' |
| | | }, |
| | | { |
| | | src: zczdPng, |
| | | title: '政策制度' |
| | | const baseList = ref([ |
| | | { |
| | | src: kyxxPng, |
| | | title: '空域信息' |
| | | }, |
| | | ]); |
| | | |
| | | const list3 = reactive([ |
| | | { 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' }, |
| | | { |
| | | src: fxsqPng, |
| | | title: '飞行申请' |
| | | }, |
| | | { |
| | | src: flfgPng, |
| | | title: '法律法规' |
| | | }, |
| | | { |
| | | src: zczdPng, |
| | | title: '政策制度' |
| | | }, |
| | | ]); |
| | | |
| | | const tabs = ref([ |
| | | { name: '空域信息' }, |
| | | { name: '法律法规' }, |
| | | { name: '政策制度' }, |
| | | ]); |
| | | |
| | | 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"> |
| | |
| | | // 假设有token值需要在头部需要携带 |
| | | let accessToken = useUserStore()?.$state?.userInfo?.access_token; |
| | | if (accessToken) { |
| | | config.header['Blade-Auth'] = 'bearer ' + accessToken; |
| | | // config.header['Blade-Auth'] = 'bearer ' + accessToken; |
| | | config.header['authorization'] = accessToken; |
| | | } |
| | | if (detail?.areaCode) { |
| | | config.header['areaCode'] = detail.areaCode |
| | | } |
| | | // if (detail?.areaCode) { |
| | | // config.header['areaCode'] = detail.areaCode |
| | | // } |
| | | // 安全请求header |
| | | config.header['Blade-Requested-With'] = 'BladeHttpRequest'; |
| | | // config.header['Blade-Requested-With'] = 'BladeHttpRequest'; |
| | | // 客户端认证参数 |
| | | config.header['Authorization'] = 'Basic ' + Base64.encode(website.clientId + ':' + website.clientSecret); |
| | | // config.header['Authorization'] = 'Basic ' + Base64.encode(website.clientId + ':' + website.clientSecret); |
| | | return config |
| | | }, config => { // 可使用async await 做异步操作 |
| | | return Promise.reject(config) |