登陆改为 POST;调整供应商名字

release
Jimmy Liow 2 years ago
parent 6ded560e26
commit f2e5fb7e0e

@ -1,5 +1,5 @@
import { makeAutoObservable, runInAction } from "mobx";
import { fetchJSON } from '@/utils/request';
import { fetchJSON, postForm } from '@/utils/request';
import { HT_HOST } from "@/config";
import { prepareUrl } from '@/utils/commons';
@ -10,13 +10,13 @@ class Auth {
this.root = root;
}
valdateUserPassword(usr, pwd) {
const fetchUrl = prepareUrl(HT_HOST + '/service-Cooperate/Cooperate/Login')
.append('username', usr)
.append('password', pwd)
.build();
valdateUserPassword(usr, pwd) {
const formData = new FormData();
formData.append('username', usr);
formData.append('Password', pwd);
const postUrl = HT_HOST + '/service-CooperateSOA/Login';
return fetchJSON(fetchUrl)
return postForm(postUrl, formData)
.then(json => {
if (json.errcode == 0) {
return json.Result.WU_LMI_SN;
@ -27,7 +27,7 @@ class Auth {
}
fetchUserDetail(userId) {
const fetchUrl = prepareUrl(HT_HOST + '/service-Cooperate/Cooperate/GetLinkManInfo')
const fetchUrl = prepareUrl(HT_HOST + '/service-CooperateSOA/GetLinkManInfo')
.append('LMI_SN', userId)
.build();

@ -62,7 +62,7 @@ function App() {
}}>
<Header className="header" style={{ position: "sticky", top: 0, zIndex: 1, width: "100%" }}>
<Row gutter={{ md: 24 }} justify="end" align="middle">
<Col span={18}>
<Col span={16}>
<NavLink to="/">
<img src={AppLogo} className="logo" alt="App logo" />
</NavLink>
@ -78,7 +78,7 @@ function App() {
]}
/>
</Col>
<Col span={2}>
<Col span={4}>
<Title level={3} style={{color: 'white', marginBottom: '0', display: 'flex', justifyContent: 'end'}}>{authStore.login.travelAgencyName}</Title>
</Col>
<Col span={4}>

@ -93,7 +93,8 @@ function Newest() {
const arrivalDateFrom = dayjs().startOf("M");
const arrivalDateThru = dayjs().endOf("M");
const [arrivalDateRange, onDateRangeChange] = useState([arrivalDateFrom, arrivalDateThru]);
const [arrivalDateRange, onDateRangeChange] =
useState([arrivalDateFrom.format('YYYY-MM-DD'), arrivalDateThru.format('YYYY-MM-DD')]);
const [referenceNo, onNumberChange] = useState('');
const [dataLoading, setDataLoading] = useState(false);
const { notification } = App.useApp();
@ -106,21 +107,7 @@ function Newest() {
});
useEffect(() => {
setDataLoading(true);
reservationStore.fetchReservationList(
1, referenceNo,
arrivalDateRange[0].format('YYYY-MM-DD'), arrivalDateRange[1].format('YYYY-MM-DD'))
.catch(ex => {
notification.error({
message: `Notification`,
description: ex.message,
placement: 'top',
duration: 4,
});
})
.finally(() => {
setDataLoading(false);
});
onSearchClick();
}, []);
const showCityGuideModal = (reservation) => {

Loading…
Cancel
Save