diff --git a/src/assets/icons/MyTickets/fail.svg b/src/assets/icons/MyTickets/fail.svg
new file mode 100644
index 0000000..08e6e87
--- /dev/null
+++ b/src/assets/icons/MyTickets/fail.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/icons/MyTickets/finished.svg b/src/assets/icons/MyTickets/finished.svg
new file mode 100644
index 0000000..ba97e48
--- /dev/null
+++ b/src/assets/icons/MyTickets/finished.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/icons/MyTickets/repair.svg b/src/assets/icons/MyTickets/repair.svg
new file mode 100644
index 0000000..b3a5f19
--- /dev/null
+++ b/src/assets/icons/MyTickets/repair.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/icons/MyTickets/tick.svg b/src/assets/icons/MyTickets/tick.svg
new file mode 100644
index 0000000..36e2555
--- /dev/null
+++ b/src/assets/icons/MyTickets/tick.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pages/user/myTicket/myTicket.tsx b/src/pages/user/myTicket/myTicket.tsx
index 9002a83..ecdb920 100644
--- a/src/pages/user/myTicket/myTicket.tsx
+++ b/src/pages/user/myTicket/myTicket.tsx
@@ -1,9 +1,69 @@
import { Component, ReactNode } from 'react';
import { View } from '@tarojs/components';
+import { AtList, AtListItem } from 'taro-ui';
+import moment from 'moment';
+import repair from '@/assets/icons/MyTickets/repair.svg';
+import finished from '@/assets/icons/MyTickets/finished.svg';
+import tick from '@/assets/icons/MyTickets/tick.svg';
+import fail from '@/assets/icons/MyTickets/fail.svg';
+import pt from '@/plain-text';
import './myTicket.scss';
-export default class SettingsPage extends Component {
- render(): ReactNode {
- return ;
+type FixStatus = 1 | 2 | 3 | 4 | 5;
+
+class TicketListItem {
+ brand: string;
+ model: string;
+ status: FixStatus;
+ createAt: moment.Moment;
+ iconMap: Map;
+
+ constructor(
+ brand: string,
+ model: string,
+ status: FixStatus,
+ createAt: moment.Moment,
+ ) {
+ this.brand = brand;
+ this.model = model;
+ this.status = status;
+ this.createAt = createAt;
+ this.iconMap = new Map([
+ [1, repair],
+ [2, repair],
+ [3, finished],
+ [4, tick],
+ [5, fail],
+ ]);
+ }
+
+ render(): JSX.Element {
+ const tl = pt.get().ticketList;
+ return (
+
+ );
+ }
+}
+
+export default class SettingsPage extends Component {
+ state = {
+ fixList: [
+ new TicketListItem('华硕', '天选3', 3, moment()),
+ new TicketListItem('联想', '拯救者', 5, moment()),
+ ],
+ };
+ render(): ReactNode {
+ const fixListRenderer = this.state.fixList.map(item => item.render());
+ return (
+
+ {fixListRenderer}
+
+ );
}
}
diff --git a/src/plain-text/TicketList.ts b/src/plain-text/TicketList.ts
new file mode 100644
index 0000000..ac68ceb
--- /dev/null
+++ b/src/plain-text/TicketList.ts
@@ -0,0 +1,32 @@
+type FixStatus = 1 | 2 | 3 | 4 | 5;
+
+export interface TicketListText {
+ createdAt(time: string): string;
+ statusMap: Map;
+}
+
+export const ticketListZhCn: TicketListText = {
+ createdAt: time => {
+ return '创建于' + ' ' + time;
+ },
+ statusMap: new Map([
+ [1, '创建成功'],
+ [2, '维修中'],
+ [3, '待取回'],
+ [4, '已取回'],
+ [5, '已取回'],
+ ]),
+};
+
+export const ticketListEnUs: TicketListText = {
+ createdAt: time => {
+ return '创建于' + ' ' + time;
+ },
+ statusMap: new Map([
+ [1, '创建成功'],
+ [2, '维修中'],
+ [3, '待取回'],
+ [4, '已取回'],
+ [5, '已取回'],
+ ]),
+};
diff --git a/src/plain-text/index.ts b/src/plain-text/index.ts
index c11bc1f..f0ee529 100644
--- a/src/plain-text/index.ts
+++ b/src/plain-text/index.ts
@@ -5,6 +5,7 @@ import { TabBarText, tabBarEnUs, tabBarZhCn } from './TabBar';
import { ReportPageText, reportPageEnUs, reportPageZhCn } from './ReportPage';
import { InformPageText, informPageZhCn, informtPageEnUs } from './InformPage';
import { AboutPageText, aboutPageEnUs, aboutPageZhCn } from './AboutPage';
+import { TicketListText, ticketListEnUs, ticketListZhCn } from './TicketList';
interface TextRecord {
pageFooter: PageFooterText;
@@ -14,6 +15,7 @@ interface TextRecord {
reportPage: ReportPageText;
informPage: InformPageText;
aboutPage: AboutPageText;
+ ticketList: TicketListText;
}
const textZhCn: TextRecord = {
@@ -24,6 +26,7 @@ const textZhCn: TextRecord = {
reportPage: reportPageZhCn,
informPage: informPageZhCn,
aboutPage: aboutPageZhCn,
+ ticketList: ticketListZhCn,
};
const textEnUs: TextRecord = {
@@ -34,6 +37,7 @@ const textEnUs: TextRecord = {
reportPage: reportPageEnUs,
informPage: informtPageEnUs,
aboutPage: aboutPageEnUs,
+ ticketList: ticketListEnUs,
};
// type Lang = 'zh_CN' | 'en_US' | ...;