提交 952f71ef 作者: 陈楚尹

feat: 增加降水模块

上级 6d9e5ed5
<script setup lang="ts"></script>
<template>
<view class="h-84 lh-10 flex text-28">
<fui-icon name="wait" size="45" />
<text class="ml-1">时间:</text>
<text class="text-#1890FF">11月30日09时30分-12月1日09时30分</text>
</view>
</template>
<style lang="less" scoped></style>
<script setup lang="ts">
import { liveModules } from '/@/utils/const/Navigation'
import type { navItemType } from '/@/utils/const/Navigation'
defineProps({
......@@ -18,6 +17,9 @@
// }
// const getColor = (type: string) => colors[type]
function goRoute(nav: UniApp.NavigateToOptions) {
uni.navigateTo(nav)
}
const lastString = (string: string) => string.charAt(string.length - 1)
......@@ -25,8 +27,13 @@
</script>
<template>
<fui-grid :columns="4" class="mt-4">
<fui-grid-item v-for="(item, index) in dataSouce" :key="index" :highlight="false">
<fui-grid :columns="4" class="mt-4 bg-#fff" :showBorder="false">
<fui-grid-item
v-for="(item, index) in dataSouce"
:key="index"
:highlight="false"
@click="goRoute(item.navigate)"
>
<view class="fui-grid__cell flex flex-col flex-center">
<!-- <image src="/static/uni-logo.png" class="fui-icon w50" mode="widthFix" /> -->
<!-- :color="getColor(lastString(item.value))" -->
......
{
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"pageOrientation": "portrait" //横屏配置,全局屏幕旋转设置(仅 APP/微信/QQ小程序),支持 auto / portrait / landscape
},
"pages": [
// pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": false,
......@@ -57,6 +63,24 @@
"enableReachBottom": false
}
},
// 降水实况
{
"path": "pages/business/monitor/rain",
"style": {
"navigationBarTitleText": "降水监测",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#1890FF",
"app-plus": {
"titleNView": {
"buttons": [
{
"type": "share"
}
]
}
}
}
},
// === PDF 文件预览 ===
{
"path": "pages/common/viewer/pdf",
......@@ -109,12 +133,6 @@
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"resizable": true,
"tabBar": {
"color": "#7A7E83",
......@@ -127,7 +145,7 @@
"spacing": "6px",
"list": [
{
"pagePath": "pages/index/index",
"pagePath": "pages/home/index",
"iconPath": "static/icons/home.png",
"selectedIconPath": "static/icons/homeSelect.png",
"text": "首页"
......
......@@ -19,7 +19,7 @@
<Header title="监测预报" />
<!-- 内容 -->
<view class="p-2 pt-3 pb-1">
<view class="box-shadow-def p-2 pt-3 b-rd-2 mb-3" v-for="(item, index) in navs" :key="index">
<view class="box-shadow-def p-2 pt-3 b-rd-2 mb-3 bg-#fff" v-for="(item, index) in navs" :key="index">
<MenuHeader :title="item.title" otherTitle="展开更多" />
<Grid :dataSouce="item.dataSouce" />
</view>
......
<script setup lang="ts">
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
uni.showToast({
title: '你点了分享按钮',
icon: 'none',
})
}
})
</script>
<template>
<view class="bg">
<CustomPicker />
</view>
</template>
......@@ -4,8 +4,6 @@
import MeteService from './modules/meteService.vue'
import CommonFunction from './modules/commonFunction.vue'
// const title = ref('Hello World')
onMounted(() => {
// test API
// API.example.hello.request().then((body) => {
......@@ -18,12 +16,14 @@
// const surprise = () => {
// // #ifdef APP-PLUS
// const orientation = plus.navigator.getOrientation()
// if (orientation === 0) {
// plus.screen.lockOrientation('landscape-primary')
// } else if (orientation === 90) {
// plus.screen.lockOrientation('portrait-primary')
// }
// Message.toast('🥳 surprise~')
// Message.toast('🥳 surprise ~ ')
// // #endif
// // #ifndef APP-PLUS
......
<script lang="ts"></script>
<template>
<view class="p-2 b-rd-2 box-shadow-def mt-3 bg-#fff">
<MenuHeader title="常用功能" otherTitle="自定义" />
......
......@@ -2,6 +2,7 @@ export interface navItemType {
label: string
value: string
code?: string
navigate?: UniApp.NavigateToOptions
}
// 实况监测
......@@ -9,6 +10,9 @@ export const liveModules: navItemType[] = [
{
label: '降水监测',
value: 'rain-m',
navigate: {
url: '/pages/business/monitor/rain',
},
},
{
label: '气温监测',
......
......@@ -10,6 +10,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
CacheImage: typeof import('./../src/components/CacheImage/index.vue')['default']
CustomPicker: typeof import('./../src/components/CustomPicker/index.vue')['default']
Empty: typeof import('./../src/components/Empty/index.vue')['default']
FDragItem: typeof import('./../src/components/firstui/fui-drag/f-drag-item.vue')['default']
FIndexListItem: typeof import('./../src/components/firstui/fui-index-list/f-index-list-item.vue')['default']
......
......@@ -27,7 +27,7 @@ export default defineConfig({
],
shortcuts: [
{
bg: 'bg-[#f6f7fb]',
bg: 'bg-[#F4F5F7]',
'border-base': 'border border-[#eee]',
'flex-center': 'flex justify-center items-center',
'text-c0': 'text-[#ffffff]',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论