Commit 5f33098b authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 更改新增交易规则查询商城接口

parent 33e4d2ce
......@@ -18,7 +18,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import SelectProcesss from './selectProcesss'
import { usePaymentTable } from '../model/usePaymentTable'
import { help } from '../../common'
import { fectchShopListsSource } from '@/utils/type'
import { fectchShopListsSourceTradeRule } from '@/utils/type'
import { getProductCommodityCommonGetCommodityListBySeller, getProductSelectGetSelectBrand, getProductSelectGetSelectCustomerCategory } from '@/services/ProductV2Api'
import { getOrderTradeProcessGet, getOrderTradeProcessProductPage } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
......@@ -382,7 +382,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}}
effects={($, { setFieldState, setFieldValue }) => {
$('onFormMount').subscribe(async () => {
const data = await fectchShopListsSource()
const data = await fectchShopListsSourceTradeRule()
if(data && data.length) {
setFieldState('shopIds', state => {
state.props["x-component-props"].dataSource = data.sort((a, b)=>a.type-b.type)
......
import { GlobalConfig } from '@/global/config';
import { postManageWebShopWebAllShop } from '@/services/ManageV2Api';
import { postManageWebShopWebAll, postManageWebShopWebAllShop } from '@/services/ManageV2Api';
export function isString(str: any):str is string {
return typeof str === 'string'
......@@ -43,6 +43,18 @@ interface getShopListsParmasProps {
*/
export const fectchShopListsSource = async (params?: getShopListsParmasProps) => {
if (postManageWebShopWebAllShop) {
const { data } = await postManageWebShopWebAll({ ...params, siteId: GlobalConfig.global.siteInfo.id }, { ctlType: 'none' })
return data
}
}
/**
* 同上 仅限交规规则模块适用
* @param params 接口参数
*/
export const fectchShopListsSourceTradeRule = async (params?: getShopListsParmasProps) => {
if (postManageWebShopWebAllShop) {
const { data } = await postManageWebShopWebAllShop({ ...params, siteId: GlobalConfig.global.siteInfo.id }, { ctlType: 'none' })
return data
}
......
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