Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
4c131090
Commit
4c131090
authored
Jul 23, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改global获取渠道商城信息的问题
parent
a3e8af6b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
90 deletions
+13
-90
index.ts
config/routes/index.ts
+8
-8
app.tsx
src/app.tsx
+1
-60
index.ts
src/global/config/index.ts
+2
-21
index.tsx
...ges/transaction/dealAbility/inquiryOffer/detail/index.tsx
+2
-1
No files found.
config/routes/index.ts
View file @
4c131090
...
@@ -30,10 +30,10 @@ const memberCenterRoute = {
...
@@ -30,10 +30,10 @@ const memberCenterRoute = {
path
:
'/memberCenter'
,
path
:
'/memberCenter'
,
redirect
:
'/memberCenter/home'
,
redirect
:
'/memberCenter/home'
,
},
},
{
//
{
path
:
'/memberCenter/shopAbility'
,
//
path: '/memberCenter/shopAbility',
redirect
:
'/memberCenter/shopAbility/infoManage'
,
//
redirect: '/memberCenter/shopAbility/infoManage',
},
//
},
// {
// {
// path: '/memberCenter/logisticsAbility',
// path: '/memberCenter/logisticsAbility',
// redirect: '/memberCenter/logisticsAbility/infoManage',
// redirect: '/memberCenter/logisticsAbility/infoManage',
...
@@ -46,10 +46,10 @@ const memberCenterRoute = {
...
@@ -46,10 +46,10 @@ const memberCenterRoute = {
// path: '/memberCenter/procurementAbility',
// path: '/memberCenter/procurementAbility',
// redirect: '/memberCenter/procurementAbility/purchasDoor/purchasInfo',
// redirect: '/memberCenter/procurementAbility/purchasDoor/purchasInfo',
// },
// },
{
//
{
path
:
'/memberCenter/channelAbility'
,
//
path: '/memberCenter/channelAbility',
redirect
:
'/memberCenter/channelAbility/infoManage'
,
//
redirect: '/memberCenter/channelAbility/infoManage',
},
//
},
// 当注册的会员审核不通过时, 可以修改个人信息, 这里任何人都有权限
// 当注册的会员审核不通过时, 可以修改个人信息, 这里任何人都有权限
{
{
path
:
`/memberCenter/editMySelf`
,
path
:
`/memberCenter/editMySelf`
,
...
...
src/app.tsx
View file @
4c131090
import
{
IRoutes
}
from
'.'
;
import
{
IRoutes
}
from
'.'
;
import
{
history
,
Redirect
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
React
from
'react'
import
React
from
'react'
import
MobxProvider
from
'./store'
import
MobxProvider
from
'./store'
import
'@/global/styles/reset.less'
;
// 重置antd样式
import
'@/global/styles/reset.less'
;
// 重置antd样式
...
@@ -13,7 +13,6 @@ import { getRouters, getAuth, asyncRouter, setAuth, setRouters, removeAuth, remo
...
@@ -13,7 +13,6 @@ import { getRouters, getAuth, asyncRouter, setAuth, setRouters, removeAuth, remo
import
{
PublicApi
}
from
'./services/api'
;
import
{
PublicApi
}
from
'./services/api'
;
// 全局注册虚拟组件
// 全局注册虚拟组件
import
'@/components/NiceForm/public'
import
'@/components/NiceForm/public'
import
{
GlobalConfig
}
from
'@/global/config'
;
import
LRU
from
'@/utils/lru'
;
import
LRU
from
'@/utils/lru'
;
const
recent
=
new
LRU
(
6
);
const
recent
=
new
LRU
(
6
);
...
@@ -28,64 +27,6 @@ const userLoginLists = [
...
@@ -28,64 +27,6 @@ const userLoginLists = [
'/user/agreement'
'/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[] = []
// let routeAuthUrls: any[] = []
// 路由白名单
// 路由白名单
const
whiteLists
=
[
const
whiteLists
=
[
...
...
src/global/config/index.ts
View file @
4c131090
...
@@ -14,27 +14,8 @@ interface NewRootObject extends RootObject {
...
@@ -14,27 +14,8 @@ interface NewRootObject extends RootObject {
ichannelRootRoute
:
string
;
ichannelRootRoute
:
string
;
}
}
export
const
checkUrl
=
(
url
,
defaultUrl
)
=>
{
const
channelRootRoute
=
'channel'
if
(
url
&&
typeof
url
===
'string'
)
{
const
ichannelRootRoute
=
'ichannel'
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
)
SELF_CONFIG
.
channelRootRoute
=
channelRootRoute
// 渠道商城路由根路径
SELF_CONFIG
.
channelRootRoute
=
channelRootRoute
// 渠道商城路由根路径
SELF_CONFIG
.
ichannelRootRoute
=
ichannelRootRoute
// 渠道自有商城路由根路径
SELF_CONFIG
.
ichannelRootRoute
=
ichannelRootRoute
// 渠道自有商城路由根路径
...
...
src/pages/transaction/dealAbility/inquiryOffer/detail/index.tsx
View file @
4c131090
...
@@ -6,6 +6,7 @@ import PeripheralLayout from '@/pages/transaction/components/detailLayout';
...
@@ -6,6 +6,7 @@ import PeripheralLayout from '@/pages/transaction/components/detailLayout';
import
{
Context
}
from
'@/pages/transaction/components/detailLayout/components/context'
;
import
{
Context
}
from
'@/pages/transaction/components/detailLayout/components/context'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
ENTERPRISE_CENTER_URL
}
from
'@/constants'
import
{
CheckCircleOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
CheckCircleOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
EXTERNALSTATE_COLOR
,
INTERNALSTATE_COLOR
}
from
'@/pages/transaction/components/stateColor'
;
import
{
EXTERNALSTATE_COLOR
,
INTERNALSTATE_COLOR
}
from
'@/pages/transaction/components/stateColor'
;
import
ProgressLayout
from
'@/pages/transaction/components/detailLayout/components/progressLayout'
;
import
ProgressLayout
from
'@/pages/transaction/components/detailLayout/components/progressLayout'
;
...
@@ -145,7 +146,7 @@ const InquiryOfferDetail = () => {
...
@@ -145,7 +146,7 @@ const InquiryOfferDetail = () => {
dataIndex
:
'productId'
,
dataIndex
:
'productId'
,
render
:
(
productId
,
data
)
=>
(
render
:
(
productId
,
data
)
=>
(
<
Space
direction=
'vertical'
>
<
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
>
<
Typography
.
Text
>
{
data
.
productName
}
</
Typography
.
Text
>
</
Space
>
</
Space
>
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment