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
shenshaokai
jinfa-admin
Commits
4f7da662
Commit
4f7da662
authored
Jul 26, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
1957d17c
73b74488
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
107 deletions
+4
-107
index.ts
src/constants/index.ts
+0
-57
index.ts
src/global/config/index.ts
+2
-2
index.tsx
src/pages/rfq/details/index.tsx
+1
-2
index.tsx
src/pages/rfqOffer/details/index.tsx
+1
-2
index.ts
src/utils/index.ts
+0
-44
No files found.
src/constants/index.ts
View file @
4f7da662
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getTopDomainByHost
,
getDefaultEnterprise
,
getChannelInfo
,
getIChannelInfo
}
from
'@/utils'
export
const
NOT_CHANGE_VALUE
=
'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
?.
replace
(
'http|https'
,
'ws'
)
||
process
.
env
.
BACK_GATEWAY
?.
replace
(
'http|https'
,
'ws'
)
...
...
@@ -10,60 +7,6 @@ export const MEMBER_ROLE_LISTS = [
{
label
:
'服务提供者'
,
value
:
1
},
{
label
:
'服务消费者'
,
value
:
2
}
]
/**
* 请求头
*/
export
const
REQUEST_HEADER
=
'http://'
/**
* 顶域
*/
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)
/**
* 平台首页域名
*/
export
const
PLATFORM_DOMAIN
=
`
${
REQUEST_HEADER
}
www.
${
TOP_DOMAIN
}
`
/**
* 企业商城域名
*/
const
enterpriseInfo
=
getDefaultEnterprise
()
export
const
ENTERPRISE_CENTER_URL
=
`
${
REQUEST_HEADER
}${
enterpriseInfo
?
enterpriseInfo
.
url
:
'b2b'
}
.
${
TOP_DOMAIN
}
`
/**
* 渠道商城域名
*/
const
channelInfo
=
getChannelInfo
()
export
const
CHANNEL_CENTER_URL
=
`
${
REQUEST_HEADER
}${
channelInfo
?
channelInfo
.
url
:
'channel'
}
.
${
TOP_DOMAIN
}
`
/**
* 渠道自有商城域名
*/
const
iChannelInfo
=
getIChannelInfo
()
export
const
ICHANNEL_CENTER_URL
=
`
${
REQUEST_HEADER
}${
iChannelInfo
?
iChannelInfo
.
url
:
'ichannel'
}
.
${
TOP_DOMAIN
}
`
/**
* 行情资讯域名
*/
export
const
INFO_CENTER_URL
=
`
${
REQUEST_HEADER
}
info.
${
TOP_DOMAIN
}
`
/**
* 企业采购域名
*/
export
const
SRM_CENTER_URL
=
`
${
REQUEST_HEADER
}
srm.
${
TOP_DOMAIN
}
`
/**
* 物流服务域名
*/
export
const
LOGISTICS_CENTER_URL
=
`
${
REQUEST_HEADER
}
logistics.
${
TOP_DOMAIN
}
`
/**
* 加工服务域名
*/
export
const
MANUFACTURE_CENTER_URL
=
`
${
REQUEST_HEADER
}
manufacture.
${
TOP_DOMAIN
}
`
// 会员等级类型
export
const
MEMBER_GRADE_LISTS
=
[
...
...
src/global/config/index.ts
View file @
4f7da662
/**
*
*
* **********
* 脚本注入全局配置
*
*
* **********
*/
...
...
src/pages/rfq/details/index.tsx
View file @
4f7da662
...
...
@@ -13,7 +13,6 @@ import ListLayout from '@/components/DetailLayout/components/listLayout';
import
GeneralLayout
from
'@/components/DetailLayout/components/generalLayout'
;
import
RecordLyout
from
'@/components/DetailLayout/components/recordLyout'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
ENTERPRISE_CENTER_URL
}
from
'@/constants'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -139,7 +138,7 @@ const ProductInquiryDetail = () => {
const
handleJump
=
(
data
:
any
)
=>
{
console
.
log
(
data
)
window
.
open
(
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
data
.
memberId
}
_
${
data
.
memberRoleId
}
/inquiry/detail/
${
data
.
commodityId
}
`
)
window
.
open
(
`/shop/
${
data
.
memberId
}
_
${
data
.
memberRoleId
}
/inquiry/detail/
${
data
.
commodityId
}
`
)
}
const
columns
:
ColumnType
<
any
>
[]
=
[
...
...
src/pages/rfqOffer/details/index.tsx
View file @
4f7da662
...
...
@@ -12,7 +12,6 @@ import BasicLayout from '@/components/DetailLayout/components/basicLayout';
import
ListLayout
from
'@/components/DetailLayout/components/listLayout'
;
import
GeneralLayout
from
'@/components/DetailLayout/components/generalLayout'
;
import
RecordLyout
from
'@/components/DetailLayout/components/recordLyout'
;
import
{
ENTERPRISE_CENTER_URL
}
from
'@/constants'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -144,7 +143,7 @@ const ConfirmOfferDetail = () => {
dataIndex
:
'productId'
,
render
:
(
productId
,
data
)
=>
(
<
Space
direction=
'vertical'
>
<
Typography
.
Link
target=
"_blank"
href=
{
`
${ENTERPRISE_CENTER_URL}
/shop/${data.memberId}_${data.memberRoleId}/commodity/detail/${data.commodityId}`
}
>
{
productId
}
</
Typography
.
Link
>
<
Typography
.
Link
target=
"_blank"
href=
{
`/shop/${data.memberId}_${data.memberRoleId}/commodity/detail/${data.commodityId}`
}
>
{
productId
}
</
Typography
.
Link
>
<
Typography
.
Text
>
{
data
.
productName
}
</
Typography
.
Text
>
</
Space
>
)
...
...
src/utils/index.ts
View file @
4f7da662
import
deepClone
from
'clone'
import
moment
from
'moment'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
function
isArray
(
arr
:
any
)
{
return
Array
.
isArray
(
arr
)
...
...
@@ -365,49 +364,6 @@ export const coverColFiltersItem = (
}
};
export
const
getDefaultEnterprise
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
1
)
const
defaultMall
=
webMallList
.
filter
((
item
)
=>
item
.
isDefault
===
1
)[
0
]
let
result
:
any
=
undefined
if
(
defaultMall
)
{
result
=
defaultMall
}
else
{
if
(
webMallList
&&
webMallList
.
length
>
0
)
{
result
=
webMallList
[
0
]
}
}
return
result
}
export
const
getChannelInfo
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
3
)
return
webMallList
[
0
]
}
export
const
getIChannelInfo
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
4
)
return
webMallList
[
0
]
}
/**
* 根据host获取当前一级域名
* @param url 链接
* @returns
*/
export
const
getTopDomainByHost
=
(
url
:
string
,
isPort
=
false
):
string
=>
{
if
(
!
url
)
return
''
// 如果后缀带有端口号, 可通过第二个参数把端口去掉
const
splitUrl
=
url
.
replace
(
/
(
http|https
)\:\/\/
/
,
''
).
split
(
':'
)
if
(
splitUrl
.
length
>
1
&&
isPort
)
{
return
`
${
splitUrl
[
0
].
split
(
'.'
).
slice
(
-
2
).
join
(
'.'
)}
`
}
return
url
.
split
(
'.'
).
slice
(
-
2
).
join
(
'.'
)
}
export
default
{
isArray
,
isObject
,
...
...
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