Commit b85b3c6e authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 系统设置接口引入方式修改

parent 4ca95e2c
......@@ -4,11 +4,11 @@ import { Button, message, Modal, Pagination } from 'antd'
import { StarFilled } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ShopCredit from '@/components/ShopCredit'
import { PublicApi } from '@/services/api'
import { numFormat } from '@/utils/numberFomat'
import moment from 'moment'
import { COMMODITY_TYPE, CHANNEL_CENTER_URL, ENTERPRISE_CENTER_URL } from '@/constants'
import styles from './index.less'
import { getSearchShopCommodityCollectGetCommodityCollectList, postSearchShopCommodityCollectChannelDeleteCommodityCollectById, postSearchShopCommodityCollectDeleteCommodityCollectById } from '@/services/SearchV2Api';
const Commodity: React.FC = () => {
const [list, setList] = useState([])
......@@ -29,7 +29,7 @@ const Commodity: React.FC = () => {
current,
pageSize,
}
PublicApi.getSearchShopCommodityCollectGetCommodityCollectList(params).then((res) => {
getSearchShopCommodityCollectGetCommodityCollectList(params).then((res) => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -122,9 +122,9 @@ const Commodity: React.FC = () => {
let postFn
if (detail.channelMemberId) {
postFn = PublicApi.postSearchShopCommodityCollectChannelDeleteCommodityCollectById
postFn = postSearchShopCommodityCollectChannelDeleteCommodityCollectById
} else {
postFn = PublicApi.postSearchShopCommodityCollectDeleteCommodityCollectById
postFn = postSearchShopCommodityCollectDeleteCommodityCollectById
}
postFn && postFn (param).then(res => {
......
......@@ -3,11 +3,11 @@ import cx from 'classnames'
import { Pagination, message, Modal } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StarFilled, EyeOutlined, ClockCircleOutlined } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import { numFormat } from '@/utils/numberFomat'
import { INFO_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getManageContentInformationCollectList, postManageContentInformationCollect } from '@/services/ManageV2Api';
const Information: React.FC = () => {
const [list, setList] = useState([])
......@@ -28,7 +28,7 @@ const Information: React.FC = () => {
pageSize
}
PublicApi.getManageContentInformationCollectList(param).then(res => {
getManageContentInformationCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -67,7 +67,7 @@ const Information: React.FC = () => {
informationId: detail.id,
status: false
}
PublicApi.postManageContentInformationCollect(param).then(res => {
postManageContentInformationCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectInformationList()
......
......@@ -3,10 +3,10 @@ import cx from 'classnames'
import { Pagination, message, Modal } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StarFilled } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import { LOGISTICS_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getTemplateWebMemberLogisticsWebCollectList, postTemplateWebMemberLogisticsWebCollect } from '@/services/TemplateV2Api';
const Logistics: React.FC = () => {
const [list, setList] = useState([])
......@@ -27,7 +27,7 @@ const Logistics: React.FC = () => {
pageSize
}
PublicApi.getTemplateWebMemberLogisticsWebCollectList(param).then(res => {
getTemplateWebMemberLogisticsWebCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -66,7 +66,7 @@ const Logistics: React.FC = () => {
id: detail.id,
status: false
}
PublicApi.postTemplateWebMemberLogisticsWebCollect(param).then(res => {
postTemplateWebMemberLogisticsWebCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectList()
......
......@@ -3,11 +3,11 @@ import cx from 'classnames'
import { Pagination, message, Modal } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StarFilled, EyeOutlined, ClockCircleOutlined } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import { numFormat } from '@/utils/numberFomat'
import { INFO_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getManageMemberInformationCollectList, postManageMemberInformationCollect } from '@/services/ManageV2Api';
const Information: React.FC = () => {
const [list, setList] = useState([])
......@@ -28,7 +28,7 @@ const Information: React.FC = () => {
pageSize
}
PublicApi.getManageMemberInformationCollectList(param).then(res => {
getManageMemberInformationCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -67,7 +67,7 @@ const Information: React.FC = () => {
informationId: detail.id,
status: false
}
PublicApi.postManageMemberInformationCollect(param).then(res => {
postManageMemberInformationCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectInformationList()
......
......@@ -3,10 +3,10 @@ import cx from 'classnames'
import { Pagination, message, Modal } from 'antd'
import { StarFilled } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { MANUFACTURE_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getTemplateWebMemberProcessWebCollectList, postTemplateWebMemberProcessWebCollect } from '@/services/TemplateV2Api'
const Process: React.FC = () => {
const [list, setList] = useState([])
......@@ -27,7 +27,7 @@ const Process: React.FC = () => {
pageSize
}
PublicApi.getTemplateWebMemberProcessWebCollectList(param).then(res => {
getTemplateWebMemberProcessWebCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -66,7 +66,7 @@ const Process: React.FC = () => {
id: detail.id,
status: false
}
PublicApi.postTemplateWebMemberProcessWebCollect(param).then(res => {
postTemplateWebMemberProcessWebCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectList()
......
......@@ -3,10 +3,10 @@ import cx from 'classnames'
import { Pagination, message, Modal } from 'antd'
import { StarFilled } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { SRM_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getTemplateWebMemberPurchaseWebCollectList, postTemplateWebMemberPurchaseWebCollect } from '@/services/TemplateV2Api'
const Purchase: React.FC = () => {
const [list, setList] = useState([])
......@@ -27,7 +27,7 @@ const Purchase: React.FC = () => {
pageSize
}
PublicApi.getTemplateWebMemberPurchaseWebCollectList(param).then(res => {
getTemplateWebMemberPurchaseWebCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -66,7 +66,7 @@ const Purchase: React.FC = () => {
id: detail.id,
status: false
}
PublicApi.postTemplateWebMemberPurchaseWebCollect(param).then(res => {
postTemplateWebMemberPurchaseWebCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectPurchaseList()
......
......@@ -5,10 +5,10 @@ import { StarFilled } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import ShopCredit from '@/components/ShopCredit'
import StarRate from '@/components/StarRate'
import { PublicApi } from '@/services/api'
import { ENTERPRISE_CENTER_URL } from '@/constants'
import moment from 'moment'
import styles from './index.less'
import { getTemplateWebMemberShopWebCollectList, postTemplateWebMemberShopWebCollect } from '@/services/TemplateV2Api'
const Shops: React.FC = () => {
const [list, setList] = useState([])
......@@ -29,7 +29,7 @@ const Shops: React.FC = () => {
pageSize
}
PublicApi.getTemplateWebMemberShopWebCollectList(param).then(res => {
getTemplateWebMemberShopWebCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
setTotalCount(res.data.totalCount)
......@@ -52,7 +52,7 @@ const Shops: React.FC = () => {
id: detail.id,
status: false
}
PublicApi.postTemplateWebMemberShopWebCollect(param).then(res => {
postTemplateWebMemberShopWebCollect(param).then(res => {
if (res.code === 1000) {
// fetchPurchaseList()
fetchCollectShopList()
......
import React, { useEffect, useState } from 'react';
import { Card, Row, Col, Button, Typography } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api';
import { getManageSecretKeyGetSecretKey } from '@/services/ManageV2Api';
const Key = () => {
const [key, setKey] = useState<string>('');
......@@ -29,7 +29,7 @@ const Key = () => {
setTimeout(countTime, 1000);
}
const getSecretKey = async () => {
await PublicApi.getManageSecretKeyGetSecretKey().then((res: any) => {
await getManageSecretKeyGetSecretKey().then((res: any) => {
if (res.code !== 1000) {
return
}
......
......@@ -4,12 +4,11 @@ import { Card, List, Avatar, Button } from 'antd';
import styles from './index.less'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api';
import moment from 'moment';
import msg_system from '@/assets/imgs/msg_system.png'
import msg_platform from '@/assets/imgs/msg_platform.png';
import { BookOutlined, ReadOutlined } from '@ant-design/icons';
import { GetMessageMessageMemberPageRequest } from '@/services/MessageV2Api';
import { getMessageMessageMemberPage, GetMessageMessageMemberPageRequest, postMessageMessageMemberRead, postMessageMessageMemberReadAll } from '@/services/MessageV2Api';
const Message: React.FC<{}> = () => {
const [dataSource, setDataSource] = useState<any>({totalCount: 0, data: []})
......@@ -24,7 +23,7 @@ const Message: React.FC<{}> = () => {
}, [])
const getList = useCallback(async (params: GetMessageMessageMemberPageRequest) => {
const { data, code } = await PublicApi.getMessageMessageMemberPage(params);
const { data, code } = await getMessageMessageMemberPage(params);
if(code === 1000) {
setDataSource(data)
}
......@@ -36,7 +35,7 @@ const Message: React.FC<{}> = () => {
}
const handleRead = async (id: number, url: string) => {
const { data, code } = await PublicApi.postMessageMessageMemberRead({id: id}, {ctlType: 'none'})
const { data, code } = await postMessageMessageMemberRead({id: id}, {ctlType: 'none'})
if(url) {
if(/http/.test(url)) {
location.href = url
......@@ -51,7 +50,7 @@ const Message: React.FC<{}> = () => {
}
}
const handleAllMessageRead = async () => {
const { data, code } = await PublicApi.postMessageMessageMemberReadAll()
const { data, code } = await postMessageMessageMemberReadAll()
if(code === 1000) {
getList({
current: pagination.current.toString(),
......
import React, {useState, useEffect} from 'react';
import { Button, Row, Col, Switch, Drawer, Card, InputNumber, Form, Space, TimePicker, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api';
import MellowCard from '@/components/MellowCard';
import cx from 'classnames'
import styles from './index.less'
......@@ -9,6 +8,8 @@ import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
import { configSourceData, IConfigSource } from './constant';
import { fectchShopListsSource } from '@/utils/type';
import moment from 'moment';
import { getOrderParamGetDeliveryTime, getOrderParamGetReceiverDay, postOrderParamUpdateAppointmentDay, postOrderParamUpdateDeliveryTime, postOrderParamUpdateReceiverDay, getOrderParamGetAppointmentDay } from '@/services/OrderNewV2Api';
import { getProductPriceCurveSetGetPriceCurveSetList, postProductPriceCurveSetSavePriceCurveSet } from '@/services/ProductV2Api';
const ParameterSetting: React.FC<{}> = () => {
......@@ -45,14 +46,14 @@ const ParameterSetting: React.FC<{}> = () => {
let fn = null;
if(autoReceiveVisible) {
// 自动确认收货
fn = PublicApi.getOrderParamGetReceiverDay
fn = getOrderParamGetReceiverDay
} else if(forcastTimeVisible) {
// 预约时长
fn = PublicApi.getOrderParamGetAppointmentDay
fn = getOrderParamGetAppointmentDay
} else if(expressTimeVisible) {
fn = PublicApi.getOrderParamGetDeliveryTime
fn = getOrderParamGetDeliveryTime
} else if(priceLineVisible) {
fn = PublicApi.getProductPriceCurveSetGetPriceCurveSetList
fn = getProductPriceCurveSetGetPriceCurveSetList
}
fn && fn().then(res => {
const { code, data } = res
......@@ -166,10 +167,10 @@ const ParameterSetting: React.FC<{}> = () => {
let codeNumber = null
setConfirmLoading(true)
if(type === 'autoReceive') {
const { code } = await PublicApi.postOrderParamUpdateReceiverDay([...shopLists])
const { code } = await postOrderParamUpdateReceiverDay([...shopLists])
codeNumber = code
} else if(type === 'forcastTime') {
const { code } = await PublicApi.postOrderParamUpdateAppointmentDay([...shopLists])
const { code } = await postOrderParamUpdateAppointmentDay([...shopLists])
codeNumber = code
} else if(type === 'timeLine') {
// 过滤开启不设置时间段的null值
......@@ -202,10 +203,10 @@ const ParameterSetting: React.FC<{}> = () => {
}
})
const { code } = await PublicApi.postOrderParamUpdateDeliveryTime(_prams)
const { code } = await postOrderParamUpdateDeliveryTime(_prams)
codeNumber = code
} else if(type === 'priceLine') {
const { code } = await PublicApi.postProductPriceCurveSetSavePriceCurveSet({priceCurveSetList : [...shopLists]})
const { code } = await postProductPriceCurveSetSavePriceCurveSet({priceCurveSetList : [...shopLists]})
codeNumber = code
}
setConfirmLoading(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