diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index 1700871..b460b63 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -1,12 +1,84 @@
import { View, Text } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro';
+import { AtCard, AtTimeline } from 'taro-ui';
import type CustomTabBar from '../../custom-tab-bar';
import './index.scss';
-class Index extends Component {
+interface CardContent {
+ title: string;
+ note: string;
+ extra: JSX.Element | string;
+ content: JSX.Element;
+}
+
+function mainPageCard(c: CardContent): JSX.Element {
+ return (
+
+
+ {c.content}
+
+
+ );
+}
+
+class DutyInfo extends Component {
+ render(): ReactNode {
+ return (
+
+ x人在岗
+
+ );
+ }
+}
+
+class StepInfo extends Component {
+ render(): ReactNode {
+ return (
+
+
+
+ );
+ }
+}
+
+class TipsInfo extends Component {
+ render(): ReactNode {
+ return (
+
+ 提示:
+
+ );
+ }
+}
+
+export default class Index extends Component {
state = {
- msg: 'Hello World!',
+ dutyInfoCard: {
+ title: '204值班情况',
+ note: 'Tips',
+ extra: '额外信息',
+ content: ,
+ },
+ stepInfoCard: {
+ title: '维修步骤',
+ note: 'Tips',
+ extra: '额外信息',
+ content: ,
+ },
+ tipsInfoCard: {
+ title: '提醒事项',
+ note: 'Tips',
+ extra: '额外信息',
+ content: ,
+ },
};
// 以下是TabBar相关
@@ -20,10 +92,16 @@ class Index extends Component {
render(): ReactNode {
return (
- {this.state.msg}
+
+ 您好,这里是E志者协会。
+ 维修请移步东三-204教室。
+
+
+ {mainPageCard(this.state.dutyInfoCard)}
+ {mainPageCard(this.state.stepInfoCard)}
+ {mainPageCard(this.state.tipsInfoCard)}
+
);
}
}
-
-export default Index;