Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
陈智峰
jinfa-admin
Commits
77e129ab
Commit
77e129ab
authored
Dec 28, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 修改平台后台全局配置引入
parent
2d424e9f
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
16 deletions
+16
-16
index.js
scripts/services/index.js
+1
-1
index.ts
src/constants/index.ts
+1
-1
Logo.tsx
src/layouts/components/Logo.tsx
+3
-3
index.tsx
...ng/marketingActivitiesManagement/activePage/add/index.tsx
+2
-2
index.tsx
...keting/waitAddedMarketing/components/shopLayout/index.tsx
+1
-1
index.tsx
...CouponUnsubmitted/components/CouponForm/effects/index.tsx
+1
-1
defaultMenu.ts
src/pages/pageCustomized/mallEdit/defaultMenu.ts
+1
-1
index.tsx
src/pages/pageCustomized/platformEdit/index.tsx
+1
-1
utils.ts
src/pages/pageCustomized/platformEdit/utils.ts
+1
-1
defaultMenu.ts
src/pages/pageCustomized/preview/mallPreview/defaultMenu.ts
+1
-1
index.tsx
src/pages/pageCustomized/preview/platformPreview/index.tsx
+1
-1
getDomain.ts
src/utils/getDomain.ts
+2
-2
No files found.
scripts/services/index.js
View file @
77e129ab
...
...
@@ -59,7 +59,7 @@ const serviceConfig = {
method
:
'get'
}
},
site
:
{
global
:
{
siteInfo
:
{
url
:
'/manage/paas/site/details'
,
params
:
{
...
...
src/constants/index.ts
View file @
77e129ab
...
...
@@ -14,7 +14,7 @@ export const REQUEST_HEADER = 'http://'
/**
* 顶域
*/
export
const
TOP_DOMAIN
=
process
.
env
.
NODE_ENV
!==
'development'
?
getTopDomainByHost
(
GlobalConfig
.
site
.
siteInfo
.
siteUrl
,
true
)
:
'lingxidev.com'
export
const
TOP_DOMAIN
=
process
.
env
.
NODE_ENV
!==
'development'
?
getTopDomainByHost
(
GlobalConfig
.
global
.
siteInfo
.
siteUrl
,
true
)
:
'lingxidev.com'
// export const TOP_DOMAIN = getTopDomainByHost(GlobalConfig.global.siteInfo.siteUrl)
/**
...
...
src/layouts/components/Logo.tsx
View file @
77e129ab
...
...
@@ -17,11 +17,11 @@ const logoEle: React.FC<{}> = () => {
<
p
>
{
showSmall
?
<
img
src=
{
GlobalConfig
.
site
.
siteInfo
.
logo
}
alt=
"瓴犀"
/>
<
img
src=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
alt=
"瓴犀"
/>
:
<>
<
img
src=
{
GlobalConfig
.
site
.
siteInfo
.
logo
}
alt=
"瓴犀"
/>
<
span
>
{
GlobalConfig
.
site
.
siteInfo
.
name
}
</
span
>
<
img
src=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
alt=
"瓴犀"
/>
<
span
>
{
GlobalConfig
.
global
.
siteInfo
.
name
}
</
span
>
</>
}
</
p
>
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/add/index.tsx
View file @
77e129ab
...
...
@@ -131,7 +131,7 @@ const Add = () => {
FormPath
.
setIn
(
state
,
'props.x-component-props'
,
{
environment
:
initialValue
.
environment
});
});
async
function
setMall
()
{
const
data
=
await
fetchMallData
({
environment
:
initialValue
.
environment
.
toString
(),
siteId
:
GlobalConfig
.
site
.
siteInfo
.
id
}
as
any
);
const
data
=
await
fetchMallData
({
environment
:
initialValue
.
environment
.
toString
(),
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
}
as
any
);
actions
.
setFieldState
(
"shopId"
,
state
=>
{
state
.
props
.
enum
=
data
;
});
...
...
@@ -200,7 +200,7 @@ const Add = () => {
FormPath
.
setIn
(
state
,
'props.x-props.hasFeedback'
,
true
);
});
linkage
.
loading
(
'shopId'
);
fetchMallData
({
environment
:
value
.
toString
(),
siteId
:
GlobalConfig
.
site
.
siteInfo
.
id
}
as
any
)
fetchMallData
({
environment
:
value
.
toString
(),
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
}
as
any
)
.
then
((
data
)
=>
{
formAction
.
setFieldValue
(
"shopId"
,
""
);
formAction
.
setFieldValue
(
'template'
,
{});
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/components/shopLayout/index.tsx
View file @
77e129ab
...
...
@@ -32,7 +32,7 @@ const ShopLayout: React.FC<shopListProps> = (props: any) => {
const
[
mallList
,
setMallList
]
=
useState
<
ShopItem
[]
>
([]);
useEffect
(()
=>
{
postManageWebShopWebAll
({
siteId
:
GlobalConfig
.
site
.
siteInfo
.
id
,
type
:
1
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
postManageWebShopWebAll
({
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
,
type
:
1
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
src/pages/marketingManage/platformCoupon/platformCouponUnsubmitted/components/CouponForm/effects/index.tsx
View file @
77e129ab
...
...
@@ -101,7 +101,7 @@ export const createEffects = (context, actions) => {
// 初始化 适用商城数据
onFieldMount$
(
'suitableMallTypes'
).
subscribe
(()
=>
{
postManageWebShopWebAll
({
siteId
:
GlobalConfig
.
site
.
siteInfo
.
id
,
siteId
:
GlobalConfig
.
global
.
siteInfo
.
id
,
type
:
1
,
// 企业商城
},
{
ctlType
:
'none'
,
...
...
src/pages/pageCustomized/mallEdit/defaultMenu.ts
View file @
77e129ab
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
INFO_CENTER_URL
}
from
'@/constants'
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
;
const
siteUrl
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
;
/**
* 请求头
...
...
src/pages/pageCustomized/platformEdit/index.tsx
View file @
77e129ab
...
...
@@ -280,7 +280,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
// 获取平台首页装修信息
if
(
!
isEmpty
(
designConfig
))
{
// 站点信息
const
siteInfo
=
GlobalConfig
.
site
.
siteInfo
;
const
siteInfo
=
GlobalConfig
.
global
.
siteInfo
;
// 平台首页显示站点logo
// headerConfig[headerConfig.key].props.logoUrl = siteInfo.logo
...
...
src/pages/pageCustomized/platformEdit/utils.ts
View file @
77e129ab
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
SRM_CENTER_URL
,
LOGISTICS_CENTER_URL
,
MANUFACTURE_CENTER_URL
,
INFO_CENTER_URL
}
from
"@/constants"
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
;
const
siteUrl
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
;
/**
* 请求头
...
...
src/pages/pageCustomized/preview/mallPreview/defaultMenu.ts
View file @
77e129ab
import
{
GlobalConfig
}
from
'@/global/config'
;
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
;
const
siteUrl
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
;
/**
* 请求头
...
...
src/pages/pageCustomized/preview/platformPreview/index.tsx
View file @
77e129ab
...
...
@@ -277,7 +277,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
// 获取平台首页装修信息
if
(
!
isEmpty
(
designConfig
))
{
// 站点信息
const
siteInfo
=
GlobalConfig
.
site
.
siteInfo
;
const
siteInfo
=
GlobalConfig
.
global
.
siteInfo
;
// 平台首页显示站点logo
// headerConfig[headerConfig.key].props.logoUrl = siteInfo.logo
...
...
src/utils/getDomain.ts
View file @
77e129ab
...
...
@@ -19,14 +19,14 @@ export const getTopDomainByHost = (url: string, isPort = false): string => {
* 获取顶域
*/
export
const
getTopDomain
=
(
env
:
string
=
'production'
,
defaultTopDomain
:
string
=
'lingxidev.com'
,
isPort
:
boolean
=
false
)
=>
{
return
env
!==
'development'
?
getTopDomainByHost
(
GlobalConfig
.
site
.
siteInfo
.
siteUrl
,
isPort
)
:
defaultTopDomain
return
env
!==
'development'
?
getTopDomainByHost
(
GlobalConfig
.
global
.
siteInfo
.
siteUrl
,
isPort
)
:
defaultTopDomain
}
/**
* 获取平台首页子域名
*/
const
getPlatformSubDomain
=
(
defaultSubDomian
:
string
)
=>
{
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
const
siteUrl
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
return
siteUrl
.
split
(
'.'
)[
0
]
||
defaultSubDomian
}
...
...
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