Commit 4c131090 authored by GuanHua's avatar GuanHua

fix: 修改global获取渠道商城信息的问题

parent a3e8af6b
......@@ -30,10 +30,10 @@ const memberCenterRoute = {
path: '/memberCenter',
redirect: '/memberCenter/home',
},
{
path: '/memberCenter/shopAbility',
redirect: '/memberCenter/shopAbility/infoManage',
},
// {
// path: '/memberCenter/shopAbility',
// redirect: '/memberCenter/shopAbility/infoManage',
// },
// {
// path: '/memberCenter/logisticsAbility',
// redirect: '/memberCenter/logisticsAbility/infoManage',
......@@ -46,10 +46,10 @@ const memberCenterRoute = {
// path: '/memberCenter/procurementAbility',
// redirect: '/memberCenter/procurementAbility/purchasDoor/purchasInfo',
// },
{
path: '/memberCenter/channelAbility',
redirect: '/memberCenter/channelAbility/infoManage',
},
// {
// path: '/memberCenter/channelAbility',
// redirect: '/memberCenter/channelAbility/infoManage',
// },
// 当注册的会员审核不通过时, 可以修改个人信息, 这里任何人都有权限
{
path: `/memberCenter/editMySelf`,
......
import { IRoutes } from '.';
import { history, Redirect } from 'umi';
import { history } from 'umi';
import React from 'react'
import MobxProvider from './store'
import '@/global/styles/reset.less'; // 重置antd样式
......@@ -13,7 +13,6 @@ import { getRouters, getAuth, asyncRouter, setAuth, setRouters, removeAuth, remo
import { PublicApi } from './services/api';
// 全局注册虚拟组件
import '@/components/NiceForm/public'
import { GlobalConfig } from '@/global/config';
import LRU from '@/utils/lru';
const recent = new LRU(6);
......@@ -28,64 +27,6 @@ const userLoginLists = [
'/user/agreement'
]
const channelRootRoute = GlobalConfig.channelRootRoute // 渠道商城路由
const ichannelRootRoute = GlobalConfig.ichannelRootRoute // 渠道自有商城路由
// 商城相关路由
const mallLists = [
'/',
'/app/introduce',
'/commodity',
'/commodity/search',
'/commodity/detail',
'/purchaseOnline',
'/pointsMall',
'/shops',
'/infomation',
'/infomation/detail',
'/information/mobile/detail',
'/infomation/search',
'/purchaseOrder',
'/order',
'/pay',
'/pay/result',
'/shop',
'/shop/commodity',
'/shop/commodity/search',
'/shop/commodity/detail',
'/shop/pointsMall',
'/shop/infomation',
'/shop/infomation/search',
'/shop/infomation/detail',
'/shop/about',
`${channelRootRoute}`,
`${channelRootRoute}/commodity`,
`${channelRootRoute}/commodity/search`,
`${channelRootRoute}/commodity/detail`,
`${channelRootRoute}/pointsMall`,
`${channelRootRoute}/infomation`,
`${channelRootRoute}/infomation/detail`,
`${channelRootRoute}/infomation/search`,
`${channelRootRoute}/about`,
`${channelRootRoute}/purchaseOrder`,
`${channelRootRoute}/order`,
`${channelRootRoute}/pay`,
`${channelRootRoute}/pay/result`,
`${ichannelRootRoute}`,
`${ichannelRootRoute}/commodity`,
`${ichannelRootRoute}/commodity/search`,
`${ichannelRootRoute}/commodity/detail`,
`${ichannelRootRoute}/pointsMall`,
`${ichannelRootRoute}/infomation`,
`${ichannelRootRoute}/infomation/detail`,
`${ichannelRootRoute}/infomation/search`,
`${ichannelRootRoute}/about`,
`${ichannelRootRoute}/purchaseOrder`,
`${ichannelRootRoute}/order`,
`${ichannelRootRoute}/pay`,
`${ichannelRootRoute}/pay/result`,
]
// let routeAuthUrls: any[] = []
// 路由白名单
const whiteLists = [
......
......@@ -14,27 +14,8 @@ interface NewRootObject extends RootObject {
ichannelRootRoute: string;
}
export const checkUrl = (url, defaultUrl) => {
if (url && typeof url === 'string') {
if (url.indexOf('/') > -1) {
return url.replace('/', '').trim()
} else {
return `${url}`.trim()
}
} else {
return defaultUrl
}
}
const MALL_ROUTE_USE_CONFIG = process.env.USE_ROUTE_CONFIG || true
const webChannelInfo = SELF_CONFIG.web.shopInfo.filter(item => item.environment === 1 && item.type === 3)[0] // 渠道商城
const webIChannelInfo = SELF_CONFIG.web.shopInfo.filter(item => item.environment === 1 && item.type === 4)[0] // 渠道自有商城
const defaultChannelRoute = 'channel' // 默认渠道商城根路径
const defaultIChannelRoute = 'ichannel' // 默认渠道自有商城根路径
const channelRootRoute = checkUrl(webChannelInfo.url, defaultChannelRoute)
const ichannelRootRoute = checkUrl(webChannelInfo.url, defaultIChannelRoute)
const channelRootRoute = 'channel'
const ichannelRootRoute = 'ichannel'
SELF_CONFIG.channelRootRoute = channelRootRoute // 渠道商城路由根路径
SELF_CONFIG.ichannelRootRoute = ichannelRootRoute // 渠道自有商城路由根路径
......
......@@ -6,6 +6,7 @@ import PeripheralLayout from '@/pages/transaction/components/detailLayout';
import { Context } from '@/pages/transaction/components/detailLayout/components/context';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { ENTERPRISE_CENTER_URL } from '@/constants'
import { CheckCircleOutlined, LinkOutlined } from '@ant-design/icons';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
import ProgressLayout from '@/pages/transaction/components/detailLayout/components/progressLayout';
......@@ -145,7 +146,7 @@ const InquiryOfferDetail = () => {
dataIndex: 'productId',
render: (productId, data) => (
<Space direction='vertical'>
<Typography.Link target="_blank" href={`/shop/commodity/detail?id=${productId}&type=2&shopId=${btoa(JSON.stringify({ roleId: data.memberRoleId, memberId: data.memberId }))}`}>{productId}</Typography.Link>
<Typography.Link target="_blank" href={`${ENTERPRISE_CENTER_URL}/shop/${data.memberId}_${data.memberRoleId}/commodity/detail/${productId}`}>{productId}</Typography.Link>
<Typography.Text>{data.productName}</Typography.Text>
</Space>
)
......
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