Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-mall
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-mall
Commits
2c74a842
Commit
2c74a842
authored
Jul 28, 2021
by
ganke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决srm 加工物流的bug修复
parent
a923f562
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
261 additions
and
230 deletions
+261
-230
config.ssr.js
apps/logistics/config/config.ssr.js
+2
-2
page.ts
apps/logistics/src/app/controller/page.ts
+24
-38
interface.ts
apps/logistics/src/interface.ts
+2
-1
api.ts
apps/logistics/src/service/api.ts
+18
-1
index.tsx
apps/logistics/web/components/Album/index.tsx
+16
-13
index.tsx
apps/logistics/web/components/CompanyTitle/index.tsx
+7
-6
index.tsx
apps/logistics/web/page/aboutUs/index.tsx
+53
-41
config.ssr.js
apps/manufacture/config/config.ssr.js
+2
-2
page.ts
apps/manufacture/src/app/controller/page.ts
+13
-39
interface.ts
apps/manufacture/src/interface.ts
+1
-0
api.ts
apps/manufacture/src/service/api.ts
+18
-1
index.tsx
apps/manufacture/web/components/Album/index.tsx
+15
-12
index.tsx
apps/manufacture/web/components/CompanyTitle/index.tsx
+50
-47
index.tsx
apps/manufacture/web/page/aboutUs/index.tsx
+16
-6
configuration.ts
apps/srm/src/configuration.ts
+17
-17
index.less
apps/srm/web/components/Category/index.less
+1
-1
index.less
apps/srm/web/components/ShopNav/index.less
+1
-3
changePackage.js
changePackage.js
+5
-0
No files found.
apps/logistics/config/config.ssr.js
View file @
2c74a842
...
...
@@ -15,14 +15,14 @@ module.exports = {
exact
:
true
,
Component
:
()
=>
(
require
(
'@/page/aboutUs'
).
default
),
controller
:
'page'
,
handler
:
'
index
'
handler
:
'
aboutUs
'
},
{
path
:
'/searchResult'
,
exact
:
true
,
Component
:
()
=>
(
require
(
'@/page/searchResult'
).
default
),
controller
:
'page'
,
handler
:
'
index
'
handler
:
'
searchResult
'
}
],
baseDir
:
resolvePath
(
'../../../'
),
...
...
apps/logistics/src/app/controller/page.ts
View file @
2c74a842
...
...
@@ -43,51 +43,26 @@ export class Page {
this
.
ctx
.
logger
.
error
(
`Page Controller renderToStream Error`
,
error
)
}
}
}
@
Provide
()
@
Controller
(
'/user'
)
export
class
User
{
@
Inject
()
ctx
:
Context
@
Get
(
'/'
)
async
index
()
{
try
{
const
authCookie
=
this
.
ctx
.
cookies
.
get
(
'AUTH'
,
{
signed
:
false
})
const
authRolesCookie
=
this
.
ctx
.
cookies
.
get
(
'AUTH_ROLES'
,
{
signed
:
false
})
// Page为webpack打包的chunkName,项目默认的entry为Page
this
.
ctx
.
type
=
'text/html'
this
.
ctx
.
status
=
200
// this.ctx.getUserInfo = await this.service.getUserInfo(authCookie) // 将service挂载到上下文对象
this
.
ctx
.
authCookie
=
authCookie
this
.
ctx
.
authRolesCookie
=
authRolesCookie
const
keyword
=
'瓴犀平台'
const
description
=
'瓴犀平台'
const
title
=
'瓴犀平台'
const
themeName
=
'theme-mall-science'
const
config
=
Object
.
assign
(
this
.
ctx
.
app
.
config
,
ssrConfig
,
{
keyword
,
description
,
title
,
themeName
})
// let authInfo = {}
// if (authString) {
// authInfo = Base64.decode(authString)
// }
const
stream
=
await
renderToStream
(
this
.
ctx
,
config
)
this
.
ctx
.
body
=
stream
}
catch
(
error
)
{
this
.
ctx
.
logger
.
error
(
`Page Controller renderToStream Error`
,
error
)
}
}
@
Get
(
'/aboutUs/:id'
)
async
aboutUs
()
{
try
{
this
.
ctx
.
type
=
'text/html'
this
.
ctx
.
status
=
200
cons
t
keyword
=
'关于我们'
cons
t
description
=
'关于我们'
cons
t
title
=
`关于我们`
le
t
keyword
=
'关于我们'
le
t
description
=
'关于我们'
le
t
title
=
`关于我们`
const
themeName
=
'theme-mall-science'
const
{
id
}
=
this
.
ctx
.
params
if
(
id
)
{
const
{
shopInfo
}
=
await
this
.
service
.
getShopInfo
(
id
)
console
.
log
(
shopInfo
);
if
(
shopInfo
&&
shopInfo
.
aboutSeo
)
{
title
=
shopInfo
.
aboutSeo
.
title
keyword
=
shopInfo
.
aboutSeo
.
keywords
description
=
shopInfo
.
aboutSeo
.
description
}
}
const
config
=
Object
.
assign
(
this
.
ctx
.
app
.
config
,
ssrConfig
,
{
keyword
,
description
,
title
,
themeName
})
const
stream
=
await
renderToStream
(
this
.
ctx
,
config
)
this
.
ctx
.
body
=
stream
...
...
@@ -114,3 +89,14 @@ export class User {
}
}
@
Provide
()
@
Controller
(
'/user'
)
export
class
User
{
@
Inject
()
ctx
:
Context
}
apps/logistics/src/interface.ts
View file @
2c74a842
...
...
@@ -17,5 +17,6 @@ export interface IApiService {
[
x
:
string
]:
any
;
index
():
Promise
<
IApiResult
>
,
getUserInfo
(
auth
:
string
):
Promise
<
{
userInfo
:
any
}
>
,
getPlatfromSeo
():
Promise
<
PlatformSelApiResult
>
getPlatfromSeo
():
Promise
<
PlatformSelApiResult
>
,
getShopInfo
(
shopId
:
number
):
Promise
<
any
>
,
}
apps/logistics/src/service/api.ts
View file @
2c74a842
...
...
@@ -43,7 +43,7 @@ export class ApiService implements IApiService {
})
}
/**
* 获取
资讯
首页seo信息
* 获取
物流
首页seo信息
*/
async
getPlatfromSeo
():
Promise
<
PlatformSelApiResult
>
{
const
result
=
await
this
.
ctx
.
curl
(
`
${
this
.
ctx
.
app
.
config
.
baseApi
}
/manage/seo/byType`
,
{
...
...
@@ -57,4 +57,21 @@ export class ApiService implements IApiService {
seoInfo
:
result
.
data
.
data
})
}
/**
*
* @param id
* 获取商店信息
*/
async
getShopInfo
(
id
:
number
):
Promise
<
any
>
{
const
result
=
await
this
.
ctx
.
curl
(
`
${
this
.
ctx
.
app
.
config
.
baseApi
}
/template/web/memberLogisticsWeb/memberLogisticsMain`
,
{
method
:
'GET'
,
data
:
{
id
,
},
dataType
:
'json'
})
return
Promise
.
resolve
({
shopInfo
:
result
.
data
.
data
})
}
}
apps/logistics/web/components/Album/index.tsx
View file @
2c74a842
...
...
@@ -10,20 +10,23 @@ interface Props {
}
function
Album
(
props
:
Props
)
{
const
{
albumTitle
,
albumImg
}
=
props
const
{
albumTitle
,
albumImg
}
=
props
return
(
<
ul
className=
{
styles
[
'album-main'
]
}
>
<
li
className=
{
styles
[
'album-title'
]
}
>
{
albumTitle
}
</
li
>
<
li
className=
{
styles
[
'album-img-warp'
]
}
>
{
albumImg
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
<
img
width=
{
item
.
width
?
item
.
width
:
''
}
height=
{
item
.
height
?
item
.
height
:
''
}
className=
{
styles
[
'album-img-item'
]
}
src=
{
item
.
url
}
alt=
""
key=
{
index
+
albumTitle
}
/>
})
}
</
li
>
</
ul
>
albumImg
.
length
>
0
?
<
ul
className=
{
styles
[
'album-main'
]
}
>
<
li
className=
{
styles
[
'album-title'
]
}
>
{
albumTitle
}
</
li
>
<
li
className=
{
styles
[
'album-img-warp'
]
}
>
{
albumImg
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
<
img
width=
{
item
.
width
?
item
.
width
:
''
}
height=
{
item
.
height
?
item
.
height
:
''
}
className=
{
styles
[
'album-img-item'
]
}
src=
{
item
.
url
}
alt=
""
key=
{
index
+
albumTitle
}
/>
})
}
</
li
>
</
ul
>
:
<
div
></
div
>
)
}
...
...
apps/logistics/web/components/CompanyTitle/index.tsx
View file @
2c74a842
...
...
@@ -34,7 +34,6 @@ function CompanyTitle(props: Props) {
const
[
MemberMessage
,
setMemberMessage
]
=
useState
<
any
>
({});
/**
* 是否会员
*/
...
...
@@ -43,7 +42,6 @@ function CompanyTitle(props: Props) {
upperMemberId
:
memberId
,
upperRoleId
:
roleId
,
}
console
.
log
(
obj
);
if
(
!
memberId
)
{
return
;
}
...
...
@@ -82,10 +80,13 @@ function CompanyTitle(props: Props) {
{
userInfo
&&
<
li
className=
{
styles
[
'company-right'
]
}
>
<
Button
style=
{
{
marginRight
:
'16px'
}
}
onClick=
{
fnChangeStatusNew
}
>
{
collectStatus
?
"取消收藏"
:
'加入收藏'
}
</
Button
>
{
userInfo
.
memberId
!==
memberId
&&
userInfo
.
memberRoleId
!==
roleId
&&
<
Button
style=
{
{
marginRight
:
'16px'
}
}
onClick=
{
fnChangeStatusNew
}
>
{
collectStatus
?
"取消收藏"
:
'加入收藏'
}
</
Button
>
}
{
MemberMessage
&&
MemberMessage
.
show
&&
<>
...
...
apps/logistics/web/page/aboutUs/index.tsx
View file @
2c74a842
...
...
@@ -27,7 +27,7 @@ const mockData: MockData = {
interface
Props
{
newsDetail
:
string
,
userInfo
:
any
userInfo
:
any
}
const
{
Link
}
=
Anchor
;
const
briefListDesc
=
[
...
...
@@ -39,12 +39,12 @@ const briefListDesc = [
const
News
:
SFC
<
Props
>
=
(
props
:
any
)
=>
{
const
[
mewssage
,
setMessage
]
=
useState
<
any
>
(
'10'
);
const
[
briefList
,
setBriefList
]
=
useState
<
any
>
(
briefListDesc
);
const
[
HonorPics
,
setHonorPics
]
=
useState
<
any
>
([]);
const
[
companyPics
,
setCompanyPics
]
=
useState
<
any
>
([]);
const
[
ismember
,
setIsMember
]
=
useState
(
false
);
const
[
ismember
,
setIsMember
]
=
useState
(
false
);
const
{
id
}
=
props
.
match
?.
params
||
{}
const
{
userInfo
}
=
props
;
...
...
@@ -58,10 +58,10 @@ const News: SFC<Props> = (props: any) => {
setMessage
(
messageDesc
)
briefList
[
0
].
secondTitle
=
messageDesc
.
areas
;
// 地区
briefList
[
1
].
secondTitle
=
integrationTime
(
messageDesc
.
createTime
,
'YMD'
);
// 成立年份
briefList
[
1
].
secondTitle
=
integrationTime
(
messageDesc
.
createTime
,
'YMD'
);
// 成立年份
setBriefList
([...
briefList
])
try
{
const
honorPicsDescArr
=
messageDesc
.
honorPics
.
map
((
item
:
any
)
=>
{
const
honorPicsDescArr
=
messageDesc
.
honorPics
.
map
((
item
:
any
)
=>
{
let
obj
=
{
url
:
item
,
width
:
'238px'
,
...
...
@@ -75,7 +75,7 @@ const News: SFC<Props> = (props: any) => {
}
try
{
const
companyPicsDescArr
=
messageDesc
.
companyPics
.
map
((
item
:
any
)
=>
{
const
companyPicsDescArr
=
messageDesc
.
companyPics
.
map
((
item
:
any
)
=>
{
let
obj
=
{
url
:
item
,
width
:
'238px'
,
...
...
@@ -89,38 +89,39 @@ const News: SFC<Props> = (props: any) => {
}
})
}
const
fnGetUserStatus
=
()
=>
{
if
(
!
mewssage
.
memberId
){
const
fnGetUserStatus
=
()
=>
{
if
(
!
mewssage
.
memberId
)
{
return
;
}
let
obj
=
{
memberId
:
mewssage
.
memberId
,
roleId
:
mewssage
.
roleId
,
}
PublicApi
.
getMemberMainpageUpperInquiry
(
obj
).
then
((
res
)
=>
{
console
.
log
(
res
);
setIsMember
(
res
.
data
)
let
obj
=
{
memberId
:
mewssage
.
memberId
,
roleId
:
mewssage
.
roleId
,
}
PublicApi
.
getMemberMainpageUpperInquiry
(
obj
).
then
((
res
)
=>
{
console
.
log
(
res
);
setIsMember
(
res
.
data
)
})
}
}
/**
* 修改收藏
*/
const
fnChangeStatus
=
()
=>
{
const
fnChangeStatus
=
()
=>
{
const
obj
=
{
id
:
mewssage
.
id
,
status
:
mewssage
.
collectStatus
?
false
:
true
id
:
mewssage
.
id
,
status
:
mewssage
.
collectStatus
?
false
:
true
}
PublicApi
.
postTemplateWebMemberLogisticsWebCollect
(
obj
).
then
((
res
:
any
)
=>
{
console
.
log
(
res
);
fnGetMessage
();
PublicApi
.
postTemplateWebMemberLogisticsWebCollect
(
obj
).
then
((
res
:
any
)
=>
{
console
.
log
(
res
);
fnGetMessage
();
})
}
}
useEffect
(()
=>
{
fnGetMessage
();
console
.
log
(
'111'
)
},
[])
useEffect
(()
=>
{
console
.
log
(
mewssage
);
fnGetUserStatus
();
},
[
mewssage
])
...
...
@@ -129,7 +130,7 @@ const News: SFC<Props> = (props: any) => {
<
div
className=
{
styles
[
'about-main'
]
}
>
<
div
className=
{
styles
[
'login-main'
]
}
>
<
div
className=
{
styles
[
'login-warp'
]
}
>
<
a
href=
"/"
style=
{
{
display
:
'inlineBlock'
}
}
>
<
a
href=
"/"
style=
{
{
display
:
'inlineBlock'
}
}
>
<
img
src=
{
logo
}
alt=
""
/>
</
a
>
</
div
>
...
...
@@ -143,14 +144,25 @@ const News: SFC<Props> = (props: any) => {
<
IconFont
type=
'icon-gongsi'
className=
{
styles
[
'detail-icon'
]
}
/>
公司简介
</
div
>
}
/>
<
Link
href=
"#album"
title=
{
<
div
>
<
PictureOutlined
translate=
{
0
}
className=
{
styles
[
'detail-icon'
]
}
/>
{
companyPics
.
length
>
0
?
<
Link
href=
"#album"
title=
{
<
div
>
<
PictureOutlined
translate=
{
0
}
className=
{
styles
[
'detail-icon'
]
}
/>
公司相册
</
div
>
}
/>
<
Link
href=
"#honor"
title=
{
<
div
>
<
IconFont
type=
'icon-badge'
className=
{
styles
[
'detail-icon'
]
}
/>
资质荣誉
</
div
>
}
/>
:
<
div
></
div
>
}
{
HonorPics
.
length
>
0
?
<
Link
href=
"#honor"
title=
{
<
div
>
<
IconFont
type=
'icon-badge'
className=
{
styles
[
'detail-icon'
]
}
/>
资质荣誉
</
div
>
}
/>
:
<
div
></
div
>
}
<
Link
href=
"#propaganda"
title=
{
<
div
>
<
IconFont
type=
'icon-data'
className=
{
styles
[
'detail-icon'
]
}
/>
宣传手册
...
...
@@ -159,19 +171,19 @@ const News: SFC<Props> = (props: any) => {
</
div
>
<
div
className=
{
styles
[
'detail-right'
]
}
>
<
CompanyTitle
companyName=
{
mewssage
.
memberName
}
companyNumber=
{
mewssage
.
creditPoint
}
companyTime=
{
mewssage
.
registerYears
}
identification=
{
mewssage
.
avgTradeCommentStar
}
fnChangeStatus=
{
fnChangeStatus
}
collectStatus=
{
mewssage
.
collectStatus
}
useStatus=
{
ismember
}
userInfo=
{
userInfo
}
memberId=
{
mewssage
?.
memberId
}
roleId=
{
mewssage
?.
roleId
}
companyName=
{
mewssage
.
memberName
}
companyNumber=
{
mewssage
.
creditPoint
}
companyTime=
{
mewssage
.
registerYears
}
identification=
{
mewssage
.
avgTradeCommentStar
}
fnChangeStatus=
{
fnChangeStatus
}
collectStatus=
{
mewssage
.
collectStatus
}
useStatus=
{
ismember
}
userInfo=
{
userInfo
}
memberId=
{
mewssage
?.
memberId
}
roleId=
{
mewssage
?.
roleId
}
></
CompanyTitle
>
<
div
className=
{
styles
[
'compont-bot'
]
}
id=
"brief"
>
<
CompanyBrief
<
CompanyBrief
companyBrief=
{
mewssage
.
describe
}
companyBusiness=
{
mewssage
.
mainBusiness
}
briefList=
{
briefList
}
...
...
apps/manufacture/config/config.ssr.js
View file @
2c74a842
...
...
@@ -15,14 +15,14 @@ module.exports = {
exact
:
true
,
Component
:
()
=>
(
require
(
'@/page/aboutUs'
).
default
),
controller
:
'page'
,
handler
:
'
index
'
handler
:
'
aboutUs
'
},
{
path
:
'/searchResult'
,
exact
:
true
,
Component
:
()
=>
(
require
(
'@/page/searchResult'
).
default
),
controller
:
'page'
,
handler
:
'
index
'
handler
:
'
searchResult
'
}
],
baseDir
:
resolvePath
(
'../../../'
),
...
...
apps/manufacture/src/app/controller/page.ts
View file @
2c74a842
...
...
@@ -43,51 +43,26 @@ export class Page {
this
.
ctx
.
logger
.
error
(
`Page Controller renderToStream Error`
,
error
)
}
}
}
@
Provide
()
@
Controller
(
'/user'
)
export
class
User
{
@
Inject
()
ctx
:
Context
@
Get
(
'/'
)
async
index
()
{
try
{
const
authCookie
=
this
.
ctx
.
cookies
.
get
(
'AUTH'
,
{
signed
:
false
})
const
authRolesCookie
=
this
.
ctx
.
cookies
.
get
(
'AUTH_ROLES'
,
{
signed
:
false
})
// Page为webpack打包的chunkName,项目默认的entry为Page
this
.
ctx
.
type
=
'text/html'
this
.
ctx
.
status
=
200
// this.ctx.getUserInfo = await this.service.getUserInfo(authCookie) // 将service挂载到上下文对象
this
.
ctx
.
authCookie
=
authCookie
this
.
ctx
.
authRolesCookie
=
authRolesCookie
const
keyword
=
'瓴犀平台'
const
description
=
'瓴犀平台'
const
title
=
'瓴犀平台'
const
themeName
=
'theme-mall-science'
const
config
=
Object
.
assign
(
this
.
ctx
.
app
.
config
,
ssrConfig
,
{
keyword
,
description
,
title
,
themeName
})
// let authInfo = {}
// if (authString) {
// authInfo = Base64.decode(authString)
// }
const
stream
=
await
renderToStream
(
this
.
ctx
,
config
)
this
.
ctx
.
body
=
stream
}
catch
(
error
)
{
this
.
ctx
.
logger
.
error
(
`Page Controller renderToStream Error`
,
error
)
}
}
@
Get
(
'/aboutUs/:id'
)
async
aboutUs
()
{
try
{
this
.
ctx
.
type
=
'text/html'
this
.
ctx
.
status
=
200
cons
t
keyword
=
'关于我们'
cons
t
description
=
'关于我们'
cons
t
title
=
`关于我们`
le
t
keyword
=
'关于我们'
le
t
description
=
'关于我们'
le
t
title
=
`关于我们`
const
themeName
=
'theme-mall-science'
const
{
id
}
=
this
.
ctx
.
params
if
(
id
)
{
const
{
shopInfo
}
=
await
this
.
service
.
getShopInfo
(
id
)
console
.
log
(
shopInfo
);
if
(
shopInfo
&&
shopInfo
.
aboutSeo
)
{
title
=
shopInfo
.
aboutSeo
.
title
keyword
=
shopInfo
.
aboutSeo
.
keywords
description
=
shopInfo
.
aboutSeo
.
description
}
}
const
config
=
Object
.
assign
(
this
.
ctx
.
app
.
config
,
ssrConfig
,
{
keyword
,
description
,
title
,
themeName
})
const
stream
=
await
renderToStream
(
this
.
ctx
,
config
)
this
.
ctx
.
body
=
stream
...
...
@@ -112,5 +87,4 @@ export class User {
this
.
ctx
.
logger
.
error
(
`Page Controller renderToStream Error`
,
error
)
}
}
}
apps/manufacture/src/interface.ts
View file @
2c74a842
...
...
@@ -17,4 +17,5 @@ export interface IApiService {
index
():
Promise
<
IApiResult
>
,
getUserInfo
(
auth
:
string
):
Promise
<
{
userInfo
:
any
}
>
,
getPlatfromSeo
():
Promise
<
PlatformSelApiResult
>
getShopInfo
(
shopId
:
number
):
Promise
<
any
>
,
}
apps/manufacture/src/service/api.ts
View file @
2c74a842
...
...
@@ -43,7 +43,7 @@ export class ApiService implements IApiService {
})
}
/**
* 获取
平台首页
seo信息
* 获取
加工
seo信息
*/
async
getPlatfromSeo
():
Promise
<
PlatformSelApiResult
>
{
const
result
=
await
this
.
ctx
.
curl
(
`
${
this
.
ctx
.
app
.
config
.
baseApi
}
/manage/seo/byType`
,
{
...
...
@@ -57,4 +57,21 @@ export class ApiService implements IApiService {
seoInfo
:
result
.
data
.
data
})
}
/**
*
* @param id
* 获取商店信息
*/
async
getShopInfo
(
id
:
number
):
Promise
<
any
>
{
const
result
=
await
this
.
ctx
.
curl
(
`
${
this
.
ctx
.
app
.
config
.
baseApi
}
/template/web/memberProcessWeb/memberProcessMain`
,
{
method
:
'GET'
,
data
:
{
id
,
},
dataType
:
'json'
})
return
Promise
.
resolve
({
shopInfo
:
result
.
data
.
data
})
}
}
apps/manufacture/web/components/Album/index.tsx
View file @
2c74a842
...
...
@@ -12,18 +12,21 @@ interface Props {
function
Album
(
props
:
Props
)
{
const
{
albumTitle
,
albumImg
}
=
props
return
(
<
ul
className=
{
styles
[
'album-main'
]
}
>
<
li
className=
{
styles
[
'album-title'
]
}
>
{
albumTitle
}
</
li
>
<
li
className=
{
styles
[
'album-img-warp'
]
}
>
{
albumImg
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
<
img
width=
{
item
.
width
?
item
.
width
:
''
}
height=
{
item
.
height
?
item
.
height
:
''
}
className=
{
styles
[
'album-img-item'
]
}
src=
{
item
.
url
}
alt=
""
key=
{
index
+
albumTitle
}
/>
})
}
</
li
>
</
ul
>
albumImg
.
length
>
0
?
<
ul
className=
{
styles
[
'album-main'
]
}
>
<
li
className=
{
styles
[
'album-title'
]
}
>
{
albumTitle
}
</
li
>
<
li
className=
{
styles
[
'album-img-warp'
]
}
>
{
albumImg
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
<
img
width=
{
item
.
width
?
item
.
width
:
''
}
height=
{
item
.
height
?
item
.
height
:
''
}
className=
{
styles
[
'album-img-item'
]
}
src=
{
item
.
url
}
alt=
""
key=
{
index
+
albumTitle
}
/>
})
}
</
li
>
</
ul
>
:
<
div
></
div
>
)
}
...
...
apps/manufacture/web/components/CompanyTitle/index.tsx
View file @
2c74a842
...
...
@@ -6,52 +6,52 @@ import Satisfaction from '../Satisfaction'
import
{
MEMBER_CENTER_URL
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
interface
Props
{
interface
Props
{
companyName
?:
string
,
companyNumber
?:
string
,
companyTime
?:
string
,
identification
?:
string
,
fnChangeStatus
?:
Function
,
collectStatus
?:
boolean
,
useStatus
?:
boolean
,
userInfo
:
any
,
fnChangeStatus
?:
Function
,
collectStatus
?:
boolean
,
useStatus
?:
boolean
,
userInfo
:
any
,
roleId
?:
string
,
memberId
?:
string
,
memberId
?:
string
,
}
function
CompanyTitle
(
props
:
Props
)
{
const
{
companyName
=
'-'
,
companyNumber
=
'-'
,
companyTime
=
'3'
,
identification
=
'4.9'
,
const
{
companyName
=
'-'
,
companyNumber
=
'-'
,
companyTime
=
'3'
,
identification
=
'4.9'
,
fnChangeStatus
,
collectStatus
=
false
,
collectStatus
=
false
,
userInfo
,
memberId
,
roleId
}
=
props
const
[
MemberMessage
,
setMemberMessage
]
=
useState
<
any
>
({});
const
[
MemberMessage
,
setMemberMessage
]
=
useState
<
any
>
({});
/**
* 是否会员
*/
const
fnGetUserStatus
=
()
=>
{
let
obj
=
{
upperMemberId
:
memberId
,
upperRoleId
:
roleId
,
}
if
(
!
memberId
){
return
;
const
fnGetUserStatus
=
()
=>
{
let
obj
=
{
upperMemberId
:
memberId
,
upperRoleId
:
roleId
,
}
if
(
!
memberId
)
{
return
;
}
PublicApi
.
getMemberAbilityInfoApplyCondition
(
obj
).
then
((
res
)
=>
{
setMemberMessage
(
res
.
data
)
})
}
PublicApi
.
getMemberAbilityInfoApplyCondition
(
obj
).
then
((
res
)
=>
{
setMemberMessage
(
res
.
data
)
})
}
const
fnChangeStatusNew
=
()
=>
{
if
(
fnChangeStatus
){
const
fnChangeStatusNew
=
()
=>
{
if
(
fnChangeStatus
)
{
fnChangeStatus
();
}
}
...
...
@@ -71,7 +71,7 @@ function CompanyTitle(props: Props) {
<
div
className=
{
styles
[
'company-time'
]
}
>
入驻
{
companyTime
+
1
}
年
</
div
>
<
div
style=
{
{
marginLeft
:
'8px'
}
}
>
<
div
style=
{
{
marginLeft
:
'8px'
}
}
>
<
Satisfaction
identification=
{
identification
}
hasKey=
{
false
}
></
Satisfaction
>
</
div
>
</
div
>
...
...
@@ -79,30 +79,33 @@ function CompanyTitle(props: Props) {
{
userInfo
&&
<
li
className=
{
styles
[
'company-right'
]
}
>
<
Button
style=
{
{
marginRight
:
'16px'
}
}
onClick=
{
fnChangeStatusNew
}
>
{
collectStatus
?
"取消收藏"
:
'加入收藏'
}
</
Button
>
{
MemberMessage
&&
MemberMessage
.
show
&&
<>
{
MemberMessage
&&
MemberMessage
.
status
==
2
?
<
Button
style=
{
{
background
:
'#00B37A'
,
color
:
'#ffffff'
}
}
>
立即派单
userInfo
.
memberId
!==
memberId
&&
userInfo
.
memberRoleId
!==
roleId
&&
<
Button
style=
{
{
marginRight
:
'16px'
}
}
onClick=
{
fnChangeStatusNew
}
>
{
collectStatus
?
"取消收藏"
:
'加入收藏'
}
</
Button
>
}
{
MemberMessage
&&
MemberMessage
.
show
&&
<>
{
MemberMessage
&&
MemberMessage
.
status
==
2
?
<
Button
style=
{
{
background
:
'#00B37A'
,
color
:
'#ffffff'
}
}
>
立即派单
<
a
href=
{
`${MEMBER_CENTER_URL}/memberCenter/handling/assign/tobeAddQuery`
}
className=
'all-jump'
></
a
>
</
Button
>
:
<
Button
style=
{
{
background
:
'#00B37A'
,
color
:
'#ffffff'
}
}
>
邀请成为会员
</
Button
>
:
<
Button
style=
{
{
background
:
'#00B37A'
,
color
:
'#ffffff'
}
}
>
邀请成为会员
<
a
href=
{
`${MEMBER_CENTER_URL}/memberCenter/memberAbility/profile/query`
}
className=
'all-jump'
></
a
>
</
Button
>
}
</
Button
>
}
</>
}
</
li
>
}
{
/* {
useStatus?
<li className={styles['company-tips-warp']}>
...
...
@@ -113,8 +116,8 @@ function CompanyTitle(props: Props) {
该公司还不是我的会员?
</li>
} */
}
</
ul
>
)
}
...
...
apps/manufacture/web/page/aboutUs/index.tsx
View file @
2c74a842
...
...
@@ -138,14 +138,24 @@ const News: SFC<Props> = (props: any) => {
<
IconFont
type=
'icon-gongsi'
className=
{
styles
[
'detail-icon'
]
}
/>
公司简介
</
div
>
}
/>
<
Link
href=
"#album"
title=
{
<
div
>
<
PictureOutlined
translate=
{
0
}
className=
{
styles
[
'detail-icon'
]
}
/>
{
companyPics
.
length
>
0
?
<
Link
href=
"#album"
title=
{
<
div
>
<
PictureOutlined
translate=
{
0
}
className=
{
styles
[
'detail-icon'
]
}
/>
公司相册
</
div
>
}
/>
<
Link
href=
"#honor"
title=
{
<
div
>
<
IconFont
type=
'icon-badge'
className=
{
styles
[
'detail-icon'
]
}
/>
资质荣誉
</
div
>
}
/>
:
<
div
></
div
>
}
{
HonorPics
.
length
>
0
?
<
Link
href=
"#honor"
title=
{
<
div
>
<
IconFont
type=
'icon-badge'
className=
{
styles
[
'detail-icon'
]
}
/>
资质荣誉
</
div
>
}
/>
:
<
div
></
div
>
}
<
Link
href=
"#propaganda"
title=
{
<
div
>
<
IconFont
type=
'icon-data'
className=
{
styles
[
'detail-icon'
]
}
/>
宣传手册
...
...
apps/srm/src/configuration.ts
View file @
2c74a842
//
import { App, Configuration } from '@midwayjs/decorator';
//
import { ILifeCycle } from '@midwayjs/core';
//
import { Application } from 'egg';
//
import { join } from 'path';
import
{
App
,
Configuration
}
from
'@midwayjs/decorator'
;
import
{
ILifeCycle
}
from
'@midwayjs/core'
;
import
{
Application
}
from
'egg'
;
import
{
join
}
from
'path'
;
//
@Configuration({
//
importConfigs: [
//
join(__dirname, './config/')
//
],
//
conflictCheck: true, // 开启命名冲突检查
//
})
//
export class ContainerLifeCycle implements ILifeCycle {
//
@App()
//
app: Application;
@
Configuration
({
importConfigs
:
[
join
(
__dirname
,
'./config/'
)
],
conflictCheck
:
true
,
// 开启命名冲突检查
})
export
class
ContainerLifeCycle
implements
ILifeCycle
{
@
App
()
app
:
Application
;
//
async onReady () {
//
console.log('onReady')
//
}
//
}
async
onReady
()
{
console
.
log
(
'onReady'
)
}
}
apps/srm/web/components/Category/index.less
View file @
2c74a842
...
...
@@ -121,7 +121,7 @@
top: 0;
left: 188px;
border: 2px solid var(--mall_main_color);
height:
512
px;
height:
400
px;
width: 750px;
background-color: #FFF;
z-index: 2;
...
...
apps/srm/web/components/ShopNav/index.less
View file @
2c74a842
...
...
@@ -35,9 +35,7 @@
font-size: 14px;
font-weight: 500;
&:hover {
color: #303133 !important;
}
}
&:hover{
background: #008C65;
...
...
changePackage.js
0 → 100644
View file @
2c74a842
var
fs
=
require
(
'fs'
);
fs
.
writeFileSync
(
'.package.json'
,
'utf8'
,
function
(
err
,
data
)
{
console
.
log
(
data
);
});
\ No newline at end of file
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