diff --git a/src/app.scss b/src/app.scss index 45d6780..ec3280a 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,3 +1,8 @@ @import "tailwindcss/base"; @import 'tailwindcss/components'; @import "tailwindcss/utilities"; + +@font-face { + font-family: 'ArtFont'; + src: url(./assets/font/biaoti.ttf); +} diff --git a/src/assets/font/biaoti.ttf b/src/assets/font/biaoti.ttf new file mode 100644 index 0000000..3729151 Binary files /dev/null and b/src/assets/font/biaoti.ttf differ diff --git a/src/components/customized/navigation/index.tsx b/src/components/customized/navigation/index.tsx index 2457311..b2eb4ff 100644 --- a/src/components/customized/navigation/index.tsx +++ b/src/components/customized/navigation/index.tsx @@ -16,7 +16,7 @@ const HeaderNation = ({ title = '', headerHeight = 0 }) => { }}> { showBack ? : null } - { title } + { title } ) diff --git a/src/components/customized/pageWrapper/index.tsx b/src/components/customized/pageWrapper/index.tsx index cc77ce3..bab91ea 100644 --- a/src/components/customized/pageWrapper/index.tsx +++ b/src/components/customized/pageWrapper/index.tsx @@ -6,7 +6,7 @@ import HeaderNation from "../navigation" const PageWrapper = ({ children, title = '' }) => { return ( { + return ( + + { + options.map((item:any) => { + return ( + callback(item.id)} + >{ item.title } + ) + }) + } + + ) +} + +export default TabWrapper; \ No newline at end of file diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 55cf2ab..dcec275 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -69,10 +69,10 @@ const Index = () => { return ( - + { bottomMenuList.map(item => { return ( diff --git a/src/pages/iot/index.tsx b/src/pages/iot/index.tsx index b0c77de..7cda583 100644 --- a/src/pages/iot/index.tsx +++ b/src/pages/iot/index.tsx @@ -5,6 +5,7 @@ import offlineIcon from '../../assets/images/icons/offline.png' import errorIcon from '../../assets/images/icons/error.png' import img from '../../assets/images/img.png' import Taro from "@tarojs/taro" +import TabWrapper from "../../components/customized/tabWrapper" const Iot = () => { const [selectedMenuId, setSelectedMenuId] = useState('all') @@ -111,22 +112,9 @@ const Iot = () => { }, ] return ( - + - - { - topMenus.map(item => { - return ( - setSelectedMenuId(item.id)} - >{ item.title } - ) - }) - } - + { dataList.map(item => { diff --git a/src/pages/msgCenter/index.scss b/src/pages/msgCenter/index.scss index 5f6cd80..a39bbe2 100644 --- a/src/pages/msgCenter/index.scss +++ b/src/pages/msgCenter/index.scss @@ -7,12 +7,6 @@ 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%; diff --git a/src/pages/msgCenter/index.tsx b/src/pages/msgCenter/index.tsx index ca25bc3..9ca4661 100644 --- a/src/pages/msgCenter/index.tsx +++ b/src/pages/msgCenter/index.tsx @@ -70,7 +70,7 @@ const MsgCenter = () => { }); return ( - + { topMenus.map(item => { return ( @@ -90,7 +90,7 @@ const MsgCenter = () => { { contList.map((item,index)=>{ return ( - { Taro.navigateTo({ url: '/pages/msgDetail/index' }) }}> + { Taro.navigateTo({ url: '/pages/msgDetail/index' }) }}> diff --git a/src/pages/msgDetail/index.scss b/src/pages/msgDetail/index.scss index cf64652..9ceb3a1 100644 --- a/src/pages/msgDetail/index.scss +++ b/src/pages/msgDetail/index.scss @@ -1,14 +1,6 @@ .detail{ - width: 90%; - margin: auto; - padding: 35px ; - border-radius: 20px; - 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 */ - ; + width: 100%; + padding: 35px; } .detailTop{ display: flex; diff --git a/src/pages/msgDetail/index.tsx b/src/pages/msgDetail/index.tsx index f24a6e7..94ca1dc 100644 --- a/src/pages/msgDetail/index.tsx +++ b/src/pages/msgDetail/index.tsx @@ -3,37 +3,37 @@ import rang from './assets/rang.png' import yxImg from './assets/yxImg.png' import image from './assets/image.png' import "./index.scss" -import HeaderNation from "../../components/customized/navigation" -import basicBg from '../../assets/images/bg.png' +import PageWrapper from "../../components/customized/pageWrapper" const MsgDetail = () => { return ( - - - - - - 土壤EC值预警 + + + + + + 土壤EC值预警 + + + 报警内容: 1号棚内虫害数量接近阈值数量报警 + 报警时间: 2024/3/13 16:30 + 设备编号: DHTUNBVO98K327 + 当前值: 1360 + 阈值: 900-1400 + 建议: 打开灭蚊灯 + - - 报警内容: 1号棚内虫害数量接近阈值数量报警 - 报警时间: 2024/3/13 16:30 - 设备编号: DHTUNBVO98K327 - 当前值: 1360 - 阈值: 900-1400 - 建议: 打开灭蚊灯 + + + + 影像 + + + + - - - - 影像 - - - - - - + ) }