Commit 29ae6e89 authored by GuanHua's avatar GuanHua

feat:修改店铺信息查询商城的请求接口

parent 8a3968c6
......@@ -16,12 +16,13 @@ import { isEmpty } from '@formily/antd/esm/shared'
interface ShopInfoPropsType {
SiteStore: {
siteUrl: string
siteUrl: string;
siteId: number;
}
}
const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const { siteUrl } = props.SiteStore
const { siteUrl, siteId } = props.SiteStore
const [formIsHalfFilledOut, setFormIsHalfFilledOut] = useState(false)
const [form] = Form.useForm()
const [allMallList, setAllMallList] = useState([])
......@@ -36,10 +37,13 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
fetchAllShop()
}, [])
// 根据站点获取商城信息
const fetchAllShop = () => {
PublicApi.getManageShopAll().then(res => {
setAllMallList(res.data)
//@ts-ignore
PublicApi.getManageShopFindShopsBySiteId({ siteId }).then(res => {
if (res.code === 1000) {
setAllMallList(res.data)
}
})
}
......
......@@ -2,7 +2,7 @@ import { action, computed, observable, runInAction } from 'mobx'
import { ISiteModule } from '@/module/siteModule';
class SiteStore implements ISiteModule {
@observable public siteId: number = 255; // 站点id
@observable public siteId: number = 352; // 站点id
@observable public siteUrl: string = 'https://127.0.0.1:4379'; // 站点域名
}
......
......@@ -62,7 +62,7 @@ const baseRequest = extend({
timeout: 30 * 1000,
headers: defaultHeaders,
credentials: 'include', // 默认请求是否带上cookie
errorHandler
// errorHandler
});
// 请求拦截器
......
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