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
1b926cde
Commit
1b926cde
authored
Dec 24, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改获取店铺信息接口
parent
bd6c9875
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
31 deletions
+35
-31
index.less
src/pages/channel/channelInfo/index.less
+1
-1
index.tsx
src/pages/channel/channelInfo/index.tsx
+5
-5
index.tsx
src/pages/lxMall/components/ShopHeader/index.tsx
+6
-7
index.tsx
src/pages/lxMall/components/TopBar/index.tsx
+1
-1
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
+1
-1
index.tsx
src/pages/shop/shopInfo/index.tsx
+5
-7
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 {
...
...
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,8 +346,6 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
...
...
@@ -356,6 +354,8 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
onChange=
{
(
url
)
=>
handleAddworkshopPics
(
url
)
}
/>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
...
...
@@ -373,8 +373,6 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
...
...
@@ -383,6 +381,8 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
onChange=
{
(
url
)
=>
handleAddhonorPics
(
url
)
}
/>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
...
...
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
}
>
...
...
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
...
...
@@ -29,7 +29,7 @@
.img_list {
display: flex;
flex-wrap: wrap;
}
.shop_url {
...
...
src/pages/shop/shopInfo/index.tsx
View file @
1b926cde
...
...
@@ -65,7 +65,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
roleId
:
memberRoleId
}
PublicApi
.
getTemplate
ShopFindShop
(
param
).
then
(
res
=>
{
PublicApi
.
getTemplate
WebMemberShopWebFindCurrMemberShop
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
if
(
res
.
code
===
1000
)
{
setShopInfo
(
data
)
...
...
@@ -156,7 +156,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
value
.
storeUrl
=
storeUrl
||
`
${
siteUrl
}
/shop`
value
.
shopId
=
shopId
PublicApi
.
postTemplate
ShopSaveShop
(
value
).
then
(
res
=>
{
PublicApi
.
postTemplate
WebMemberShopWebSaveCurrMemberShop
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchShopInfo
()
setFormIsHalfFilledOut
(
false
)
...
...
@@ -326,7 +326,7 @@ const ShopInfo: 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"
...
...
@@ -344,8 +344,6 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
...
...
@@ -354,6 +352,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
onChange=
{
(
url
)
=>
handleAddworkshopPics
(
url
)
}
/>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
...
...
@@ -370,8 +369,6 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
</
div
>
))
}
</
div
>
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
...
...
@@ -380,6 +377,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
onChange=
{
(
url
)
=>
handleAddhonorPics
(
url
)
}
/>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
...
...
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