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
9b010982
Commit
9b010982
authored
Dec 28, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
95710f94
0f59f401
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
223 additions
and
175 deletions
+223
-175
index.tsx
src/components/CitySelect/index.tsx
+26
-19
index.tsx
src/pages/balance/settleRules/memberSettle/index.tsx
+10
-0
index.tsx
src/pages/channel/channelInfo/index.tsx
+6
-7
AfterSoldCenter.tsx
src/pages/home/components/Centers/AfterSoldCenter.tsx
+22
-22
FundCenter.tsx
src/pages/home/components/Centers/FundCenter.tsx
+13
-14
LogisticsCenter.tsx
src/pages/home/components/Centers/LogisticsCenter.tsx
+2
-2
ProcessCenter.tsx
src/pages/home/components/Centers/ProcessCenter.tsx
+22
-22
ProductCenter.tsx
src/pages/home/components/Centers/ProductCenter.tsx
+20
-21
SettlementCenter.tsx
src/pages/home/components/Centers/SettlementCenter.tsx
+7
-7
TradeCenter.tsx
src/pages/home/components/Centers/TradeCenter.tsx
+11
-11
center.less
src/pages/home/components/Centers/center.less
+71
-39
index.tsx
src/pages/shop/shopInfo/index.tsx
+13
-11
No files found.
src/components/CitySelect/index.tsx
View file @
9b010982
...
...
@@ -19,12 +19,6 @@ interface CitySelectPropsType {
onChange
:
Function
;
}
interface
selectItemType
{
index
:
number
;
lable
:
string
;
value
:
number
;
}
const
{
Option
}
=
Select
;
const
CityCascader
:
React
.
FC
<
CitySelectPropsType
>
=
(
props
)
=>
{
...
...
@@ -39,7 +33,7 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
},
[])
const
getProviceById
=
(
id
:
number
)
=>
{
let
result
:
number
=
0
let
result
=
0
provinceData
&&
provinceData
.
map
(
item
=>
{
if
(
item
.
value
===
id
)
{
result
=
item
...
...
@@ -49,7 +43,7 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
}
const
getCityById
=
(
id
:
number
,
provinceCode
:
string
)
=>
{
let
result
:
number
=
0
let
result
=
0
!
isEmpty
(
cityData
)
&&
cityData
[
provinceCode
].
map
(
item
=>
{
if
(
item
.
value
===
id
)
{
result
=
item
...
...
@@ -69,16 +63,24 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
if
(
!
areaList
)
{
return
}
let
tempProvinceData
=
[]
let
tempCityData
=
{}
for
(
let
item
of
areaList
)
{
const
tempProvinceData
=
[]
const
tempCityData
=
{}
tempProvinceData
.
push
({
lable
:
"所有"
,
value
:
"0"
})
for
(
const
item
of
areaList
)
{
tempProvinceData
.
push
({
lable
:
item
.
name
,
value
:
item
.
code
})
if
(
!!
item
.
areaResponses
)
{
let
tempCityList
=
[]
for
(
let
cityItem
of
item
.
areaResponses
)
{
if
(
item
.
areaResponses
)
{
const
tempCityList
=
[]
tempCityList
.
push
({
lable
:
"所有"
,
value
:
"0"
})
for
(
const
cityItem
of
item
.
areaResponses
)
{
tempCityList
.
push
({
lable
:
cityItem
.
name
,
value
:
cityItem
.
code
...
...
@@ -89,13 +91,16 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
}
setProvinceData
(
tempProvinceData
)
tempCityData
[
"0"
]
=
[{
lable
:
"所有"
,
value
:
"0"
}]
setCityData
(
tempCityData
)
}
const
handleProvinceChange
=
(
value
:
number
,
index
:
number
)
=>
{
le
t
newData
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
))
le
t
proviceById
:
any
=
getProviceById
(
value
)
cons
t
newData
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
))
cons
t
proviceById
:
any
=
getProviceById
(
value
)
setCities
(
cityData
[
proviceById
.
value
])
newData
.
map
((
item
:
any
)
=>
{
...
...
@@ -111,7 +116,7 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
}
const
onSecondCityChange
=
(
value
:
number
,
provinceCode
:
string
,
index
:
number
)
=>
{
le
t
newData
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
))
cons
t
newData
=
JSON
.
parse
(
JSON
.
stringify
(
selectData
))
const
cityById
:
any
=
getCityById
(
value
,
provinceCode
)
newData
.
map
((
item
:
any
)
=>
{
...
...
@@ -155,7 +160,7 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
onChange=
{
(
value
)
=>
onSecondCityChange
(
value
,
item
.
provinceCode
,
item
.
index
)
}
placeholder=
"请选择"
>
{
(
item
.
provinceCode
&&
!
isEmpty
(
cityData
))
?
cityData
[
item
.
provinceCode
]
&&
cityData
[
item
.
provinceCode
].
map
((
item
:
any
)
=>
(
{
(
(
item
.
provinceCode
||
item
.
provinceCode
===
0
)
&&
!
isEmpty
(
cityData
))
?
cityData
[
item
.
provinceCode
]
&&
cityData
[
item
.
provinceCode
].
map
((
item
:
any
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
lable
}
</
Option
>
))
:
null
}
</
Select
>
...
...
@@ -186,4 +191,6 @@ const CitySelect: React.FC<CitySelectPropsType> = forwardRef((props, ref) => {
)
})
CitySelect
.
displayName
=
"CitySelect"
export
default
CitySelect
src/pages/balance/settleRules/memberSettle/index.tsx
View file @
9b010982
...
...
@@ -79,12 +79,22 @@ const MemberSettle: React.FC<{}> = () => {
return
(
<
Space
>
<
Link
to=
{
`/memberCenter/balance/settleRules/memberSettleList/edit?id=${record.id}`
}
>
修改
</
Link
>
<
Button
type=
"link"
onClick=
{
()
=>
handleRemove
({
id
:
record
.
id
})
}
>
删除
</
Button
>
</
Space
>
)
}
}
]
const
handleRemove
=
(
params
)
=>
{
PublicApi
.
postSettleAccountsPlatformConfigDeleteMemberSettlementStrategy
({
id
:
params
.
id
})
.
then
(({
code
})
=>
{
if
(
code
===
1000
)
{
formActions
.
submit
();
}
})
}
const
goToCreate
=
()
=>
{
history
.
push
(
'/memberCenter/balance/settleRules/memberSettleList/add'
);
}
...
...
src/pages/channel/channelInfo/index.tsx
View file @
9b010982
...
...
@@ -148,10 +148,10 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if
(
!
checkmemberChannelAreas
(
value
.
memberChannelAreas
))
{
return
}
if
(
!
shopId
)
{
message
.
error
(
"店铺链接不能为空"
)
return
}
//
if (!shopId) {
//
message.error("店铺链接不能为空")
//
return
//
}
value
.
storeUrl
=
storeUrl
||
`
${
siteUrl
}
/
${
GlobalConfig
.
channelRootRoute
}
`
value
.
shopId
=
shopId
setConfirmLoading
(
true
)
...
...
@@ -175,10 +175,9 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
message
.
error
(
'请选择归属地市'
)
return
false
}
return
shopAreas
.
every
(
item
=>
{
if
(
!
item
.
provinceCode
)
{
if
(
isEmpty
(
item
.
provinceCode
)
)
{
message
.
destroy
()
message
.
error
(
'请选择归属地市'
)
return
false
...
...
@@ -406,7 +405,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
label=
{
<
RequireItem
label=
"客服链接"
/>
}
rules=
{
[{
pattern
:
/
(
http|ftp|https
)
:
\/\/[\w\-
_
]
+
(\.[\w\-
_
]
+
)
+
([\w\-
.,@?^=%&:
/
~+#
]
*
[\w\-
@?^=%&
/
~+#
])?
/
,
message
:
'请输入正确的客服链接'
}]
}
>
<
Input
allowClear
className=
{
styles
.
form_item
}
/>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
RequireItem
label=
""
/>
}
...
...
src/pages/home/components/Centers/AfterSoldCenter.tsx
View file @
9b010982
...
...
@@ -51,28 +51,28 @@ const SettlementAbility: React.FC<Iprops> = () => {
loading
?
<
Skeleton
active
/>
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
)
})
}
</
Col
>
</
Row
>
)
})
return
(
<
div
className=
{
styles
.
wrapRow
}
key=
{
record
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
div
>
)
})
}
</
div
>
</
div
>
)
})
}
</>
)
...
...
src/pages/home/components/Centers/FundCenter.tsx
View file @
9b010982
...
...
@@ -84,28 +84,27 @@ const FundCenter: React.FC<Iprops> = () => {
</
div
>
<
div
>
{
Object
.
keys
(
requestData
).
map
((
item
)
=>
{
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
item
}
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TO_TITLE
[
item
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
<
div
className=
{
styles
.
wrapRow
}
key=
{
record
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
KEY_TO_TITLE
[
record
]
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
requestData
[
item
].
map
((
record
)
=>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
record
.
name
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
record
.
name
}
</
div
>
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
record
.
link
?
<
Link
to=
{
record
.
link
}
className=
{
styles
.
colValue
}
>
{
record
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
record
.
count
}
</
div
>
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
</
div
>
)
})
}
</
Col
>
</
Row
>
</
div
>
</
div
>
)
})
}
...
...
src/pages/home/components/Centers/LogisticsCenter.tsx
View file @
9b010982
...
...
@@ -6,7 +6,7 @@ import logistics_form from '@/assets/imgs/logistics_form.png';
import
logistics_address
from
'@/assets/imgs/logistics_address.png'
;
import
logistics_cost
from
'@/assets/imgs/logistics_cost.png'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Skeleton
,
Row
,
Col
,
Badge
}
from
'antd'
;
import
{
Skeleton
,
Badge
}
from
'antd'
;
import
{
Link
}
from
'umi'
;
import
Authorize
from
'../Authorize'
;
import
{
getAuth
}
from
'@/utils/auth'
;
...
...
@@ -76,7 +76,7 @@ const LogisticsCenter: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
centerRow
}
>
{
data
.
map
((
item
)
=>
{
const
hasAuth
=
!
urls
.
includes
(
item
.
url
);
;
const
hasAuth
=
!
urls
.
includes
(
item
.
url
);
if
(
!
hasAuth
)
{
return
null
}
...
...
src/pages/home/components/Centers/ProcessCenter.tsx
View file @
9b010982
...
...
@@ -42,28 +42,28 @@ const ProcessCenter: React.FC<Iprops> = () => {
loading
?
<
Skeleton
active
/>
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
)
})
}
</
Col
>
</
Row
>
)
})
return
(
<
div
className=
{
styles
.
wrapRow
}
key=
{
record
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
div
>
)
})
}
</
div
>
</
div
>
)
})
}
</>
)
...
...
src/pages/home/components/Centers/ProductCenter.tsx
View file @
9b010982
...
...
@@ -57,27 +57,26 @@ const ProductCenter: React.FC<Iprops> = () => {
{
loading
?
<
Skeleton
active
/>
:
<>
<
Row
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
商品
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
isArray
&&
requestData
.
map
((
item
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
item
.
name
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
)
})
}
</
Col
>
</
Row
>
</>
:
<
div
className=
{
styles
.
wrapRow
}
>
<
span
className=
{
styles
.
rowTitle
}
>
商品
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
isArray
&&
requestData
.
map
((
item
,
key
)
=>
{
return
(
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
div
>
)
})
}
</
div
>
</
div
>
}
</>
)
...
...
src/pages/home/components/Centers/SettlementCenter.tsx
View file @
9b010982
...
...
@@ -87,25 +87,25 @@ const SettlementCenter: React.FC<Iprops> = () => {
{
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
<
div
className=
{
styles
.
wrapRow
}
key=
{
record
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
</
div
>
)
})
}
</
Col
>
</
Row
>
</
div
>
</
div
>
)
})
}
...
...
src/pages/home/components/Centers/TradeCenter.tsx
View file @
9b010982
...
...
@@ -55,25 +55,25 @@ const TradeCenter: React.FC<Iprops> = () => {
))
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
<
div
className=
{
styles
.
wrapRow
}
key=
{
record
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
Col
>
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
div
>
)
})
}
</
Col
>
</
Row
>
</
div
>
</
div
>
)
})
...
...
src/pages/home/components/Centers/center.less
View file @
9b010982
.row {
padding: 0px 0px 12px 0;
.rowTitle {
font-size: 14;
font-weight: 400;
color: #303133;
margin-top: 24px;
}
.colRow {
display: flex;
flex-wrap: wrap;
.col {
margin-top: 24px;
}
.colTitle {
font-size: 12px;
font-weight: 400;
color: #909399;
min-height: 36px;
}
.colValue {
font-weight: 500;
font-size: 24px;
margin-top: 16px;
color: #303133;
display: block;
&:hover {
text-decoration: underline;
color: @main-color;
cursor: pointer;
}
}
}
}
.tagsItem {
min-width: 160px;
...
...
@@ -144,3 +105,74 @@
}
}
}
.wrapRow {
display: flex;
flex-direction: row;
padding: 30px 0 6px 0;
border-bottom: 1px dashed #FFEEF0F3;
&:last-of-type {
border-bottom: none;
}
.rowTitle {
font-size: 14px;
width: 145px;
}
.rowValues {
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex: 1;
.wrapCol {
flex-basis: 16.66%;
padding: 0 10px;
margin-bottom: 24px;
.colTitle {
font-size: 12px;
font-weight: 400;
color: #909399;
min-height: 36px;
}
.colValue {
font-weight: 500;
font-size: 24px;
margin-top: 16px;
color: #303133;
display: block;
&:hover {
text-decoration: underline;
color: @main-color;
cursor: pointer;
}
}
}
}
}
@media (max-width: 1366px) {
.wrapRow {
.rowTitle {
font-size: 12px;
width: 125px;
}
.rowValues {
.wrapCol {
flex-basis: 20%;
padding: 0 10px;
}
.colValue {
font-weight: 500;
font-size: 18px;
}
}
}
}
src/pages/shop/shopInfo/index.tsx
View file @
9b010982
...
...
@@ -8,7 +8,6 @@ import CitySelect from '@/components/CitySelect'
import
RequireItem
from
'@/components/RequireItem'
import
{
PublicApi
}
from
'@/services/api'
import
UploadImage
from
'@/components/UploadImage'
import
{
GetTemplateShopFindShopResponse
}
from
'@/services/TemplateApi'
import
copy
from
'copy-to-clipboard'
import
cx
from
'classnames'
import
styles
from
'./index.less'
...
...
@@ -34,8 +33,9 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const
[
workshopPics
,
setWorkshopPics
]
=
useState
([])
// 厂房照片
const
[
honorPics
,
setHonorPics
]
=
useState
([])
// 资质荣誉
const
[
logo
,
setLogo
]
=
useState
<
string
>
(
""
)
const
[
shopInfo
,
setShopInfo
]
=
useState
<
GetTemplateShopFindShopResponse
>
()
const
[
shopInfo
,
setShopInfo
]
=
useState
<
any
>
()
const
[
shopId
,
setShopId
]
=
useState
<
number
>
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
useEffect
(()
=>
{
fetchShopInfo
()
...
...
@@ -149,19 +149,21 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
if
(
!
checkMemberShopAreas
(
value
.
memberShopAreas
))
{
return
}
if
(
!
shopId
)
{
message
.
error
(
"店铺链接不能为空"
)
return
}
//
if (!shopId) {
//
message.error("店铺链接不能为空")
//
return
//
}
value
.
storeUrl
=
storeUrl
||
`
${
siteUrl
}
/shop`
value
.
shopId
=
shopId
setConfirmLoading
(
true
)
PublicApi
.
postTemplateWebMemberShopWebSaveCurrMemberShop
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchShopInfo
()
setFormIsHalfFilledOut
(
false
)
}
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
})
})
...
...
@@ -176,7 +178,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
return
shopAreas
.
every
(
item
=>
{
if
(
!
item
.
provinceCode
)
{
if
(
isEmpty
(
item
.
provinceCode
)
)
{
message
.
destroy
()
message
.
error
(
'请选择归属地市'
)
return
false
...
...
@@ -402,12 +404,12 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
label=
{
<
RequireItem
label=
"客服链接"
/>
}
rules=
{
[{
pattern
:
/
(
http|ftp|https
)
:
\/\/[\w\-
_
]
+
(\.[\w\-
_
]
+
)
+
([\w\-
.,@?^=%&:
/
~+#
]
*
[\w\-
@?^=%&
/
~+#
])?
/
,
message
:
'请输入正确的客服链接'
}]
}
>
<
Input
allowClear
className=
{
styles
.
form_item
}
/>
<
Input
allowClear
autoComplete=
"off"
className=
{
styles
.
form_item
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
RequireItem
label=
""
/>
}
>
<
Button
type=
"primary"
style=
{
{
marginRight
:
16
}
}
onClick=
{
handleSave
}
>
保存
</
Button
>
<
Button
loading=
{
confirmLoading
}
type=
"primary"
style=
{
{
marginRight
:
16
}
}
onClick=
{
handleSave
}
>
保存
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
...
...
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