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
e2319326
Commit
e2319326
authored
Feb 03, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 进货单推荐商品询价商品样式修改
parent
4dcd02a3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
9 deletions
+109
-9
index.tsx
src/components/UploadImage/index.tsx
+1
-1
index.less
src/pages/lxMall/components/Recommand/index.less
+12
-2
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+23
-4
index.tsx
src/pages/shop/shopInfo/index.tsx
+73
-2
No files found.
src/components/UploadImage/index.tsx
View file @
e2319326
...
...
@@ -74,7 +74,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
switch
(
listType
)
{
case
"picture-card"
:
return
(
<
div
className=
{
styles
.
upload_image_wrap
}
>
<
div
className=
{
styles
.
upload_image_wrap
}
style=
{
large
?
{
height
:
'120px'
}
:
{}
}
>
<
div
className=
{
cx
(
styles
.
upload_wrap
,
large
?
styles
.
large
:
''
)
}
>
<
Upload
{
...
uploadProps
}
>
{
<
div
className=
{
cx
(
styles
.
upload_btn
,
!
imgUrl
?
styles
.
isAdd
:
""
,
large
?
styles
.
large
:
''
)
}
>
...
...
src/pages/lxMall/components/Recommand/index.less
View file @
e2319326
...
...
@@ -51,4 +51,15 @@
}
}
}
}
\ No newline at end of file
}
.inquiry_price {
color: #FFF;
background-color: var(--mall_main_color);
font-size: 14px;
height: 18px;
line-height: 14px;
padding: 2px 8px;
margin-top: 10px;
display: inline-block;
}
src/pages/lxMall/components/Recommand/index.tsx
View file @
e2319326
...
...
@@ -197,6 +197,28 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
return
link
}
const
renderPriceByType
=
(
commodityItem
)
=>
{
switch
(
commodityItem
.
priceType
)
{
// 现货价格
case
1
:
return
(
<
div
className=
{
styles
.
recommand_list_item_price
}
>
<
span
>
¥
</
span
>
{
priceFormat
(
commodityItem
.
min
)
}
</
div
>
)
// 价格需要询价
case
2
:
return
(
<
div
className=
{
styles
.
inquiry_price
}
>
<
label
>
在线询价
</
label
>
</
div
>
)
default
:
break
}
}
return
(
list
&&
list
.
length
>
0
)
?
(
<
div
className=
{
styles
.
recommand
}
>
<
div
className=
{
styles
.
recommand_title
}
>
买家还在看
</
div
>
...
...
@@ -208,10 +230,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
<
div
className=
{
styles
.
recommand_list_item_img
}
>
<
ImageBox
width=
{
224
}
height=
{
224
}
imgUrl=
{
item
.
mainPic
}
direction=
"column"
/>
</
div
>
<
div
className=
{
styles
.
recommand_list_item_price
}
>
<
span
>
¥
</
span
>
{
priceFormat
(
item
.
min
)
}
</
div
>
{
renderPriceByType
(
item
)
}
<
div
className=
{
styles
.
recommand_list_item_name
}
>
{
item
.
name
}
</
div
>
</
div
>
</
a
>
...
...
src/pages/shop/shopInfo/index.tsx
View file @
e2319326
...
...
@@ -32,6 +32,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const
[
selectCityData
,
setSelectCityData
]
=
useState
<
any
>
([
defaultCityData
])
const
[
workshopPics
,
setWorkshopPics
]
=
useState
([])
// 厂房照片
const
[
honorPics
,
setHonorPics
]
=
useState
([])
// 资质荣誉
const
[
promotionPic
,
setPromotionPic
]
=
useState
<
string
>
(
''
)
const
[
logo
,
setLogo
]
=
useState
<
string
>
(
""
)
const
[
shopInfo
,
setShopInfo
]
=
useState
<
any
>
()
const
[
shopId
,
setShopId
]
=
useState
<
number
>
()
...
...
@@ -66,7 +67,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
}
PublicApi
.
getTemplateWebMemberShopWebFindCurrMemberShop
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
const
data
:
any
=
res
.
data
if
(
res
.
code
===
1000
)
{
setShopInfo
(
data
)
setSelectCityData
(
initMemberShopArea
(
data
.
memberShopAreas
))
...
...
@@ -74,6 +75,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
setShopId
(
data
.
shopId
)
setWorkshopPics
(
data
.
workshopPics
||
[])
setHonorPics
(
data
.
honorPics
||
[])
setPromotionPic
(
data
.
promotionPic
||
""
)
if
(
data
.
shopId
&&
data
.
memberId
)
{
setStoreUrl
(
data
.
storeUrl
||
""
)
}
...
...
@@ -83,7 +85,11 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
logo
:
data
.
logo
,
memberShopAreas
:
initMemberShopArea
(
data
.
memberShopAreas
),
workshopPics
:
data
.
workshopPics
||
[],
honorPics
:
data
.
honorPics
||
[]
honorPics
:
data
.
honorPics
||
[],
phone
:
data
.
phone
||
""
,
address
:
data
.
address
||
""
,
lng
:
data
.
lng
||
""
,
lat
:
data
.
lat
||
""
,
})
}
})
...
...
@@ -206,6 +212,18 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
workshopPics
:
[...
workshopPics
,
url
]
})
}
/**
* 添加推广页
* @param url
*/
const
handleAddPromotionPic
=
(
url
:
string
)
=>
{
setPromotionPic
(
url
)
form
.
setFieldsValue
({
promotionPic
:
url
})
}
/**
* 添加荣誉图片
* @param url
...
...
@@ -383,6 +401,31 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"promotionPic"
label=
{
<
RequireItem
label=
"推广页"
/>
}
>
<
div
className=
{
styles
.
form_item_wrap
}
>
<
div
className=
{
styles
.
img_list
}
>
{
promotionPic
&&
(
<
div
className=
{
cx
(
styles
.
upload_btn
,
styles
.
large
,
styles
.
upload
)
}
>
<
div
className=
{
styles
.
delete_btn
}
onClick=
{
()
=>
setPromotionPic
(
""
)
}
><
DeleteOutlined
/></
div
>
<
img
className=
{
styles
.
upload_img
}
src=
{
promotionPic
}
/>
</
div
>
)
}
<
UploadImage
imgUrl=
{
""
}
large=
{
true
}
fileMaxSize=
{
500
}
size=
"106x107"
onChange=
{
(
url
)
=>
handleAddPromotionPic
(
url
)
}
/>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"shopId"
label=
{
<
RequireItem
label=
"店铺链接"
/>
}
// rules={[{ required: true, message: "请输入客服链接" }]}
...
...
@@ -407,6 +450,34 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"phone"
label=
{
<
RequireItem
label=
"联系电话"
/>
}
>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"address"
label=
{
<
RequireItem
label=
"详细地址"
/>
}
>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"lng"
label=
{
<
RequireItem
label=
"经度"
/>
}
>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
labelAlign=
"left"
name=
"lat"
label=
{
<
RequireItem
label=
"纬度"
/>
}
>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
RequireItem
label=
""
/>
}
>
<
Button
loading=
{
confirmLoading
}
type=
"primary"
style=
{
{
marginRight
:
16
}
}
onClick=
{
handleSave
}
>
保存
</
Button
>
...
...
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