diff --git a/project.config.json b/project.config.json index 26de120..3b34a44 100644 --- a/project.config.json +++ b/project.config.json @@ -1,56 +1,56 @@ { - "miniprogramRoot": "dist/", - "projectname": "taro-react-tailwind-vscode-template", - "description": "", - "appid": "wxc422ab9e3d9174d8", - "setting": { - "urlCheck": true, - "es6": false, - "enhance": false, - "postcss": false, - "preloadBackgroundData": false, - "minified": false, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "minifyWXML": true, - "showES6CompileOption": false, - "useCompilerPlugins": false, - "ignoreUploadUnusedFiles": true + "miniprogramRoot": "dist/", + "projectname": "taro-react-tailwind-vscode-template", + "description": "", + "appid": "wx22cc65a14ab1a16d", + "setting": { + "urlCheck": true, + "es6": false, + "enhance": false, + "postcss": false, + "preloadBackgroundData": false, + "minified": false, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "compileType": "miniprogram", - "libVersion": "2.30.3", - "srcMiniprogramRoot": "dist/", - "packOptions": { - "ignore": [], - "include": [] - }, - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - }, - "condition": {} + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false, + "ignoreUploadUnusedFiles": true + }, + "compileType": "miniprogram", + "libVersion": "2.30.3", + "srcMiniprogramRoot": "dist/", + "packOptions": { + "ignore": [], + "include": [] + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "condition": {} } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 359a352..2f04138 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,21 +1,8 @@ { - "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "projectname": "taro-react-tailwind-vscode-template", - "setting": { - "compileHotReLoad": false - }, - "condition": { - "plugin": { - "list": [] - }, - "game": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [] - } - } + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "taro-demo", + "setting": { + "compileHotReLoad": true + }, + "condition": {} } \ No newline at end of file diff --git a/src/app.config.ts b/src/app.config.ts index 3682eeb..d7e4e46 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -12,6 +12,8 @@ export default defineAppConfig({ // 跳转页面 'pages/weatherStation/index', // 气象站 'pages/inspection/index', // 气象站(巡检) + 'pages/inspectionContent/index', // 气象站(巡检内容表单) + 'pages/inspectionLog/index', // 气象站(巡检日志) 'pages/msgDetail/index', // 消息详情 'pages/soilMoisture/index', // 土壤墒情 'pages/envMonitor/index', // 棚内环境监测 diff --git a/src/components/customized/pageWrapper/index.tsx b/src/components/customized/pageWrapper/index.tsx index bab91ea..07d4b0f 100644 --- a/src/components/customized/pageWrapper/index.tsx +++ b/src/components/customized/pageWrapper/index.tsx @@ -20,7 +20,9 @@ const PageWrapper = ({ children, title = '' }) => { }} > - { children } + + { children } + ) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index dcec275..b7b69a2 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -17,18 +17,7 @@ import HeaderNation from "../../components/customized/navigation"; import { globalData } from "../../config"; const Index = () => { - const { statusBarHeight = 0, screenHeight } = Taro.getSystemInfoSync() - // 获取胶囊信息 - const { height, top } = Taro.getMenuButtonBoundingClientRect() - // 计算标题栏高度 - const titleBarHeight = height + (top - statusBarHeight) * 2 - // 计算导航栏高度 - const appHeaderHeight = statusBarHeight + titleBarHeight - //去掉导航栏,屏幕剩余的高度 - const contentHeight = screenHeight - appHeaderHeight * 2 - console.log('titleBarHeight', titleBarHeight); - console.log('contentHeight', contentHeight); - console.log('appHeaderHeight', appHeaderHeight); + // Taro.navigateTo({ url: '/pages/inspectionLog/index' }) const [curSelectedItem, setCurSelectedItem] = useState('iot') Taro.setNavigationBarTitle({ title: '物联网' }) diff --git a/src/pages/inspectionContent/index.tsx b/src/pages/inspectionContent/index.tsx new file mode 100644 index 0000000..234cdaa --- /dev/null +++ b/src/pages/inspectionContent/index.tsx @@ -0,0 +1,69 @@ +import { Label, Radio, RadioGroup, Input, View, Textarea, Button } from "@tarojs/components" +import PageWrapper from "../../components/customized/pageWrapper"; +import Taro from "@tarojs/taro"; + +const FormItem = ({ children, label = '' }) => { + return ( + + { label } + { children } + + ) +} + +const InspectionContent = () => { + return ( + + 基地1-气象站-设备1(NKWFDS1AW27) + + + + + + + + + 巡检结果 + + + + + + + + + + 影像 + { + Taro.chooseImage({ + count: 1, + complete: () => { + console.log('complete'); + }, + fail: () => { + console.log('fail'); + }, + success: () => { + console.log('success'); + } + }) + }} + >选择图片 + + + + + + + ) +} + +export default InspectionContent;; \ No newline at end of file diff --git a/src/pages/inspectionLog/index.tsx b/src/pages/inspectionLog/index.tsx new file mode 100644 index 0000000..325dc2b --- /dev/null +++ b/src/pages/inspectionLog/index.tsx @@ -0,0 +1,20 @@ +import { Input, View } from "@tarojs/components" +import PageWrapper from "../../components/customized/pageWrapper"; + +const InspectionLog = () => { + return ( + + + + + + + + + ) +} + +export default InspectionLog; \ No newline at end of file diff --git a/src/pages/iot/index.tsx b/src/pages/iot/index.tsx index 7cda583..32bffd2 100644 --- a/src/pages/iot/index.tsx +++ b/src/pages/iot/index.tsx @@ -129,20 +129,20 @@ const Iot = () => { - { item.title } - - - + { item.title } + + + 在线 3 - + 离线 3 - + 故障 3 diff --git a/src/pages/msgCenter/index.scss b/src/pages/msgCenter/index.scss index a39bbe2..a5695d6 100644 --- a/src/pages/msgCenter/index.scss +++ b/src/pages/msgCenter/index.scss @@ -1,10 +1,9 @@ .cont{ - padding: 10px 15px ; + padding: 10px 15px; width: 100%; background-color: #fff; display: flex; align-items: center; - margin-top: 25px; border-radius: 15px; justify-content: space-between; .right{ diff --git a/src/pages/msgCenter/index.tsx b/src/pages/msgCenter/index.tsx index 9ca4661..2730c35 100644 --- a/src/pages/msgCenter/index.tsx +++ b/src/pages/msgCenter/index.tsx @@ -4,6 +4,7 @@ import warn from './assets/warn.png' import rang from './assets/rang.png' import './index.scss' import Taro from "@tarojs/taro" +import TabWrapper from "../../components/customized/tabWrapper" const MsgCenter = () => { const [selectedMenuId, setSelectedMenuId] = useState('all') let contList=[ @@ -35,6 +36,48 @@ const MsgCenter = () => { message:'1号棚内虫害数量接近阈值预警', id:'1' }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, + { + title:'虫情预警', + url:'./assets/rang.png', + time:'2024/3/13 6:30', + message:'1号棚内虫害数量接近阈值预警', + id:'1' + }, ] const topMenus = [ { @@ -69,41 +112,28 @@ const MsgCenter = () => { } }); return ( - - + + + + { - topMenus.map(item => { + contList.map((item,index)=>{ return ( - setSelectedMenuId(item.id)} - >{ item.title } + { Taro.navigateTo({ url: '/pages/msgDetail/index' }) }}> + + + + {item.title} + {item.time} + + {item.message} + + + ) }) } - {val} - {val2} - - - { - contList.map((item,index)=>{ - return ( - { Taro.navigateTo({ url: '/pages/msgDetail/index' }) }}> - - - - {item.title} - {item.time} - - {item.message} - - - - ) - }) - } + )