Commit e612cce5 authored by 卢均锐's avatar 卢均锐

chore: 修改components & layouts & app.tsx 文件夹下的接口引入

parent 2f4e5281
...@@ -9,7 +9,7 @@ import '@/global/styles/global.less'; // 导入全局样式 ...@@ -9,7 +9,7 @@ import '@/global/styles/global.less'; // 导入全局样式
import 'antd/dist/antd.less'; import 'antd/dist/antd.less';
import { setup } from '@formily/antd-components'; import { setup } from '@formily/antd-components';
import { getAuth, setAuth, setRouters, removeAuth, removeRouters, asyncRouter, getRouters } from './utils/auth'; import { getAuth, setAuth, setRouters, removeAuth, removeRouters, asyncRouter, getRouters } from './utils/auth';
import { PublicApi } from './services/api'; import { getMemberManageLoginReget } from './services/MemberV2Api';
import { isDev } from './constants'; import { isDev } from './constants';
import queryString from 'query-string'; import queryString from 'query-string';
// 全局注册虚拟组件 // 全局注册虚拟组件
...@@ -63,7 +63,7 @@ export function patchRoutes({ routes }: IRoutes) { ...@@ -63,7 +63,7 @@ export function patchRoutes({ routes }: IRoutes) {
export function render(oldRender:Function) { export function render(oldRender:Function) {
const authInfo = getAuth() const authInfo = getAuth()
if (authInfo) { if (authInfo) {
PublicApi.getMemberManageLoginReget().then(res => { getMemberManageLoginReget().then(res => {
const { data, code } = res const { data, code } = res
if (code === 1000) { if (code === 1000) {
setAuth(data) setAuth(data)
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
import { UploadOutlined, LinkOutlined, DeleteOutlined } from '@ant-design/icons'; import { UploadOutlined, LinkOutlined, DeleteOutlined } from '@ant-design/icons';
import { UPLOAD_TYPE } from '@/constants' import { UPLOAD_TYPE } from '@/constants'
import style from './index.less' import style from './index.less'
import { PublicApi } from '@/services/api'; import { postPurchaseConfirmQuotedPriceSubmitContrastPrice } from '@/services/PurchaseApi';
import { BidDetailContext } from '../components/context'; import { BidDetailContext } from '../components/context';
import { isEmpty, sumBy } from 'lodash'; import { isEmpty, sumBy } from 'lodash';
...@@ -123,7 +123,7 @@ const BidModal: React.FC<IProps> = (props: any) => { ...@@ -123,7 +123,7 @@ const BidModal: React.FC<IProps> = (props: any) => {
return return
} }
} }
PublicApi.postPurchaseConfirmQuotedPriceSubmitContrastPrice(params).then(res => { postPurchaseConfirmQuotedPriceSubmitContrastPrice(params).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
handleConfirm(); handleConfirm();
} }
......
This diff is collapsed.
...@@ -3,7 +3,6 @@ import { Input, Space, Select, Button } from 'antd'; ...@@ -3,7 +3,6 @@ import { Input, Space, Select, Button } from 'antd';
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'; import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons';
import { useFieldState, FormPath, FormEffectHooks, useFormEffects } from '@formily/antd'; import { useFieldState, FormPath, FormEffectHooks, useFormEffects } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { PublicApi } from '@/services/api';
/** /**
* 筛选项 搜索和远程数据结合的select * 筛选项 搜索和远程数据结合的select
......
...@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react'; ...@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import { Modal, Result, Progress, Button } from 'antd'; import { Modal, Result, Progress, Button } from 'antd';
import { FileExcelOutlined } from '@ant-design/icons'; import { FileExcelOutlined } from '@ant-design/icons';
import styles from './index.less'; import styles from './index.less';
import { PublicApi } from '@/services/api';
interface Uploader { interface Uploader {
visibleModal: boolean; visibleModal: boolean;
......
...@@ -3,7 +3,8 @@ import { Link, history } from 'umi'; ...@@ -3,7 +3,8 @@ import { Link, history } from 'umi';
import { Menu, Dropdown, List, Avatar, Modal, Badge } from 'antd'; import { Menu, Dropdown, List, Avatar, Modal, Badge } from 'antd';
import { BellOutlined, CaretDownOutlined } from '@ant-design/icons'; import { BellOutlined, CaretDownOutlined } from '@ant-design/icons';
import { removeAuth, getAuth } from '@/utils/auth'; import { removeAuth, getAuth } from '@/utils/auth';
import { PublicApi } from '@/services/api'; import { postMemberManageSecurityPswUpdate } from '@/services/MemberApi';
import { getMessageMessagePlatformPage } from '@/services/MessageV2Api';
import moment from 'moment'; import moment from 'moment';
import msgSystem from '@/asserts/msg_system.png'; import msgSystem from '@/asserts/msg_system.png';
import msgPlatform from '@/asserts/msg_platform.png'; import msgPlatform from '@/asserts/msg_platform.png';
...@@ -36,7 +37,7 @@ const RightContent: React.FC<{}> = (props) => { ...@@ -36,7 +37,7 @@ const RightContent: React.FC<{}> = (props) => {
const handleChangePwd = useCallback((value: any) => { const handleChangePwd = useCallback((value: any) => {
setConfirmLoading(true); setConfirmLoading(true);
PublicApi.postMemberManageSecurityPswUpdate({ postMemberManageSecurityPswUpdate({
oldPassword: encryptedByAES(value.oldPwd), oldPassword: encryptedByAES(value.oldPwd),
newPassword: encryptedByAES(value.newPwd) newPassword: encryptedByAES(value.newPwd)
}).then((data) => { }).then((data) => {
...@@ -65,7 +66,7 @@ const RightContent: React.FC<{}> = (props) => { ...@@ -65,7 +66,7 @@ const RightContent: React.FC<{}> = (props) => {
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
setMsgLoading(true); setMsgLoading(true);
PublicApi.getMessageMessagePlatformPage({ current: '1', pageSize: '4' }) getMessageMessagePlatformPage({ current: '1', pageSize: '4' })
.then((data) => { .then((data) => {
if (data.code === 1000) { if (data.code === 1000) {
setMsgLoading(false); setMsgLoading(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment