diff --git a/project.config.json b/project.config.json
index 8457eb6..26de120 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,32 +1,56 @@
{
- "miniprogramRoot": "dist/",
- "projectname": "taro-react-tailwind-vscode-template",
- "description": "",
- "appid": "touristappid",
- "setting": {
- "urlCheck": true,
- "es6": false,
- "enhance": false,
- "compileHotReLoad": false,
- "postcss": false,
- "minified": false,
- "babelSetting": {
- "ignore": [],
- "disablePlugins": [],
- "outputPath": ""
+ "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
},
- "packNpmRelationList": []
- },
- "compileType": "miniprogram",
- "libVersion": "2.30.3",
- "srcMiniprogramRoot": "dist/",
- "packOptions": {
- "ignore": [],
- "include": []
- },
- "condition": {},
- "editorSetting": {
- "tabIndent": "insertSpaces",
- "tabSize": 2
- }
+ "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 5000437..359a352 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -1,7 +1,21 @@
{
- "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "taro-react-tailwind-vscode-template",
- "setting": {
- "compileHotReLoad": false
- }
+ "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": []
+ }
+ }
}
\ No newline at end of file
diff --git a/src/pages/msgCenter/assets/rang.png b/src/pages/msgCenter/assets/rang.png
new file mode 100644
index 0000000..f5428c2
Binary files /dev/null and b/src/pages/msgCenter/assets/rang.png differ
diff --git a/src/pages/msgCenter/assets/warn.png b/src/pages/msgCenter/assets/warn.png
new file mode 100644
index 0000000..4583b3b
Binary files /dev/null and b/src/pages/msgCenter/assets/warn.png differ
diff --git a/src/pages/msgCenter/index.scss b/src/pages/msgCenter/index.scss
new file mode 100644
index 0000000..68430b0
--- /dev/null
+++ b/src/pages/msgCenter/index.scss
@@ -0,0 +1,49 @@
+.cont{
+ padding: 10px 15px ;
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-top: 25px;
+ border-radius: 15px;
+ justify-content: space-between;
+ box-shadow:
+ 0 10px 6px -6px #ccc, /* bottom shadow */
+ 0 -10px 6px -6px #ccc, /* top shadow */
+ 10px 0 6px -6px #ccc, /* right shadow */
+ -10px 0 6px -6px #ccc; /* left shadow */
+ ;
+ .right{
+ width: 80%;
+ height: 100%;
+ padding: 15px 10px;
+ .right-top{
+ display: flex;
+ margin-bottom: 15px;
+ align-items: center;
+ justify-content: space-between;
+ .top-left{
+ font-weight: 700;
+ }
+ .top-right{
+ font-size: 30px;
+ color: #c1c1c1;
+ }
+ }
+ .warn{
+ color:#f7cc73;
+ font-size:30px;
+ }
+ .rang{
+ color:red;
+ font-size:30px;
+ }
+ }
+}
+.main{
+ margin: auto;
+ display: flex;
+ width: 93%;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+}
\ No newline at end of file
diff --git a/src/pages/msgCenter/index.tsx b/src/pages/msgCenter/index.tsx
index d968052..461988e 100644
--- a/src/pages/msgCenter/index.tsx
+++ b/src/pages/msgCenter/index.tsx
@@ -1,8 +1,98 @@
-import { View } from "@tarojs/components"
-
+import { View,Image } from "@tarojs/components"
+import { useState } from "react"
+import warn from './assets/warn.png'
+import rang from './assets/rang.png'
+import './index.scss'
const MsgCenter = () => {
+ const [selectedMenuId, setSelectedMenuId] = useState('all')
+ let contList=[
+ {
+ title:'土壤EC值预警',
+ time:'2024/3/13 16:30',
+ url:'./assets/rang.png',
+ message:'1号基地土壤EC值低于0.4阈值报警',
+ id:'1'
+ },
+ {
+ title:'棚内温度报警',
+ url:'./assets/rang.png',
+ time:'2024/3/1 10:30',
+ message:'3号棚内温度39度,超过阈值37度,建议打开放风机',
+ id:'1'
+ },
+ {
+ title:'系统通知',
+ url:'./assets/warn.png',
+ time:'2024/3/13 8:30',
+ message:'今日设备巡检结果尚未填报',
+ id:'0'
+ },
+ {
+ title:'虫情预警',
+ url:'./assets/rang.png',
+ time:'2024/3/13 6:30',
+ message:'1号棚内虫害数量接近阈值预警',
+ id:'1'
+ },
+ ]
+ const topMenus = [
+ {
+ id: 'all',
+ title: '全部'
+ },
+ {
+ id: '1',
+ title: '预警'
+ },
+ {
+ id: '2',
+ title: '通知'
+ },
+ ]
+
+ const dataList = [
+ {
+ id: '1',
+ },
+ {
+ id: '2',
+ },
+ ]
+
return (
- MsgCenter
+
+
+ {
+ topMenus.map(item => {
+ return (
+ setSelectedMenuId(item.id)}
+ >{ item.title }
+ )
+ })
+ }
+
+
+ {
+ contList.map((item,index)=>{
+ return (
+
+
+
+
+ {item.title}
+ {item.time}
+
+ {item.message}
+
+
+ )
+ })
+ }
+
+
)
}