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
黄庭坚
jinfa-platform
Commits
1b926cde
Commit
1b926cde
authored
Dec 24, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改获取店铺信息接口
parent
bd6c9875
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
166 additions
and
163 deletions
+166
-163
index.less
src/pages/channel/channelInfo/index.less
+2
-3
index.tsx
src/pages/channel/channelInfo/index.tsx
+17
-17
index.tsx
src/pages/lxMall/components/ShopHeader/index.tsx
+6
-7
index.tsx
src/pages/lxMall/components/TopBar/index.tsx
+2
-3
LXChannelLayout.tsx
src/pages/lxMall/layouts/LXChannelLayout.tsx
+2
-2
LXIChannelLayout.tsx
src/pages/lxMall/layouts/LXIChannelLayout.tsx
+2
-2
LXShopLayout.tsx
src/pages/lxMall/layouts/LXShopLayout.tsx
+12
-5
index.less
src/pages/shop/shopInfo/index.less
+123
-124
index.tsx
src/pages/shop/shopInfo/index.tsx
+0
-0
No files found.
src/pages/channel/channelInfo/index.less
View file @
1b926cde
...
...
@@ -29,7 +29,7 @@
.img_list {
display: flex;
flex-wrap: wrap;
}
.shop_url {
...
...
@@ -120,4 +120,4 @@
}
}
}
}
\ No newline at end of file
}
src/pages/channel/channelInfo/index.tsx
View file @
1b926cde
...
...
@@ -328,7 +328,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
label=
{
<
RequireItem
label=
"公司简介"
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入公司简介"
}]
}
>
<
Input
.
TextArea
allowClear
rows=
{
5
}
className=
{
styles
.
form_item
}
placeholder=
"请输入公司简介"
maxLength=
{
200
}
/>
<
Input
.
TextArea
rows=
{
5
}
className=
{
styles
.
form_item
}
placeholder=
"请输入公司简介"
maxLength=
{
200
}
/>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
...
...
@@ -346,15 +346,15 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
fileMaxSize=
{
100
}
size=
"600x400"
onChange=
{
(
url
)
=>
handleAddworkshopPics
(
url
)
}
/>
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
fileMaxSize=
{
100
}
size=
"600x400"
onChange=
{
(
url
)
=>
handleAddworkshopPics
(
url
)
}
/>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
...
...
@@ -373,15 +373,15 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
fileMaxSize=
{
100
}
size=
"106x107"
onChange=
{
(
url
)
=>
handleAddhonorPics
(
url
)
}
/>
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
fileMaxSize=
{
100
}
size=
"106x107"
onChange=
{
(
url
)
=>
handleAddhonorPics
(
url
)
}
/>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
...
...
src/pages/lxMall/components/ShopHeader/index.tsx
View file @
1b926cde
...
...
@@ -25,7 +25,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
const
{
search
}
=
history
.
location
.
query
useEffect
(()
=>
{
if
(
!!
search
)
{
if
(
search
)
{
setSearchValue
(
search
)
}
else
{
setSearchValue
(
""
)
...
...
@@ -48,13 +48,12 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
const
applyFroVip
=
()
=>
{
if
(
shopInfo
)
{
le
t
param
=
{
cons
t
param
=
{
memberId
:
shopInfo
.
memberId
,
roleId
:
shopInfo
.
roleId
}
setApplyLoading
(
true
)
PublicApi
.
postMemberAbilityMallSubApply
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
}
setApplyLoading
(
false
)
}).
catch
(()
=>
{
setApplyLoading
(
false
)
...
...
@@ -63,8 +62,8 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
}
const
handleCollect
=
()
=>
{
le
t
status
=
!
collectState
le
t
param
=
{
cons
t
status
=
!
collectState
cons
t
param
=
{
shopId
:
shopInfo
.
id
,
status
}
...
...
@@ -101,7 +100,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
shop_header_info_content
}
>
<
div
className=
{
styles
.
shop_header_info_content_name
}
>
<
span
>
{
shopInfo
?.
company
}
</
span
>
<
span
>
{
shopInfo
?.
memberName
}
</
span
>
<
CaretDownOutlined
className=
{
styles
.
shop_header_info_content_icon
}
/>
</
div
>
<
div
className=
{
styles
.
shop_header_info_content_about
}
>
...
...
@@ -112,7 +111,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
shop_header_info_content_about_item
}
>
<
i
className=
{
styles
.
icon
}
><
img
src=
{
credit_icon
}
/></
i
>
<
span
>
{
20
0
}
</
span
>
<
span
>
{
shopInfo
?.
creditPoint
||
0
}
</
span
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/lxMall/components/TopBar/index.tsx
View file @
1b926cde
...
...
@@ -67,7 +67,7 @@ const TopBar: React.FC<TopBarPropsType> = (props) => {
{
userInfo
?
(
<
li
className=
{
cx
(
styles
.
topbar_menu_item
,
styles
.
username
)
}
>
<
span
className=
{
styles
.
username
}
>
{
userInfo
?.
name
}
</
span
>
<
Link
className=
{
styles
.
username
}
to=
"/memberCenter/home"
>
{
userInfo
?.
name
}
</
Link
>
<
CaretDownOutlined
className=
{
styles
.
arrow_icon
}
/>
<
div
className=
{
styles
.
userInfo_card_split
}
></
div
>
<
div
className=
{
styles
.
userInfo_card
}
>
...
...
@@ -134,4 +134,4 @@ const TopBar: React.FC<TopBarPropsType> = (props) => {
)
}
export
default
inject
(
'UserStore'
)(
observer
(
TopBar
))
\ No newline at end of file
export
default
inject
(
'UserStore'
)(
observer
(
TopBar
))
src/pages/lxMall/layouts/LXChannelLayout.tsx
View file @
1b926cde
...
...
@@ -85,11 +85,11 @@ const LXChannelLayout: React.FC<LXChannelLayoutPropsType> = (props) => {
<
Fragment
>
<
Helmet
>
{
shopInfo
?
<
title
>
{
shopInfo
.
company
}
</
title
>
:
null
shopInfo
?
<
title
>
{
shopInfo
.
memberName
}
</
title
>
:
null
}
</
Helmet
>
<
div
className=
{
styles
.
lxmall_page
}
>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
company
}
type=
{
LAYOUT_TYPE
.
channel
}
shopUrlParam=
{
channelId
}
/>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
memberName
}
type=
{
LAYOUT_TYPE
.
channel
}
shopUrlParam=
{
channelId
}
/>
<
div
className=
{
styles
.
content
}
>
{
!
menuRouter
?.
hideHeader
&&
(
...
...
src/pages/lxMall/layouts/LXIChannelLayout.tsx
View file @
1b926cde
...
...
@@ -85,11 +85,11 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => {
<
Fragment
>
<
Helmet
>
{
shopInfo
?
<
title
>
{
shopInfo
.
company
}
</
title
>
:
null
shopInfo
?
<
title
>
{
shopInfo
.
memberName
}
</
title
>
:
null
}
</
Helmet
>
<
div
className=
{
styles
.
lxmall_page
}
>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
company
}
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
memberName
}
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
<
div
className=
{
styles
.
content
}
>
{
!
menuRouter
?.
hideHeader
&&
(
...
...
src/pages/lxMall/layouts/LXShopLayout.tsx
View file @
1b926cde
...
...
@@ -64,10 +64,17 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
const
fetchShopInfo
=
(
memberId
,
roleId
,
storeId
)
=>
{
const
param
:
any
=
{
memberId
,
roleId
,
storeId
}
PublicApi
.
getTemplateShopFindShop
(
param
).
then
(
res
=>
{
let
getShopInfoFn
=
null
if
(
storeId
)
{
param
.
storeId
=
storeId
getShopInfoFn
=
PublicApi
.
getTemplateWebMemberShopWebMemberShopMain
}
else
if
(
roleId
)
{
param
.
roleId
=
roleId
getShopInfoFn
=
PublicApi
.
getTemplateWebMemberShopWebFindByMemberIdAndRoleId
}
console
.
log
(
param
,
"param"
)
getShopInfoFn
&&
getShopInfoFn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setShopInfo
(
res
.
data
)
}
...
...
@@ -107,7 +114,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
<
ShopHeader
logo=
{
mallInfo
.
logoUrl
}
shopId=
{
query
.
shopId
}
shopUrlParam=
{
shopId
}
shopInfo=
{
shopInfo
}
updateShopInfo=
{
()
=>
handleUpdate
()
}
/>
<
MainNav
menuData=
{
menuData
}
pathname=
{
location
.
pathname
}
type=
{
LAYOUT_TYPE
.
shop
}
shopId=
{
query
.
shopId
}
shopUrlParam=
{
shopId
}
/>
{
!
loading
?
shopInfo
?
shopInfo
.
status
===
1
?
children
&&
React
.
Children
.
map
(
children
,
(
child
:
any
)
=>
{
!
loading
?
shopInfo
?
children
&&
React
.
Children
.
map
(
children
,
(
child
:
any
)
=>
{
return
React
.
cloneElement
(
child
,
{
layoutType
:
LAYOUT_TYPE
.
shop
,
...
...
@@ -118,7 +125,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
updateShopInfo
:
()
=>
handleUpdate
()
},
);
})
:
<
SearchShopResult
search
=
{
shopInfo
.
company
}
/> : <SearchShopResult /
>
:
null
})
:
<
SearchShopResult
search
=
{
shopInfo
.
company
}
/> : <SearchShopResult /
>
}
</
div
>
<
Footer
/>
...
...
src/pages/shop/shopInfo/index.less
View file @
1b926cde
.shop_info {
background-color: #ffffff;
padding: 32px 24px;
border-radius: 8px;
.add_template_form {
:global {
.ant-form-item-label>label::after {
display: none;
}
}
}
.form_item {
width: 572px;
resize: none;
}
.form_item_wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
.size_require {
color: #C0C4CC;
}
}
.img_list {
display: flex;
}
.shop_url {
width: 572px;
color: #909399;
margin-top: 16px;
font-size: 12px;
display: flex;
&>label {
flex: 1;
width: 0;
display: block;
color: #303133;
margin-left: 8px;
margin-right: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy_icon {
cursor: pointer;
}
}
.upload_btn {
position: relative;
width: 104px;
height: 104px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
flex-direction: column;
background: rgba(250, 251, 252, 1);
border-radius: 2px;
border: 1px dashed rgba(223, 225, 230, 1);
cursor: pointer;
margin-right: 24px;
overflow: hidden;
margin-bottom: 12px;
&.upload {
border: 1px solid rgba(223, 225, 230, 1);
background: #ffffff;
}
.upload_img {
height: 100%;
width: 100%;
display: block;
margin: 0 auto;
background-size: auto 100%;
background-position: center center;
background-repeat: no-repeat;
}
&>img {
width: 100%;
height: 100%;
}
&.large {
width: 175px;
height: 120px;
}
&>p {
margin-top: 12px;
}
.delete_btn {
position: absolute;
width: 24px;
height: 24px;
border-radius: 4px;
background: rgba(0, 0, 0, 0.45);
top: 8px;
right: 8px;
color: #ffffff;
text-align: center;
line-height: 24px;
&:hover {
cursor: pointer;
opacity: .8;
}
}
}
}
\ No newline at end of file
.shop_info {
background-color: #ffffff;
padding: 32px 24px;
border-radius: 8px;
.add_template_form {
:global {
.ant-form-item-label>label::after {
display: none;
}
}
}
.form_item {
width: 572px;
resize: none;
}
.form_item_wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
.size_require {
color: #C0C4CC;
}
}
.img_list {
display: flex;
flex-wrap: wrap;
}
.shop_url {
width: 572px;
color: #909399;
margin-top: 16px;
font-size: 12px;
display: flex;
&>label {
flex: 1;
width: 0;
display: block;
color: #303133;
margin-left: 8px;
margin-right: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy_icon {
cursor: pointer;
}
}
.upload_btn {
position: relative;
width: 104px;
height: 104px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
flex-direction: column;
background: rgba(250, 251, 252, 1);
border-radius: 2px;
border: 1px dashed rgba(223, 225, 230, 1);
cursor: pointer;
margin-right: 24px;
overflow: hidden;
margin-bottom: 12px;
&.upload {
border: 1px solid rgba(223, 225, 230, 1);
background: #ffffff;
}
.upload_img {
height: 100%;
width: 100%;
display: block;
margin: 0 auto;
background-size: auto 100%;
background-position: center center;
background-repeat: no-repeat;
}
&>img {
width: 100%;
height: 100%;
}
&.large {
width: 175px;
height: 120px;
}
&>p {
margin-top: 12px;
}
.delete_btn {
position: absolute;
width: 24px;
height: 24px;
border-radius: 4px;
background: rgba(0, 0, 0, 0.45);
top: 8px;
right: 8px;
color: #ffffff;
text-align: center;
line-height: 24px;
&:hover {
cursor: pointer;
opacity: .8;
}
}
}
}
src/pages/shop/shopInfo/index.tsx
View file @
1b926cde
This diff is collapsed.
Click to expand it.
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