diff --git a/src/assets/icons/RepairPage/repair.svg b/src/assets/icons/RepairPage/repair.svg
new file mode 100644
index 0000000..fcae581
--- /dev/null
+++ b/src/assets/icons/RepairPage/repair.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pages/repair/repair.tsx b/src/pages/repair/repair.tsx
index a972e36..9d0742a 100644
--- a/src/pages/repair/repair.tsx
+++ b/src/pages/repair/repair.tsx
@@ -1,11 +1,19 @@
import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro';
-import { AtForm, AtInput, AtButton, AtRadio, AtCheckbox } from 'taro-ui';
+import {
+ AtForm,
+ AtInput,
+ AtButton,
+ AtRadio,
+ AtCheckbox,
+ AtCard,
+} from 'taro-ui';
import pt from '@/plain-text';
import PageFooter from '@/components/PageFooter/PageFooter';
import { submitTicket } from '@/service/submitTicket';
import type CustomTabBar from '@/custom-tab-bar';
+import repairLogo from '@/assets/icons/RepairPage/repair.svg';
import './repair.scss';
interface RepairPageState {
@@ -20,6 +28,8 @@ interface RepairPageState {
checkedList: Array;
}
+const submitInterval = 5000;
+
export default class RepairPage extends Component<{}, RepairPageState> {
state = {
type: 1 as 0 | 1,
@@ -114,85 +124,100 @@ export default class RepairPage extends Component<{}, RepairPageState> {
}
onSubmit() {
+ this.setState({
+ isLoading: true,
+ isDisable: true,
+ });
submitTicket(this);
+ setTimeout(() => {
+ this.setState({
+ isDisable: false,
+ });
+ }, submitInterval);
}
render(): ReactNode {
return (
-
-
-
-
-
-
-
-
-
- {pt.get().button.buttonText.submit}
-
-
+
+
+
+
+
+
+
+
+
+
+ {pt.get().button.buttonText.submit}
+
+
+
);
diff --git a/src/plain-text/RepairPage.ts b/src/plain-text/RepairPage.ts
index 576492c..b51c511 100644
--- a/src/plain-text/RepairPage.ts
+++ b/src/plain-text/RepairPage.ts
@@ -33,6 +33,10 @@ export interface RepairPageText {
desc: string;
};
};
+ cardText: {
+ note: string;
+ title: string;
+ };
}
export const repairPageZhCn: RepairPageText = {
@@ -70,6 +74,10 @@ export const repairPageZhCn: RepairPageText = {
desc: '请于评论中详述',
},
},
+ cardText: {
+ note: '工单描述请尽量简短哦!',
+ title: '新建预填写工单',
+ },
};
export const repairPageEnUs: RepairPageText = {
@@ -107,4 +115,8 @@ export const repairPageEnUs: RepairPageText = {
desc: '请于评论中详述',
},
},
+ cardText: {
+ note: '工单描述请尽量简短哦!',
+ title: '新建预填写工单',
+ },
};
diff --git a/src/service/userData.ts b/src/service/userData.ts
index b92967b..e3e04f8 100644
--- a/src/service/userData.ts
+++ b/src/service/userData.ts
@@ -4,6 +4,9 @@ import pt from '@/plain-text';
import { getUrl } from '.';
export function updateUserInfo(that: InformPage) {
+ that.setState({
+ isLoading: true,
+ });
Taro.request({
url: getUrl('/user/update'),
method: 'POST',