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
1436f214
Commit
1436f214
authored
Oct 19, 2021
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 自营商城seo设置以及关于我们设置-接口调整
parent
ccdb8c98
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
30 deletions
+63
-30
procurement.ts
src/constants/procurement.ts
+3
-1
index.less
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.less
+10
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
+26
-16
add.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
+19
-8
index.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
+5
-5
No files found.
src/constants/procurement.ts
View file @
1436f214
...
...
@@ -321,7 +321,9 @@ export enum DOORTYPE {
/** 渠道门户 */
PLACE_DOORTYPE
,
/** 采购门户 */
PROCUREMENT_DOORTYPE
PROCUREMENT_DOORTYPE
,
/** 自营门户 */
OWN_DOORTYPE
}
/** 年加工额 */
...
...
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.less
View file @
1436f214
...
...
@@ -6,11 +6,21 @@
}
.mallLink {
display: flex;
align-items: center;
font-size: 12px;
color: #91959B;
& > span {
color: #252D37;
}
.link {
padding: 0 5px;
}
}
.copy_icon {
cursor: pointer;
}
}
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
View file @
1436f214
import
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Tabs
,
Form
,
Button
,
Card
,
Select
,
Input
,
Tooltip
,
Typography
,
Row
,
Col
,
Anchor
}
from
'antd'
;
import
{
Form
,
Button
,
Card
,
Select
,
Input
,
Tooltip
,
Typography
,
Row
,
Col
,
message
}
from
'antd'
;
import
RequireItem
from
'@/components/RequireItem'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
Prompt
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
QuestionCircleOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
;
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
{
CopyOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
validatorByte
}
from
'@/utils/regExp'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PAGE_TYPE
,
PAGE_TYPE_OPTIONS
}
from
'./constant
'
import
copy
from
'copy-to-clipboard
'
import
TabAnchor
from
'@/components/TabAnchor'
import
CitySelect
from
'@/components/CitySelect'
import
ImgUpload
,
{
imgUploadRefProps
}
from
'@/components/ImgUpload'
...
...
@@ -37,6 +35,12 @@ const tabLink = [
{
id
:
'4'
,
title
:
'宣传画册'
},
]
const
handleCopyLinke
=
(
link
:
string
)
=>
{
if
(
copy
(
link
))
{
message
.
success
(
'复制成功!'
)
}
}
const
defaultCityData
=
{
index
:
0
,
provinceCode
:
0
,
province
:
''
,
cityCode
:
0
,
city
:
''
}
const
OwnMallAboutUs
=
()
=>
{
...
...
@@ -77,7 +81,7 @@ const OwnMallAboutUs = () => {
temp
.
push
(
item
)
setSelectCityData
(
temp
)
form
.
setFieldsValue
({
member
Channel
Areas
:
temp
member
Shop
Areas
:
temp
})
}
...
...
@@ -86,14 +90,14 @@ const OwnMallAboutUs = () => {
temp
=
temp
.
filter
((
item
:
any
)
=>
item
.
index
!==
index
)
setSelectCityData
(
temp
)
form
.
setFieldsValue
({
member
Channel
Areas
:
temp
member
Shop
Areas
:
temp
})
}
const
handleCityChange
=
(
data
:
any
)
=>
{
setSelectCityData
(
data
)
form
.
setFieldsValue
({
member
Channel
Areas
:
data
member
Shop
Areas
:
data
})
}
...
...
@@ -117,7 +121,7 @@ const OwnMallAboutUs = () => {
}
console
.
log
(
`params`
,
params
)
setSaveLoading
(
true
)
PublicApi
.
post
ManageShopAboutSubmit
(
params
).
then
(
res
=>
{
PublicApi
.
post
TemplateWebMemberSelfWebSaveCurrMemberSelf
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setIsFormChange
(
false
)
}
...
...
@@ -129,7 +133,7 @@ const OwnMallAboutUs = () => {
// 根据站点获取自营商城
const
getAllMallList
=
()
=>
{
PublicApi
.
getManageWebShopWebFindWebEnterpriseSelfShop
({
siteId
}).
then
(
res
=>
{
PublicApi
.
getManageWebShopWebFindWebEnterpriseSelfShop
({
siteId
:
String
(
siteId
)
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
.
map
(
item
=>
{
return
{
...
...
@@ -144,9 +148,9 @@ const OwnMallAboutUs = () => {
})
}
// 获取关于我们详情
// 获取
自营商城
关于我们详情
const
getAboutUsInfo
=
()
=>
{
PublicApi
.
get
ManageShopAboutGet
().
then
(
res
=>
{
PublicApi
.
get
TemplateWebMemberSelfWebFindCurrMemberSelf
().
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
&&
data
)
{
const
{
albumName
,
albumUrl
,
honorPics
,
workshopPics
,
...
rest
}
=
data
...
...
@@ -161,7 +165,7 @@ const OwnMallAboutUs = () => {
setIsFormChange
(
false
)
setAlbumUrls
(
newAlbumUrls
)
setSelectCityData
(
rest
.
member
Channel
Areas
)
setSelectCityData
(
rest
.
member
Shop
Areas
)
setMallUrl
(
rest
.
url
)
}
})
...
...
@@ -196,7 +200,7 @@ const OwnMallAboutUs = () => {
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'member
Channel
Areas'
name=
'member
Shop
Areas'
label=
{
<
RequireItem
label=
"业务覆盖地市"
isRequire=
{
true
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请选择业务覆盖地市"
}
...
...
@@ -216,7 +220,13 @@ const OwnMallAboutUs = () => {
<
Form
.
Item
name=
'shopId'
>
<
Select
placeholder=
'请选择自营商城'
allowClear
options=
{
allMallList
}
onChange=
{
selectMall
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'url'
><
div
className=
{
styles
.
mallLink
}
>
当前自营商城链接:
<
span
>
{
mallUrl
}
</
span
></
div
></
Form
.
Item
>
<
Form
.
Item
name=
'url'
>
<
div
className=
{
styles
.
mallLink
}
>
<
span
>
当前自营商城链接:
</
span
>
<
span
className=
{
styles
.
link
}
>
{
mallUrl
||
'-'
}
</
span
>
{
mallUrl
&&
<
Tooltip
title=
'复制'
><
CopyOutlined
className=
{
styles
.
copy_icon
}
onClick=
{
()
=>
handleCopyLinke
(
mallUrl
)
}
/></
Tooltip
>
}
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
View file @
1436f214
import
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Tabs
,
Form
,
Button
,
Card
,
Select
,
Input
,
Tooltip
,
Typography
,
Row
,
Col
,
Anchor
}
from
'antd'
;
/*
* @Author: Crayon
* @Date: 2021-09-28 13:55:40
* @LastEditTime: 2021-10-19 14:30:13
* @LastEditors: Crayon
* @Description: 自营商城seo信息新增/修改
* @FilePath: \lingxi-business-paltform\src\pages\ownMall\ownMallManager\ownMallSeo\add.tsx
*/
import
{
useEffect
,
useState
}
from
'react'
;
import
{
Form
,
Button
,
Card
,
Select
,
Input
,
Tooltip
,
Typography
,
Row
,
Col
}
from
'antd'
;
import
RequireItem
from
'@/components/RequireItem'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
QuestionCircleOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
;
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
{
validatorByte
}
from
'@/utils/regExp'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PAGE_TYPE
,
PAGE_TYPE_OPTIONS
}
from
'./constant'
import
{
DOORTYPE
}
from
'@/constants/procurement'
import
TabAnchor
from
'@/components/TabAnchor'
import
styles
from
'./index.less'
...
...
@@ -43,18 +51,21 @@ const SeoAdd = () => {
const
params
=
{
id
,
name
:
PAGE_TYPE
[
values
.
type
],
doorType
:
DOORTYPE
.
OWN_DOORTYPE
,
// 门户类型:1-店铺门户 2-渠道门户 3-采购门户 4-自营门户
...
values
,
}
setSaveLoading
(
true
)
const
requestApi
=
id
?
PublicApi
.
post
ManageActivityShopSeoUpdate
:
PublicApi
.
postManageActivityShopSeo
Add
const
requestApi
=
id
?
PublicApi
.
post
TemplateWebSeoWebUpdate
:
PublicApi
.
postTemplateWebSeoWeb
Add
requestApi
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setIsFormChange
(
false
)
setTimeout
(()
=>
{
history
.
goBack
()
},
500
)
}
else
{
setSaveLoading
(
false
)
}
}).
finally
(()
=>
{
}).
catch
(()
=>
{
setSaveLoading
(
false
)
})
})
...
...
@@ -62,7 +73,7 @@ const SeoAdd = () => {
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
get
ManageActivityShopSeo
Get
({
id
}).
then
(
res
=>
{
PublicApi
.
get
TemplateWebSeoWeb
Get
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
form
.
setFieldsValue
(
res
.
data
)
}
...
...
@@ -90,8 +101,8 @@ const SeoAdd = () => {
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'type'
label=
{
<
RequireItem
label=
"页面
名称
"
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请选择页面
名称
"
}]
}
label=
{
<
RequireItem
label=
"页面
类型
"
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请选择页面
类型
"
}]
}
>
<
Select
options=
{
PAGE_TYPE_OPTIONS
}
disabled=
{
isView
}
/>
</
Form
.
Item
>
...
...
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
View file @
1436f214
...
...
@@ -13,6 +13,7 @@ import NiceForm from '@/components/NiceForm';
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
DOORTYPE
}
from
'@/constants/procurement'
const
formActions
=
createFormActions
();
...
...
@@ -118,18 +119,17 @@ const SeoList: React.FC<{}> = () => {
// 停用/启用
const
handleModify
=
async
(
record
:
any
)
=>
{
await
PublicApi
.
post
ManageActivityShopSeo
UpdateStatus
({
await
PublicApi
.
post
TemplateWebSeoWeb
UpdateStatus
({
id
:
record
.
id
,
enableS
tatus
:
record
.
status
===
1
?
0
:
1
s
tatus
:
record
.
status
===
1
?
0
:
1
})
ref
.
current
.
reload
()
}
// 删除
const
handleDelete
=
async
(
id
)
=>
{
const
res
=
await
PublicApi
.
getManageActivityShopSeo
Delete
({
id
})
const
res
=
await
PublicApi
.
postTemplateWebSeoWeb
Delete
({
id
})
if
(
res
.
code
===
1000
)
{
message
.
success
(
'删除成功'
)
ref
.
current
.
reload
()
}
}
...
...
@@ -137,7 +137,7 @@ const SeoList: React.FC<{}> = () => {
// 获取列表
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
get
ManageActivityShopSeoPage
({
...
params
}).
then
(
res
=>
{
PublicApi
.
get
TemplateWebSeoWebPage
({
doorType
:
DOORTYPE
.
OWN_DOORTYPE
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
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