From 8184bffd926a883cd623f1542fe16095ec542f69 Mon Sep 17 00:00:00 2001 From: YCC Date: Mon, 8 May 2023 16:32:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E5=86=85=E5=AE=B9=E7=9A=84=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Feedback.js | 27 +++++++++++++++++++++------ src/views/feedback/Detail.jsx | 34 +++++++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/src/stores/Feedback.js b/src/stores/Feedback.js index a8c2653..505c4a8 100644 --- a/src/stores/Feedback.js +++ b/src/stores/Feedback.js @@ -14,6 +14,7 @@ class Feedback { feedbackImages = []; //图片列表 feedbackRate = []; //反馈评分 feedbackReview = []; //站外好评 + feedbackInfo = []; //地接社反馈的信息 /* 查询地接社的团列表 地接社sn @@ -84,6 +85,24 @@ class Feedback { }); } + //获取供应商反馈信息 + getFeedbackInfo(VEI_SN, GRI_SN) { + let url = `/service-Cooperate/Cooperate/getVEIFeedbackInfo`; + url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}`; + return fetch(config.HT_HOST + url) + .then(response => response.json()) + .then(json => { + console.log(json); + runInAction(() => { + this.feedbackInfo = json.Result; + }); + return json.Result; + }) + .catch(error => { + console.log("fetch data failed", error); + }); + } + //提交供应商反馈信息 postFeedbackInfo(VEI_SN, GRI_SN, EOI_SN, info_content) { let url = `/service-fileServer/FeedbackInfo`; @@ -92,18 +111,14 @@ class Feedback { formData.append("GRI_SN", GRI_SN); formData.append("EOI_SN", EOI_SN); formData.append("FeedbackInfo", info_content); - fetch(config.HT_HOST + url, { + return fetch(config.HT_HOST + url, { method: "POST", body: formData, - headers: new Headers({ - "Content-Type": "application/x-www-form-urlencoded", - }), }) .then(response => response.json()) .then(json => { console.log(json); - runInAction(() => { - }); + runInAction(() => {}); }) .catch(error => { console.log("fetch data failed", error); diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx index 01870aa..1643c90 100644 --- a/src/views/feedback/Detail.jsx +++ b/src/views/feedback/Detail.jsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { toJS, runInAction } from "mobx"; import moment from "moment"; -import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input } from "antd"; +import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input, App } from "antd"; import { useStore } from "../../stores/StoreContext.js"; import { PlusOutlined } from "@ant-design/icons"; const { Title, Text, Paragraph } = Typography; @@ -13,14 +13,19 @@ function Detail() { const navigate = useNavigate(); const { GRI_SN } = useParams(); const { feedbackStore, authStore } = useStore(); - const { feedbackRate, feedbackReview, feedbackImages } = feedbackStore; + const { feedbackRate, feedbackReview, feedbackImages, feedbackInfo } = feedbackStore; const [value, setValue] = useState(3); const desc = ["none", "Unacceptable", "Poor", "Fair", "Very Good", "Excellent"]; + const { notification } = App.useApp(); + const [form] = Form.useForm(); useEffect(() => { console.info("Detail.useEffect: " + GRI_SN); feedbackStore.getFeedbackDetail(authStore.login.travelAgencyId, GRI_SN); feedbackStore.getFeedbackImages(authStore.login.travelAgencyId, GRI_SN); + feedbackStore.getFeedbackInfo(authStore.login.travelAgencyId, GRI_SN).then(v => { + form.setFieldsValue({ info_content: vvvv.EEF_Content }); + }); }, [GRI_SN]); const HWO_Guide = feedbackRate && feedbackRate.HWO_Guide ? feedbackRate.HWO_Guide : 0; @@ -31,6 +36,7 @@ function Detail() { const OtherThoughts = feedbackRate && feedbackRate.OtherThoughts ? feedbackRate.OtherThoughts : ""; const PhotoPermission = feedbackRate && feedbackRate.PhotoPermission && feedbackRate.PhotoPermission == "YES" ? true : false; const ECI_Content = feedbackReview && feedbackReview.ECI_Content ? feedbackReview.ECI_Content : "None"; + const feedbackInfo_content = feedbackInfo && feedbackInfo.EEF_Content ? feedbackInfo.EEF_Content : ""; const fileList = toJS(feedbackImages); const handleChange = info => { @@ -53,6 +59,20 @@ function Detail() { return true; }; + const onFinish = values => { + console.log("Success:", values); + if (values) { + feedbackStore.postFeedbackInfo(feedbackInfo.EEF_VEI_SN, feedbackInfo.EEF_GRI_SN, feedbackInfo.EEF_EOI_SN, values.info_content).then(() => { + notification.success({ + message: `Notification`, + description: "提交成功", + placement: "top", + duration: 4, + }); + }); + } + }; + return ( @@ -148,7 +168,7 @@ function Detail() { -
+ 上传照片 - 地接社反馈信息 - + - From 92be4b6ab1bafd440535c04ab497148e47026188 Mon Sep 17 00:00:00 2001 From: YCC Date: Mon, 8 May 2023 16:34:09 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/feedback/Detail.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx index 1643c90..1ddd7a8 100644 --- a/src/views/feedback/Detail.jsx +++ b/src/views/feedback/Detail.jsx @@ -1,9 +1,8 @@ import { useParams, useNavigate } from "react-router-dom"; -import { useEffect, useState } from "react"; +import { useEffect } from "react"; import { observer } from "mobx-react"; import { toJS, runInAction } from "mobx"; -import moment from "moment"; -import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input, App } from "antd"; +import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Upload, Input, App } from "antd"; import { useStore } from "../../stores/StoreContext.js"; import { PlusOutlined } from "@ant-design/icons"; const { Title, Text, Paragraph } = Typography; @@ -14,7 +13,6 @@ function Detail() { const { GRI_SN } = useParams(); const { feedbackStore, authStore } = useStore(); const { feedbackRate, feedbackReview, feedbackImages, feedbackInfo } = feedbackStore; - const [value, setValue] = useState(3); const desc = ["none", "Unacceptable", "Poor", "Fair", "Very Good", "Excellent"]; const { notification } = App.useApp(); const [form] = Form.useForm(); @@ -36,7 +34,6 @@ function Detail() { const OtherThoughts = feedbackRate && feedbackRate.OtherThoughts ? feedbackRate.OtherThoughts : ""; const PhotoPermission = feedbackRate && feedbackRate.PhotoPermission && feedbackRate.PhotoPermission == "YES" ? true : false; const ECI_Content = feedbackReview && feedbackReview.ECI_Content ? feedbackReview.ECI_Content : "None"; - const feedbackInfo_content = feedbackInfo && feedbackInfo.EEF_Content ? feedbackInfo.EEF_Content : ""; const fileList = toJS(feedbackImages); const handleChange = info => { From c6c1f43d0284381bf7e1a7486e125a940216659b Mon Sep 17 00:00:00 2001 From: YCC Date: Mon, 8 May 2023 16:34:54 +0800 Subject: [PATCH 3/8] --- src/views/feedback/Detail.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx index 1ddd7a8..4a60ad1 100644 --- a/src/views/feedback/Detail.jsx +++ b/src/views/feedback/Detail.jsx @@ -22,7 +22,7 @@ function Detail() { feedbackStore.getFeedbackDetail(authStore.login.travelAgencyId, GRI_SN); feedbackStore.getFeedbackImages(authStore.login.travelAgencyId, GRI_SN); feedbackStore.getFeedbackInfo(authStore.login.travelAgencyId, GRI_SN).then(v => { - form.setFieldsValue({ info_content: vvvv.EEF_Content }); + form.setFieldsValue({ info_content: v.EEF_Content }); }); }, [GRI_SN]); From 044c5c3b8a42a5d7e40f45dc75027e13470d69f4 Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Mon, 8 May 2023 16:41:07 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E7=99=BB=E9=99=86=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=9B=A2=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 8 ++------ src/views/Login.jsx | 33 +++++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index 1ad725a..d8cac0a 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -19,12 +19,7 @@ class Auth { return fetchJSON(fetchUrl) .then(json => { if (json.errcode == 0) { - runInAction(() => { - this.login = { - userId: json.Result.WU_LMI_SN, - username: json.Result.WU_UserName, - } - }); + return json.Result.WU_LMI_SN; } else { throw new Error(json.errmsg + ': ' + json.errcode); } @@ -48,6 +43,7 @@ class Auth { cityId: json.Result.citysn } }); + return json.Result.LoginName; } else { throw new Error(json.errmsg + ': ' + json.errcode); } diff --git a/src/views/Login.jsx b/src/views/Login.jsx index 794b571..f28c6e2 100644 --- a/src/views/Login.jsx +++ b/src/views/Login.jsx @@ -1,20 +1,44 @@ +import { useNavigate } from "react-router-dom"; import { Button, Checkbox, Form, Input, Row, App } from 'antd'; import { useStore } from '@/stores/StoreContext.js'; function Login() { const { authStore } = useStore(); + const navigate = useNavigate(); const { notification } = App.useApp(); const onFinish = (values) => { - console.log('Success:', values); - authStore.valdateUserPassword(values.username, values.password); + authStore.valdateUserPassword(values.username, values.password) + .then((userId) => { + authStore.fetchUserDetail(userId) + .then((user) => { + // navigate(-1) is equivalent to hitting the back button. + navigate("/reservation/newest"); + }) + .catch(ex => { + notification.error({ + message: `Notification`, + description: ex.message, + placement: 'top', + duration: 4, + }); + }); + }) + .catch(ex => { + notification.error({ + message: `Notification`, + description: ex.message, + placement: 'top', + duration: 4, + }); + }); }; const onFinishFailed = (errorInfo) => { console.log('Failed:', errorInfo); }; - + return ( - - Remember me - Date: Tue, 9 May 2023 10:14:02 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 + src/stores/Reservation.js | 4 +- src/views/App.jsx | 4 +- src/views/Login.jsx | 3 +- src/views/account/ChangePassword.jsx | 126 +++++++++++++++++++++++++++ src/views/reservation/Newest.jsx | 4 - 6 files changed, 133 insertions(+), 10 deletions(-) create mode 100644 src/views/account/ChangePassword.jsx diff --git a/src/main.jsx b/src/main.jsx index e41d24e..9d03202 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -18,6 +18,7 @@ import ReservationNewest from "@/views/reservation/Newest"; import ReservationDetail from "@/views/reservation/Detail"; import ReservationPrint from "@/views/reservation/Print"; import ReservationNameCard from "@/views/reservation/NameCard"; +import ChangePassword from "@/views/account/ChangePassword"; import FeedbackIndex from "@/views/feedback/Index"; import FeedbackDetail from "@/views/feedback/Detail"; import NoticeIndex from "@/views/notice/Index"; @@ -45,6 +46,7 @@ const router = createBrowserRouter([ { path: "reservation/:reservationId", element: }, { path: "reservation/:reservationId/print", element: }, { path: "reservation/:reservationId/name-card", element: }, + { path: "account/change-password", element: }, { path: "feedback", element: }, { path: "feedback/:GRI_SN", element: }, { path: "notice", element: }, diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 7c02b8d..4f5081a 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -113,8 +113,8 @@ class Reservation { let formData = new FormData(); formData.append('GRI_SN', this.selectedReservation.reservationId); formData.append('VEI_SN', this.root.authStore.login.travelAgencyId); - formData.append('TGI_SN', cityId); - formData.append('CII_SN', guideId); + formData.append('TGI_SN', guideId); + formData.append('CII_SN', cityId); formData.append('GetDate', this.selectedReservation.reservationDate); formData.append('LMI_SN', this.root.authStore.login.userId); const postUrl = HT_HOST + '/service-cusservice/PTAddGuide'; diff --git a/src/views/App.jsx b/src/views/App.jsx index ff1765d..0737f51 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -11,9 +11,7 @@ const { Header, Content, Footer } = Layout; const items = [ { label: ( - - Profile - + Change password ), key: "0", }, diff --git a/src/views/Login.jsx b/src/views/Login.jsx index f28c6e2..c76a5a7 100644 --- a/src/views/Login.jsx +++ b/src/views/Login.jsx @@ -4,9 +4,10 @@ import { useStore } from '@/stores/StoreContext.js'; function Login() { + const { authStore } = useStore(); - const navigate = useNavigate(); const { notification } = App.useApp(); + const navigate = useNavigate(); const onFinish = (values) => { authStore.valdateUserPassword(values.username, values.password) diff --git a/src/views/account/ChangePassword.jsx b/src/views/account/ChangePassword.jsx new file mode 100644 index 0000000..84de94a --- /dev/null +++ b/src/views/account/ChangePassword.jsx @@ -0,0 +1,126 @@ +import { useNavigate } from "react-router-dom"; +import { Button, Checkbox, Form, Input, Row, Typography, App } from 'antd'; +import { useStore } from '@/stores/StoreContext.js'; + +const { Title } = Typography; + +function ChangePassword() { + + const { authStore } = useStore(); + const { notification } = App.useApp(); + const navigate = useNavigate(); + + const onFinish = (values) => { + authStore.valdateUserPassword(values.username, values.password) + .then((userId) => { + authStore.fetchUserDetail(userId) + .then((user) => { + // navigate(-1) is equivalent to hitting the back button. + navigate("/reservation/newest"); + }) + .catch(ex => { + notification.error({ + message: `Notification`, + description: ex.message, + placement: 'top', + duration: 4, + }); + }); + }) + .catch(ex => { + notification.error({ + message: `Notification`, + description: ex.message, + placement: 'top', + duration: 4, + }); + }); + }; + + const onFinishFailed = (errorInfo) => { + console.log('Failed:', errorInfo); + }; + + return ( + + Change your password + + + + + + + + + + + + + + + + + + + ); +} + +export default ChangePassword; \ No newline at end of file diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index 4fcfa87..368fbc4 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -72,10 +72,6 @@ function Newest() { placeholder="Select a guide" optionFilterProp="children" onChange={(guideId) => { - console.log(`selected:`); - console.log(guideId); - console.log(`city:`); - console.log(city); reservationStore.setupCityGuide(city.cityId, guideId); }} onSearch={(value) => { From ae4600bb948221ec7a573a65098b7693af48120d Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Tue, 9 May 2023 14:26:04 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 17 ++++++ src/views/Login.jsx | 6 ++- src/views/account/ChangePassword.jsx | 78 +++++++++++----------------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index d8cac0a..2ca2fd1 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -50,6 +50,23 @@ class Auth { }); } + changeUserPassword(password, newPassword) { + const fetchUrl = prepareUrl(HT_HOST + '/service-Cooperate/Cooperate/SetPassword') + .append('UserID', this.login.userId) + .append('password', password) + .append('NewPassword', newPassword) + .build(); + + return fetchJSON(fetchUrl) + .then(json => { + if (json.errcode == 0) { + console.info(json); + } else { + throw new Error(json.errmsg + ': ' + json.errcode); + } + }); + } + login = { userId: 1, username: 'Vu Xuan Giang', diff --git a/src/views/Login.jsx b/src/views/Login.jsx index c76a5a7..095ff0a 100644 --- a/src/views/Login.jsx +++ b/src/views/Login.jsx @@ -8,6 +8,7 @@ function Login() { const { authStore } = useStore(); const { notification } = App.useApp(); const navigate = useNavigate(); + const [form] = Form.useForm(); const onFinish = (values) => { authStore.valdateUserPassword(values.username, values.password) @@ -44,6 +45,9 @@ function Login() {
- diff --git a/src/views/account/ChangePassword.jsx b/src/views/account/ChangePassword.jsx index 84de94a..f22420a 100644 --- a/src/views/account/ChangePassword.jsx +++ b/src/views/account/ChangePassword.jsx @@ -1,5 +1,4 @@ -import { useNavigate } from "react-router-dom"; -import { Button, Checkbox, Form, Input, Row, Typography, App } from 'antd'; +import { Button, Space, Form, Input, Row, Typography, App } from 'antd'; import { useStore } from '@/stores/StoreContext.js'; const { Title } = Typography; @@ -8,29 +7,23 @@ function ChangePassword() { const { authStore } = useStore(); const { notification } = App.useApp(); - const navigate = useNavigate(); + const [form] = Form.useForm(); const onFinish = (values) => { - authStore.valdateUserPassword(values.username, values.password) - .then((userId) => { - authStore.fetchUserDetail(userId) - .then((user) => { - // navigate(-1) is equivalent to hitting the back button. - navigate("/reservation/newest"); - }) - .catch(ex => { - notification.error({ - message: `Notification`, - description: ex.message, - placement: 'top', - duration: 4, - }); - }); + console.info(values); + authStore.changeUserPassword(values.currentPassword, values.newPassword) + .then(() => { + notification.success({ + message: `Notification`, + description: 'Your password has been successfully updated.', + placement: 'top', + duration: 4, + }); }) - .catch(ex => { + .catch(() => { notification.error({ message: `Notification`, - description: ex.message, + description: 'Failed to change password. Please try again.', placement: 'top', duration: 4, }); @@ -39,36 +32,32 @@ function ChangePassword() { const onFinishFailed = (errorInfo) => { console.log('Failed:', errorInfo); + // form.resetFields(); }; return ( - - Change your password + <> + + Change your password @@ -76,7 +65,7 @@ function ChangePassword() { - + + - - + + ); } From cdf75c92c3c223780a7b6444e5ea8437adfa1a26 Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Tue, 9 May 2023 15:19:34 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 ++ src/views/App.jsx | 5 ++--- src/views/account/ChangePassword.jsx | 3 +-- src/views/account/Profile.jsx | 27 +++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/views/account/Profile.jsx diff --git a/src/main.jsx b/src/main.jsx index 9d03202..286cc6d 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -19,6 +19,7 @@ import ReservationDetail from "@/views/reservation/Detail"; import ReservationPrint from "@/views/reservation/Print"; import ReservationNameCard from "@/views/reservation/NameCard"; import ChangePassword from "@/views/account/ChangePassword"; +import AccountProfile from "@/views/account/Profile"; import FeedbackIndex from "@/views/feedback/Index"; import FeedbackDetail from "@/views/feedback/Detail"; import NoticeIndex from "@/views/notice/Index"; @@ -47,6 +48,7 @@ const router = createBrowserRouter([ { path: "reservation/:reservationId/print", element: }, { path: "reservation/:reservationId/name-card", element: }, { path: "account/change-password", element: }, + { path: "account/profile", element: }, { path: "feedback", element: }, { path: "feedback/:GRI_SN", element: }, { path: "notice", element: }, diff --git a/src/views/App.jsx b/src/views/App.jsx index 0737f51..4f1a1c1 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -17,9 +17,8 @@ const items = [ }, { label: ( - - Privacy - + + Profile ), key: "1", }, diff --git a/src/views/account/ChangePassword.jsx b/src/views/account/ChangePassword.jsx index f22420a..fe76a61 100644 --- a/src/views/account/ChangePassword.jsx +++ b/src/views/account/ChangePassword.jsx @@ -10,7 +10,6 @@ function ChangePassword() { const [form] = Form.useForm(); const onFinish = (values) => { - console.info(values); authStore.changeUserPassword(values.currentPassword, values.newPassword) .then(() => { notification.success({ @@ -50,7 +49,7 @@ function ChangePassword() { onFinishFailed={onFinishFailed} autoComplete="off" > - Change your password + Change your password + + + Bruce Li + Tel:029-85360679 Mobile:13991970308/13310981198 + lizhi@citsxa.com + + XIAN CITS + + + +
+ ); +} + +export default Profile; \ No newline at end of file From 8b6ba283200288a2091be8bd243cf63288752da4 Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Tue, 9 May 2023 15:49:44 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 4 ++++ src/views/App.jsx | 17 ++++------------- src/views/account/Profile.jsx | 16 ++++++---------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index 2ca2fd1..a8d14e7 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -40,6 +40,8 @@ class Auth { username: json.Result.LoginName, travelAgencyId: json.Result.LMI_VEI_SN, travelAgencyName: json.Result.VName, + telephone: json.Result.LkPhone, + emailAddress: json.Result.LMI_listmail, cityId: json.Result.citysn } }); @@ -72,6 +74,8 @@ class Auth { username: 'Vu Xuan Giang', travelAgencyId: 32531, //30008供应商id对应HT的VEI_SN travelAgencyName: 'ANP', + telephone: '000', + emailAddress: 'abc@123.com', cityId: 0 } } diff --git a/src/views/App.jsx b/src/views/App.jsx index 4f1a1c1..e64af33 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -10,27 +10,18 @@ import { useStore } from "@/stores/StoreContext.js"; const { Header, Content, Footer } = Layout; const items = [ { - label: ( - Change password - ), + label: (Change password), key: "0", }, { - label: ( - - Profile - ), + label: (Profile), key: "1", }, { type: "divider", }, { - label: ( - - Logout - - ), + label: (Logout), key: "3", }, ]; @@ -69,7 +60,7 @@ function App() { Reservation }, { key: "/feedback", label: Feedback }, diff --git a/src/views/account/Profile.jsx b/src/views/account/Profile.jsx index 89900c2..81366b6 100644 --- a/src/views/account/Profile.jsx +++ b/src/views/account/Profile.jsx @@ -1,23 +1,19 @@ -import { Descriptions, Space, Form, Col, Row, Typography, App } from 'antd'; +import { Descriptions, Col, Row } from 'antd'; import { useStore } from '@/stores/StoreContext.js'; -const { Title } = Typography; - function Profile() { const { authStore } = useStore(); - const { notification } = App.useApp(); + const { login } = authStore; return ( - Bruce Li - Tel:029-85360679 Mobile:13991970308/13310981198 - lizhi@citsxa.com - - XIAN CITS - + {login.username} + {login.telephone} + {login.emailAddress} + {login.travelAgencyName}