diff --git a/src/basePage/equipment/index.tsx b/src/basePage/equipment/index.tsx index 290821f..618a8cf 100644 --- a/src/basePage/equipment/index.tsx +++ b/src/basePage/equipment/index.tsx @@ -1,93 +1,106 @@ import { View } from "@tarojs/components" import { useState } from "react" import Taro from "@tarojs/taro" +import TabWrapper from "../../components/customized/tabWrapper" +import { ScrollView } from "@tarojs/components" const EquipMent = () => { - const [selectedMenuId, setSelectedMenuId] = useState('all') - const topMenus = [ - { - id: '1', - title: '基地1' - }, - { - id: '2', - title: '基地2' - }, - { - id: '3', - title: '基地3' - }, - ] + const [selectedMenuId, setSelectedMenuId] = useState('all') + const topMenus = [ + { + id: 'all', + title: '全部' + }, + { + id: '1', + title: '基地1' + }, + { + id: '2', + title: '基地2' + }, + { + id: '3', + title: '基地3' + }, + ] - const dataList = [ - { - id: '1', - }, - { - id: '2', - }, - { - id: '3', - }, - ] - return ( - - - - { - topMenus.map(item => { - return ( - setSelectedMenuId(item.id)} - >{ item.title } - ) - }) - } - - - { - dataList.map(item => { - return ( - { - // Taro.navigateTo({ url: '/pages/weatherStation/index?id=' + item.id }) - // }} - > - {/* + const dataList = [ + { + id: '1', + }, + { + id: '2', + }, + { + id: '3', + }, + ] + + const [refreshTrigger, setRefreshTrigger] = useState(false) + const refreshFunc = (): Promise => { + return new Promise((resolve, reject) => { resolve() }) + } + return ( + + + + + { + console.log('触发下拉刷新'); + setRefreshTrigger(true) + refreshFunc().then(() => setRefreshTrigger(false)) + }} + > + { + dataList.map(item => { + return ( + { + // Taro.navigateTo({ url: '/pages/weatherStation/index?id=' + item.id }) + // }} + > + {/* */} - - 气象站 - - - 已巡检 - 3 - - - 未巡检 - 3 - - - - { - Taro.navigateTo({ url: '/inspectionManager/inspection/index?id=' + item.id}) - }} - >去巡检 - - ) - }) - } - - - - ) + + 气象站 + + + 已巡检 + 3 + + + 未巡检 + 3 + + + + { + Taro.navigateTo({ url: '/inspectionManager/inspection/index?id=' + item.id }) + }} + >去巡检 + + ) + }) + } + + + + + ) } export default EquipMent; \ No newline at end of file