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
linweijiong
jinfa-platform
Commits
8c744b25
Commit
8c744b25
authored
Nov 29, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商城能力文案抽取
parent
1bd26ba0
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
265 additions
and
201 deletions
+265
-201
common.ts
src/locales/zh-CN/common.ts
+6
-0
shop.ts
src/locales/zh-CN/shop.ts
+52
-4
add.tsx
src/pages/channel/channelSeo/add.tsx
+1
-1
index.tsx
src/pages/channel/channelSeo/index.tsx
+2
-2
index.tsx
src/pages/channel/components/templateItem/index.tsx
+19
-19
index.tsx
src/pages/channel/templateDetail/index.tsx
+1
-1
index.tsx
.../ownMall/ownMallManager/components/templateItem/index.tsx
+24
-24
index.tsx
...ages/ownMall/ownMallManager/components/useModal/index.tsx
+13
-15
constant.ts
src/pages/ownMall/ownMallManager/ownMallAboutUs/constant.ts
+0
-12
constant.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/constant.tsx
+13
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
+30
-29
constant.tsx
...ages/ownMall/ownMallManager/ownMallConfigure/constant.tsx
+27
-26
index.tsx
src/pages/ownMall/ownMallManager/ownMallConfigure/index.tsx
+11
-8
add.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
+22
-20
constant.ts
src/pages/ownMall/ownMallManager/ownMallSeo/constant.ts
+0
-12
constant.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/constant.tsx
+13
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
+12
-11
index.tsx
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
+17
-15
index.tsx
src/pages/shop/components/templateItem/index.tsx
+2
-2
No files found.
src/locales/zh-CN/common.ts
View file @
8c744b25
...
...
@@ -4,6 +4,7 @@
export
default
{
/** button */
'common.button.save'
:
'保存'
,
'common.button.cancel'
:
'取消'
,
'common.button.add'
:
'新建'
,
'common.button.modify'
:
'修改'
,
'common.button.yes'
:
'是'
,
...
...
@@ -14,6 +15,7 @@
'common.button.view.details'
:
'查看详情'
,
'common.button.query'
:
'查询'
,
'common.button.reset'
:
'重置'
,
'common.button.copay'
:
'复制'
,
/** tips */
'common.tip.save.confirm'
:
'您还有未保存的内容,是否确定要离开?'
,
...
...
@@ -21,6 +23,7 @@
/** table */
'common.table.action'
:
"操作"
,
'common.table.status'
:
"状态"
,
/** status */
'common.status.effective'
:
'有效'
,
...
...
@@ -28,10 +31,13 @@
/** unit */
'common.unit.individual.chinese'
:
'个汉字'
,
'common.unit.individual.character'
:
'个字符'
,
/** text */
'common.text.longest'
:
'最长'
,
'common.text.select'
:
'选择'
,
'common.text.most'
:
'最多'
,
/** form */
'common.form.name.placeholder'
:
'请输入姓名'
,
...
...
src/locales/zh-CN/shop.ts
View file @
8c744b25
/**
* 店铺能力
* 店铺
/渠道/商城
能力
*/
export
default
{
/** 店铺 */
'shop.form.label.memberShopAreas'
:
'归属地市'
,
'shop.form.memberShopAreas.required'
:
'请选择归属地市'
,
'shop.form.upload.size.limit'
:
'上传文件大小不超过 50M!'
,
...
...
@@ -19,7 +20,9 @@ export default {
'shop.form.label.shopLink'
:
'店铺链接'
,
'shop.form.label.mallLink'
:
'商城链接'
,
'shop.form.label.phone'
:
'联系电话'
,
'shop.form.label.phone.placeholder'
:
'请输入联系电话'
,
'shop.form.label.address'
:
'详细地址'
,
'shop.form.label.address.placeholder'
:
'请输入详细地址'
,
'shop.form.label.currentLink'
:
'当前链接'
,
'shop.form.label.upload'
:
'上传文件'
,
'shop.form.label.upload.tip'
:
'一次上传一个文件,每个附件大小不能超过 50M<'
,
...
...
@@ -35,14 +38,15 @@ export default {
'shop.seo.table.status'
:
"状态"
,
'shop.seo.table.title'
:
"标题"
,
'shop.seo.table.title.tip'
:
"用于显示在页面title标签的内容,便于搜索引擎抓取"
,
'shop.seo.form.title.required'
:
"标题"
,
'shop.seo.form.title.required'
:
"
请输入
标题"
,
'shop.seo.table.description'
:
"描述"
,
'shop.seo.table.description.tip'
:
"用于显示在页面Description标签的内容,便于搜索引擎抓取"
,
'shop.seo.form.description.required'
:
"描述"
,
'shop.seo.form.description.required'
:
"
请输入
描述"
,
'shop.seo.table.keywords'
:
"关键字"
,
'shop.seo.table.keywords.tip'
:
"用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔"
,
'shop.seo.form.keywords.required'
:
"请输入关键字"
,
'shop.seo.tab.basic'
:
"基本信息"
,
'shop.seo.tab.seo'
:
"SEO设置"
,
'shop.template.create.tip'
:
'您还未创建店铺,请先创建店铺'
,
'channel.template.create.tip'
:
'您还未创建渠道商城,请先创建渠道商城'
,
...
...
@@ -67,8 +71,10 @@ export default {
'shop.tempalte.modal.use.content3'
:
'模板'
,
'shop.tempalte.modal.use.content4'
:
'您是否使用'
,
'shop.tempalte.modal.use.content5'
:
'模板,来替换您正在使用的模板'
,
'shop.template.environment.status_0'
:
'所有'
,
'shop.template.environment.status_3'
:
'小程序'
,
/** 渠道
业务员
*/
/** 渠道
商城
*/
'channel.member.add'
:
'新增业务员'
,
'channel.member.edit'
:
'编辑业务员'
,
'channel.member.preview'
:
'新增业务员'
,
...
...
@@ -106,4 +112,46 @@ export default {
'channel.template.modal.title.use'
:
'使用渠道模板'
,
'channel.template.button.mall.edit'
:
'渠道商城装修'
,
'channel.template.button.mall.category.edit'
:
'渠道品类导航装修'
,
/** 自营商城 */
'own.about.page.title'
:
'自营商城'
,
'own.template.modal.title.use'
:
'使用自营商城模板'
,
'own.template.button.mall.edit'
:
'商城装修'
,
'own.template.button.mall.category.edit'
:
'品类导航页装修'
,
'own.constant.page.type_1'
:
'首页'
,
'own.constant.page.type_2'
:
'关于我们'
,
'own.constant.page.type_3'
:
'行情资讯'
,
'own.about.tab.item_1'
:
'基本信息'
,
'own.about.tab.item_2'
:
'厂房照片'
,
'own.about.tab.item_3'
:
'资质荣誉'
,
'own.about.tab.item_4'
:
'宣传画册'
,
'own.about.form.memberShopAreas'
:
'业务覆盖地市'
,
'own.about.form.memberShopAreas.required'
:
'请选择业务覆盖地市'
,
'own.about.form.mall.link'
:
'自营商城链接'
,
'own.about.form.mall.link.select'
:
'请选择自营商城'
,
'own.about.form.mall.link.current'
:
'当前自营商城链接'
,
'own.mall.type_1'
:
'企业商城'
,
'own.mall.type_2'
:
'积分商城'
,
'own.mall.type_3'
:
'渠道商城'
,
'own.mall.type_4'
:
'渠道自有商城'
,
'own.mall.type_5'
:
'渠道积分商城'
,
'own.mall.type_6'
:
'采购门户'
,
'own.mall.type_7'
:
'物流服务门户'
,
'own.mall.type_8'
:
'加工服务门户'
,
'own.mall.type_9'
:
'行情资讯门户'
,
'own.mall.property_1'
:
'B端商城'
,
'own.mall.property_2'
:
'C端商城'
,
'own.mall.property_3'
:
'B端自营商城'
,
'own.mall.property_4'
:
'C端自营商城'
,
'own_configure.form.logoUrl.required'
:
'请上传商城LOGO'
,
'own_configure.form.mallname'
:
'商城名称'
,
'own_configure.form.describe'
:
'商城描述'
,
'own_configure.form.url'
:
'商城地址'
,
'own_configure.form.isDefault'
:
'默认商城'
,
'own_configure.form.name.required'
:
'请填写商城名称'
,
'own.seo.check'
:
'查看SEO'
,
'own.seo.edit'
:
'修改SEO'
,
'own.seo.add'
:
'新增SEO'
,
'own.seo.form.type'
:
'页面类型'
,
'own.seo.form.type.required'
:
'请选择页面类型'
,
}
src/pages/channel/channelSeo/add.tsx
View file @
8c744b25
...
...
@@ -104,7 +104,7 @@ const ChannelSeoAdded = () => {
<
Form
.
Item
name=
'title'
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入标题"
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.title.required'
})
}]
}
>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}50${intl.formatMessage({ id: 'common.unit.individual.chinese'})}`
}
/>
</
Form
.
Item
>
...
...
src/pages/channel/channelSeo/index.tsx
View file @
8c744b25
...
...
@@ -123,7 +123,7 @@ const ChannelSeo = () => {
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
新建
{
intl
.
formatMessage
({
id
:
'common.button.add'
})
}
</
Button
>
</
Col
>
</
Row
>
...
...
@@ -152,7 +152,7 @@ const ChannelSeo = () => {
},
"x-component-props"
:
{
placeholder
:
'页面名称'
,
placeholder
:
intl
.
formatMessage
({
id
:
'shop.seo.table.name'
})
,
advanced
:
false
}
}
...
...
src/pages/channel/components/templateItem/index.tsx
View file @
8c744b25
...
...
@@ -9,28 +9,28 @@ interface TemplateItemPropsType {
type
:
string
;
}
const
Environment_Status
=
{
0
:
{
name
:
"所有"
},
1
:
{
name
:
"web"
},
2
:
{
name
:
"H5"
},
3
:
{
name
:
"小程序"
},
4
:
{
name
:
"APP"
}
}
const
TemplateItem
:
React
.
FC
<
TemplateItemPropsType
>
=
(
props
)
=>
{
const
{
templateInfo
,
type
}
=
props
const
intl
=
useIntl
()
const
Environment_Status
=
{
0
:
{
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_0'
})
},
1
:
{
name
:
"web"
},
2
:
{
name
:
"H5"
},
3
:
{
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_3'
})
},
4
:
{
name
:
"APP"
}
}
return
(
<
div
className=
{
styles
.
template_item
}
>
<
div
className=
{
styles
.
img_box
}
style=
{
{
backgroundImage
:
`url(${templateInfo.templatePicUrl})`
}
}
>
...
...
@@ -54,7 +54,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.shopName'
})
}
</
label
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.shopName'
})
}
</
label
>
<
span
>
{
templateInfo
.
shopName
}
</
span
>
</
div
>
</
div
>
...
...
src/pages/channel/templateDetail/index.tsx
View file @
8c744b25
...
...
@@ -107,7 +107,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.templateName'
})
}
</
label
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.templateName'
})
}
</
label
>
<
span
>
{
detailInfo
?.
templateName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
...
...
src/pages/ownMall/ownMallManager/components/templateItem/index.tsx
View file @
8c744b25
import
React
from
'react'
import
{
PlayCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
{
Link
,
useIntl
}
from
'umi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
...
...
@@ -10,32 +10,32 @@ interface TemplateItemPropsType {
type
:
string
;
}
const
Environment_Status
=
{
0
:
{
name
:
"所有"
},
1
:
{
name
:
"web"
},
2
:
{
name
:
"H5"
},
3
:
{
name
:
"小程序"
},
4
:
{
name
:
"APP"
}
}
const
TemplateItem
:
React
.
FC
<
TemplateItemPropsType
>
=
(
props
)
=>
{
const
{
templateInfo
,
type
}
=
props
const
intl
=
useIntl
()
const
Environment_Status
=
{
0
:
{
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_0'
})
},
1
:
{
name
:
"web"
},
2
:
{
name
:
"H5"
},
3
:
{
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_3'
})
},
4
:
{
name
:
"APP"
}
}
return
(
<
div
className=
{
styles
.
template_item
}
>
<
div
className=
{
styles
.
img_box
}
style=
{
{
backgroundImage
:
`url(${templateInfo.templatePicUrl})`
}
}
>
<
div
className=
{
styles
.
img_box_mask
}
>
<
Link
to=
{
`/memberCenter/ownMallAbility/ownMallManager/template/detail?type=${type}&id=${templateInfo.id}`
}
className=
{
styles
.
detail_btn
}
>
查看详情
</
Link
>
<
Link
to=
{
`/memberCenter/ownMallAbility/ownMallManager/template/detail?type=${type}&id=${templateInfo.id}`
}
className=
{
styles
.
detail_btn
}
>
{
intl
.
formatMessage
({
id
:
'common.button.view.details'
})
}
</
Link
>
</
div
>
<
div
className=
{
cx
(
styles
.
type_tag
,
templateInfo
.
environment
===
2
?
styles
.
h5
:
''
)
}
>
{
Environment_Status
[
templateInfo
.
environment
].
name
}
</
div
>
</
div
>
...
...
@@ -43,24 +43,24 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
<
div
className=
{
styles
.
template_info_name
}
>
<
span
>
{
templateInfo
.
templateName
}
</
span
>
{
templateInfo
.
isDefault
&&
<
div
className=
{
styles
.
tag
}
>
默认模板
</
div
>
templateInfo
.
isDefault
&&
<
div
className=
{
styles
.
tag
}
>
{
intl
.
formatMessage
({
id
:
'shop.template.tag.default'
})
}
</
div
>
}
</
div
>
<
div
className=
{
cx
(
styles
.
template_info_content
,
type
===
'goods'
?
styles
.
goods
:
''
)
}
>
<
div
className=
{
styles
.
template_info_content_text_wrap
}
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用站点:
</
label
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.siteName'
})
}
</
label
>
<
span
>
{
templateInfo
.
siteName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用商城:
</
label
>
<
label
>
{
intl
.
formatMessage
({
id
:
'shop.template.form.label.shopName'
})
}
</
label
>
<
span
>
{
templateInfo
.
shopName
}
</
span
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
template_item_btn
,
templateInfo
.
use
===
1
?
styles
.
active
:
''
)
}
>
<
PlayCircleOutlined
/>
<
label
>
{
templateInfo
.
use
===
1
?
'启用中'
:
'启用'
}
</
label
>
<
label
>
{
templateInfo
.
use
===
1
?
intl
.
formatMessage
({
id
:
'shop.template.button.state.enabling'
})
:
intl
.
formatMessage
({
id
:
'shop.template.button.state.enable'
})
}
</
label
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/ownMall/ownMallManager/components/useModal/index.tsx
View file @
8c744b25
import
React
from
'react'
import
{
Modal
,
Form
,
Select
,
Checkbox
}
from
'antd'
import
{
Modal
}
from
'antd'
import
styles
from
'./index.less'
import
cx
from
'classnames'
import
detailInfo
from
'@/pages/logistics/components/orderSearchDetail'
import
{
useIntl
}
from
'umi'
interface
UseModalPropsType
{
visible
:
boolean
;
...
...
@@ -15,7 +14,7 @@ interface UseModalPropsType {
const
UseModal
:
React
.
FC
<
UseModalPropsType
>
=
(
props
)
=>
{
const
{
visible
,
onOk
,
onCancel
,
title
,
dataInfo
=
{},
confirmLoading
=
false
}
=
props
const
intl
=
useIntl
()
return
(
<
Modal
...
...
@@ -31,27 +30,26 @@ const UseModal: React.FC<UseModalPropsType> = (props) => {
dataInfo
.
inUseTemplateName
?
(
<>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您选择的站点
</
span
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content1'
})
}
</
span
>
<
label
>
{
dataInfo
.
siteName
}
-
{
dataInfo
.
shopName
}
</
label
>
<
span
>
现在使用的模板是
</
span
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content2'
})
}
</
span
>
<
label
>
“
{
dataInfo
.
inUseTemplateName
}
”
</
label
>
<
span
>
模板
,
</
span
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content3'
})
}
,
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
text_line
,
styles
.
use
)
}
>
<
span
>
您是否使用
</
span
>
<
label
>
”
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
来替换您正在使用的模板
</
span
>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content4'
})
}
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content5'
})
}
</
span
>
</
div
>
</>
)
:
(
<
div
className=
{
cx
(
styles
.
text_line
)
}
>
<
span
>
您是否使用
</
span
>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content4'
})
}
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
模板
?
</
span
>
<
span
>
{
intl
.
formatMessage
({
id
:
'shop.tempalte.modal.use.content3'
})
}
?
</
span
>
</
div
>
)
}
</
Modal
>
)
}
...
...
src/pages/ownMall/ownMallManager/ownMallAboutUs/constant.ts
deleted
100644 → 0
View file @
1bd26ba0
export
const
PAGE_TYPE
=
{
1
:
'首页'
,
2
:
'关于我们'
,
3
:
'行情资讯'
}
export
const
PAGE_TYPE_OPTIONS
=
[
{
label
:
'首页'
,
value
:
1
},
{
label
:
'关于我们'
,
value
:
2
},
{
label
:
'行情资讯'
,
value
:
3
},
]
\ No newline at end of file
src/pages/ownMall/ownMallManager/ownMallAboutUs/constant.tsx
0 → 100644
View file @
8c744b25
import
{
FormattedMessage
}
from
'umi'
export
const
PAGE_TYPE
=
{
1
:
<
FormattedMessage
id
=
'own.constant.page.type_1'
/>
,
2
:
<
FormattedMessage
id
=
'own.constant.page.type_2'
/>
,
3
:
<
FormattedMessage
id
=
'own.constant.page.type_3'
/>
,
}
export
const
PAGE_TYPE_OPTIONS
=
[
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_1'
/>,
value
:
1
},
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_2'
/>,
value
:
2
},
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_3'
/>,
value
:
3
},
]
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
View file @
8c744b25
import
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Form
,
Button
,
Card
,
Select
,
Input
,
Tooltip
,
Typography
,
Row
,
Col
,
message
}
from
'antd'
import
RequireItem
from
'@/components/RequireItem'
import
{
Prompt
}
from
'umi'
import
{
Prompt
,
useIntl
,
FormattedMessage
}
from
'umi'
import
{
CopyOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
import
{
validatorByte
}
from
'@/utils/regExp'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -30,15 +30,15 @@ const otherLayout: any = {
}
const
tabLink
=
[
{
id
:
'1'
,
title
:
'基本信息'
},
{
id
:
'2'
,
title
:
'厂房照片'
},
{
id
:
'3'
,
title
:
'资质荣誉'
},
{
id
:
'4'
,
title
:
'宣传画册'
},
{
id
:
'1'
,
title
:
<
FormattedMessage
id=
'own.about.tab.item_1'
/>
},
{
id
:
'2'
,
title
:
<
FormattedMessage
id=
'own.about.tab.item_2'
/>
},
{
id
:
'3'
,
title
:
<
FormattedMessage
id=
'own.about.tab.item_3'
/>
},
{
id
:
'4'
,
title
:
<
FormattedMessage
id=
'own.about.tab.item_4'
/>
},
]
const
handleCopyLinke
=
(
link
:
string
)
=>
{
if
(
copy
(
link
))
{
message
.
success
(
'复制成功!'
)
message
.
success
(
<
FormattedMessage
id=
"shop.option.copy.success"
/>
)
}
}
...
...
@@ -60,6 +60,7 @@ const OwnMallAboutUs = () => {
const
[
allMallList
,
setAllMallList
]
=
useState
<
any
[]
>
([])
const
[
selectCityData
,
setSelectCityData
]
=
useState
<
any
>
([
defaultCityData
])
const
[
mallUrl
,
setMallUrl
]
=
useState
<
string
>
()
const
intl
=
useIntl
()
const
getAlbumUrls
=
(
data
)
=>
{
setAlbumUrls
(
data
);
...
...
@@ -178,20 +179,20 @@ const OwnMallAboutUs = () => {
return
(
<
PageHeaderWrapper
title=
{
'自营商城'
}
title=
{
intl
.
formatMessage
({
id
:
'own.about.page.title'
})
}
className=
{
styles
.
container
}
extra=
{
[<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
onSave
}
loading=
{
saveLoading
}
>
保存
</
Button
>]
}
extra=
{
[<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
onSave
}
loading=
{
saveLoading
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>]
}
>
<
TabAnchor
tabLink=
{
tabLink
}
/>
<
Form
{
...
layout
}
form=
{
form
}
onValuesChange=
{
()
=>
setIsFormChange
(
true
)
}
>
<
Card
id=
'1'
title=
'基本信息'
style=
{
{
marginBottom
:
16
,
marginTop
:
16
}
}
>
<
Card
id=
'1'
title=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_1'
})
}
style=
{
{
marginBottom
:
16
,
marginTop
:
16
}
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'describe'
label=
{
<
RequireItem
label=
"公司简介"
isRequire=
{
true
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.form.label.describe'
})
}
isRequire=
{
true
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请输入公司简介"
},
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.form.describe.required'
})
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
400
)
}
]
}
>
...
...
@@ -201,9 +202,9 @@ const OwnMallAboutUs = () => {
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'memberShopAreas'
label=
{
<
RequireItem
label=
"业务覆盖地市"
isRequire=
{
true
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'own.about.form.memberShopAreas'
})
}
isRequire=
{
true
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请选择业务覆盖地市"
}
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'own.about.form.memberShopAreas.required'
})
}
]
}
>
<
CitySelect
...
...
@@ -216,15 +217,15 @@ const OwnMallAboutUs = () => {
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'自营商城链接'
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'own.about.form.mall.link'
})
}
>
<
Form
.
Item
name=
'shopId'
>
<
Select
placeholder=
'请选择自营商城'
allowClear
options=
{
allMallList
}
onChange=
{
selectMall
}
/>
<
Select
placeholder=
{
intl
.
formatMessage
({
id
:
'own.about.form.mall.link.select'
})
}
allowClear
options=
{
allMallList
}
onChange=
{
selectMall
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'url'
>
<
div
className=
{
styles
.
mallLink
}
>
<
span
>
当前自营商城链接
:
</
span
>
<
span
>
{
intl
.
formatMessage
({
id
:
'own.about.form.mall.link.current'
})
}
:
</
span
>
<
span
className=
{
styles
.
link
}
>
{
mallUrl
||
'-'
}
</
span
>
{
mallUrl
&&
<
Tooltip
title=
'复制'
><
CopyOutlined
className=
{
styles
.
copy_icon
}
onClick=
{
()
=>
handleCopyLinke
(
mallUrl
)
}
/></
Tooltip
>
}
{
mallUrl
&&
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'common.button.copay'
})
}
><
CopyOutlined
className=
{
styles
.
copy_icon
}
onClick=
{
()
=>
handleCopyLinke
(
mallUrl
)
}
/></
Tooltip
>
}
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
@@ -232,29 +233,29 @@ const OwnMallAboutUs = () => {
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'phone'
label=
{
<
RequireItem
label=
"联系电话"
/>
}
rules=
{
[{
max
:
20
,
message
:
'最多20个字符'
}]
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.form.label.phone'
})
}
/>
}
rules=
{
[{
max
:
20
,
message
:
`${intl.formatMessage({ id: 'common.text.most' })}20${intl.formatMessage({ id: 'common.unit.individual.character' })}`
}]
}
>
<
Input
placeholder=
"请输入联系电话"
/>
<
Input
placeholder=
{
intl
.
formatMessage
({
id
:
'shop.form.label.phone.placeholder'
})
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'address'
label=
{
<
RequireItem
label=
"详细地址"
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.form.label.address'
})
}
/>
}
rules=
{
[
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
100
)
}
]
}
>
<
Input
placeholder=
"请输入详细地址"
/>
<
Input
placeholder=
{
intl
.
formatMessage
({
id
:
'shop.form.label.address.placeholder'
})
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Card
>
<
Card
id=
'2'
title=
'厂房照片'
style=
{
{
marginBottom
:
16
}
}
>
<
Card
id=
'2'
title=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_2'
})
}
style=
{
{
marginBottom
:
16
}
}
>
<
Form
.
Item
name=
'workshopPics'
label=
'厂房照片'
label=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_2'
})
}
{
...
otherLayout
}
>
<
ImgUpload
...
...
@@ -265,10 +266,10 @@ const OwnMallAboutUs = () => {
/>
</
Form
.
Item
>
</
Card
>
<
Card
id=
'3'
title=
'资质荣誉'
style=
{
{
marginBottom
:
16
}
}
>
<
Card
id=
'3'
title=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_3'
})
}
style=
{
{
marginBottom
:
16
}
}
>
<
Form
.
Item
name=
'honorPics'
label=
'资质荣誉'
label=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_3'
})
}
{
...
otherLayout
}
>
<
ImgUpload
...
...
@@ -279,10 +280,10 @@ const OwnMallAboutUs = () => {
/>
</
Form
.
Item
>
</
Card
>
<
Card
id=
'4'
title=
'宣传画册'
style=
{
{
marginBottom
:
16
}
}
>
<
Card
id=
'4'
title=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_4'
})
}
style=
{
{
marginBottom
:
16
}
}
>
<
Form
.
Item
name=
'albumUrls'
label=
'宣传画册'
label=
{
intl
.
formatMessage
({
id
:
'own.about.tab.item_4'
})
}
{
...
otherLayout
}
wrapperCol=
{
{
span
:
12
}
}
>
...
...
@@ -297,7 +298,7 @@ const OwnMallAboutUs = () => {
</
Form
.
Item
>
</
Card
>
</
Form
>
<
Prompt
when=
{
isFormChange
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
<
Prompt
when=
{
isFormChange
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
})
}
/>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/ownMall/ownMallManager/ownMallConfigure/constant.ts
→
src/pages/ownMall/ownMallManager/ownMallConfigure/constant.ts
x
View file @
8c744b25
import
{
FormattedMessage
}
from
'umi'
/**
* 商城类型
*/
export
const
MALL_TYPE
=
{
1
:
'企业商城'
,
2
:
'积分商城'
,
3
:
'渠道商城'
,
4
:
'渠道自有商城'
,
5
:
'渠道积分商城'
,
6
:
'采购门户'
,
7
:
'物流服务门户'
,
8
:
'加工服务门户'
,
9
:
'行情资讯门户'
1
:
<
FormattedMessage
id
=
'own.mall.type_1'
/>
,
2
:
<
FormattedMessage
id
=
'own.mall.type_2'
/>
,
3
:
<
FormattedMessage
id
=
'own.mall.type_3'
/>
,
4
:
<
FormattedMessage
id
=
'own.mall.type_4'
/>
,
5
:
<
FormattedMessage
id
=
'own.mall.type_5'
/>
,
6
:
<
FormattedMessage
id
=
'own.mall.type_6'
/>
,
7
:
<
FormattedMessage
id
=
'own.mall.type_7'
/>
,
8
:
<
FormattedMessage
id
=
'own.mall.type_8'
/>
,
9
:
<
FormattedMessage
id
=
'own.mall.type_9'
/>
,
}
/**
...
...
@@ -19,8 +21,8 @@ export const MALL_TYPE = {
export
const
MALL_ENV
=
{
1
:
'WEB'
,
2
:
'H5'
,
3
:
'小程序'
,
4
:
'APP'
3
:
<
FormattedMessage
id
=
'shop.template.environment.status_3'
/>
,
4
:
'APP'
}
/**
...
...
@@ -30,7 +32,7 @@ export const MALL_ENV = {
1
:
'#007BFC'
,
2
:
'#007BFC'
,
3
:
'#EB9B00'
,
4
:
'#00A98F'
4
:
'#00A98F'
}
/**
...
...
@@ -40,31 +42,31 @@ export const MALL_ENV = {
1
:
'#E9F3FF'
,
2
:
'#E9F3FF'
,
3
:
'#FFF8EB'
,
4
:
'#EBF9F6'
4
:
'#EBF9F6'
}
/**
* 商城属性
*/
*/
export
const
MALL_PROPERTY
=
{
1
:
'B端商城'
,
2
:
'C端商城 '
,
3
:
'B端自营商城'
,
4
:
'C端自营商城'
1
:
<
FormattedMessage
id
=
'own.mall.property_1'
/>
,
2
:
<
FormattedMessage
id
=
'own.mall.property_2'
/>
,
3
:
<
FormattedMessage
id
=
'own.mall.property_3'
/>
,
4
:
<
FormattedMessage
id
=
'own.mall.property_4'
/>
,
}
/**
* 是否默认
*/
*/
export
const
IS_DEFAULT
=
{
0
:
'否'
,
1
:
'是 '
,
0
:
<
FormattedMessage
id
=
'common.button.no'
/>
,
1
:
<
FormattedMessage
id
=
'common.button.yes'
/>
,
}
/**
* 状态
*/
*/
export
const
STATE_TYPE
=
{
0
:
'无效'
,
1
:
'有效 '
,
}
\ No newline at end of file
0
:
<
FormattedMessage
id
=
'common.status.invalid'
/>
,
1
:
<
FormattedMessage
id
=
'common.status.effective'
/>
,
}
src/pages/ownMall/ownMallManager/ownMallConfigure/index.tsx
View file @
8c744b25
import
{
useRef
,
useState
,
useEffect
}
from
'react'
import
{
Image
,
Button
,
Form
,
Spin
,
Row
,
Col
,
Switch
,
Space
,
Input
,
Empty
}
from
'antd'
;
import
{
FormOutlined
}
from
'@ant-design/icons'
;
import
{
useIntl
}
from
'umi'
import
{
MALL_ENV
,
MALL_PROPERTY
,
ENV_COLOR
,
ENV_BG_COLOR
}
from
'./constant'
import
{
validatorByte
,
validatorAllTrim
}
from
'@/utils/regExp'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -15,6 +16,8 @@ const OwnMallConfigure = () => {
const
[
form
]
=
Form
.
useForm
()
const
intl
=
useIntl
()
const
[
mallList
,
setMallList
]
=
useState
<
any
[]
>
([])
const
[
logoCache
,
setLogoCache
]
=
useState
<
string
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -112,7 +115,7 @@ const OwnMallConfigure = () => {
item
.
isEdit
?
<
Form
.
Item
name=
'logoUrl'
rules=
{
[{
required
:
true
,
message
:
"请上传商城LOGO"
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'own_configure.form.logoUrl.required'
})
}]
}
>
<
UploadImage
imgUrl=
{
logoCache
}
...
...
@@ -134,9 +137,9 @@ const OwnMallConfigure = () => {
<
Form
.
Item
name=
'name'
rules=
{
[
{
required
:
true
,
message
:
'请填写商城名称'
},
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'own_configure.form.name.required'
})
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
40
)
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorAllTrim
(
v
,
c
,
'商城名称'
)
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorAllTrim
(
v
,
c
,
intl
.
formatMessage
({
id
:
'own_configure.form.mallname'
})
)
},
]
}
>
<
Input
/>
...
...
@@ -154,7 +157,7 @@ const OwnMallConfigure = () => {
</
Row
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
styles
.
title
}
>
商城描述
:
</
div
>
<
div
className=
{
styles
.
title
}
>
{
intl
.
formatMessage
({
id
:
'own_configure.form.describe'
})
}
:
</
div
>
{
item
.
isEdit
?
<
Form
.
Item
...
...
@@ -170,11 +173,11 @@ const OwnMallConfigure = () => {
}
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
styles
.
title
}
>
商城地址
:
</
div
>
<
div
className=
{
styles
.
title
}
>
{
intl
.
formatMessage
({
id
:
'own_configure.form.url'
})
}
:
</
div
>
<
div
><
a
href=
{
item
.
url
}
target=
"_blank"
>
{
item
.
url
}
</
a
></
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
styles
.
title
}
>
默认商城
:
</
div
>
<
div
className=
{
styles
.
title
}
>
{
intl
.
formatMessage
({
id
:
'own_configure.form.isDefault'
})
}
:
</
div
>
<
div
><
Switch
checked=
{
item
.
isDefault
===
1
}
onChange=
{
()
=>
handleDefault
(
item
)
}
/></
div
>
</
Col
>
<
div
className=
{
styles
.
btns
}
>
...
...
@@ -182,8 +185,8 @@ const OwnMallConfigure = () => {
item
.
isEdit
?
<
div
className=
{
styles
.
btnEdit
}
>
<
Space
size=
{
16
}
>
<
Button
onClick=
{
()
=>
showEdit
(
item
,
false
)
}
>
取消
</
Button
>
<
Button
type=
'primary'
onClick=
{
()
=>
onEdit
(
item
.
id
)
}
loading=
{
saveLoading
}
>
保存
</
Button
>
<
Button
onClick=
{
()
=>
showEdit
(
item
,
false
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.cancel'
})
}
</
Button
>
<
Button
type=
'primary'
onClick=
{
()
=>
onEdit
(
item
.
id
)
}
loading=
{
saveLoading
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
Space
>
</
div
>
:
...
...
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
View file @
8c744b25
...
...
@@ -9,7 +9,7 @@
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
{
history
,
Prompt
,
useIntl
,
FormattedMessage
}
from
'umi'
;
import
{
QuestionCircleOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
validatorByte
}
from
'@/utils/regExp'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
...
...
@@ -29,8 +29,8 @@ const layout: any = {
}
const
tabLink
=
[
{
id
:
'1'
,
title
:
'基本信息'
},
{
id
:
'2'
,
title
:
'SEO设置'
},
{
id
:
'1'
,
title
:
<
FormattedMessage
id=
'shop.seo.tab.basic'
/>
},
{
id
:
'2'
,
title
:
<
FormattedMessage
id=
'shop.seo.tab.seo'
/>
},
]
const
SeoAdd
=
()
=>
{
...
...
@@ -38,13 +38,15 @@ const SeoAdd = () => {
const
{
query
:
{
id
},
pathname
}
=
history
.
location
;
const
isView
=
pathname
.
indexOf
(
'view'
)
>
0
const
title
=
id
?
isView
?
'查看SEO'
:
'修改SEO'
:
'新增SEO'
const
title
=
id
?
isView
?
<
FormattedMessage
id=
'own.seo.check'
/>
:
<
FormattedMessage
id=
'own.seo.edit'
/>
:
<
FormattedMessage
id=
'own.seo.add'
/>
const
[
form
]
=
Form
.
useForm
()
const
[
saveLoading
,
setSaveLoading
]
=
useState
<
boolean
>
(
false
)
const
[
isFormChange
,
setIsFormChange
]
=
useState
<
boolean
>
(
false
)
const
intl
=
useIntl
()
// 提交
const
onSave
=
()
=>
{
form
.
validateFields
().
then
(
values
=>
{
...
...
@@ -84,25 +86,25 @@ const SeoAdd = () => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'common.button.back'
})
}
/>
}
title=
{
title
}
className=
{
styles
.
container
}
extra=
{
!
isView
?
[<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
onSave
}
loading=
{
saveLoading
}
>
保存
</
Button
>]
[<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
onSave
}
loading=
{
saveLoading
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>]
:
null
}
>
<
TabAnchor
tabLink=
{
tabLink
}
/>
<
Form
{
...
layout
}
form=
{
form
}
onValuesChange=
{
()
=>
setIsFormChange
(
true
)
}
>
<
Card
id=
'1'
title=
'基本信息'
style=
{
{
marginBottom
:
16
,
marginTop
:
16
}
}
>
<
Card
id=
'1'
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.tab.basic'
})
}
style=
{
{
marginBottom
:
16
,
marginTop
:
16
}
}
>
<
Row
gutter=
{
16
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'type'
label=
{
<
RequireItem
label=
"页面类型"
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请选择页面类型"
}]
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'own.seo.form.type'
})
}
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'own.seo.form.type.required'
})
}]
}
>
<
Select
options=
{
PAGE_TYPE_OPTIONS
}
disabled=
{
isView
}
/>
</
Form
.
Item
>
...
...
@@ -110,45 +112,45 @@ const SeoAdd = () => {
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'link'
label=
{
<
RequireItem
label=
"访问链接"
brief=
{
<
Tooltip
placement=
"top"
title=
"访问该页面的链接"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.link'
})
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.link.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
>
<
Input
addonBefore=
{
<
Typography
.
Text
type=
'secondary'
>
http://
</
Typography
.
Text
>
}
disabled=
{
isView
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Card
>
<
Card
id=
'2'
title=
'SEO设置'
>
<
Card
id=
'2'
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.tab.seo'
})
}
>
<
Row
gutter=
{
16
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'title'
label=
{
<
RequireItem
label=
"标题"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面title标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请输入标题"
},
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.title.required'
})
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
100
)
}
]
}
>
<
Input
placeholder=
'最长100个字符,50个汉字'
disabled=
{
isView
}
/>
<
Input
placeholder=
{
`${intl.formatMessage({id: 'common.text.longest'})}100${intl.formatMessage({id: 'common.unit.individual.character'})}, 50${intl.formatMessage({id: 'common.unit.individual.chinese'})}`
}
disabled=
{
isView
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'description'
label=
{
<
RequireItem
label=
"描述"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Description标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.description'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.description.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请输入描述"
},
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.description.required'
})
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
400
)
}
]
}
>
<
Input
.
TextArea
rows=
{
1
}
placeholder=
"最长400个字符,200个汉字"
disabled=
{
isView
}
/>
<
Input
.
TextArea
rows=
{
1
}
placeholder=
{
`${intl.formatMessage({id: 'common.text.longest'})}400${intl.formatMessage({id: 'common.unit.individual.character'})}, 200${intl.formatMessage({id: 'common.unit.individual.chinese'})}`
}
disabled=
{
isView
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'keywords'
label=
{
<
RequireItem
label=
"关键字"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.keywords'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.keywords.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[
{
required
:
true
,
message
:
"请输入关键字"
},
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.keywords.required'
})
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
200
)
}
]
}
>
...
...
@@ -158,7 +160,7 @@ const SeoAdd = () => {
</
Row
>
</
Card
>
</
Form
>
<
Prompt
when=
{
isFormChange
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
<
Prompt
when=
{
isFormChange
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
})
}
/>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/ownMall/ownMallManager/ownMallSeo/constant.ts
deleted
100644 → 0
View file @
1bd26ba0
export
const
PAGE_TYPE
=
{
1
:
'首页'
,
2
:
'关于我们'
,
3
:
'行情资讯'
}
export
const
PAGE_TYPE_OPTIONS
=
[
{
label
:
'首页'
,
value
:
1
},
{
label
:
'关于我们'
,
value
:
2
},
{
label
:
'行情资讯'
,
value
:
3
},
]
\ No newline at end of file
src/pages/ownMall/ownMallManager/ownMallSeo/constant.tsx
0 → 100644
View file @
8c744b25
import
{
FormattedMessage
}
from
'umi'
export
const
PAGE_TYPE
=
{
1
:
<
FormattedMessage
id
=
'own.constant.page.type_1'
/>
,
2
:
<
FormattedMessage
id
=
'own.constant.page.type_2'
/>
,
3
:
<
FormattedMessage
id
=
'own.constant.page.type_3'
/>
,
}
export
const
PAGE_TYPE_OPTIONS
=
[
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_1'
/>,
value
:
1
},
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_2'
/>,
value
:
2
},
{
label
:
<
FormattedMessage
id=
'own.constant.page.type_3'
/>,
value
:
3
},
]
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
View file @
8c744b25
import
React
,
{
useRef
}
from
'react'
;
import
{
Card
,
Button
,
Popconfirm
,
Row
,
Col
,
message
}
from
'antd'
import
{
Card
,
Button
,
Popconfirm
,
Row
,
Col
}
from
'antd'
import
{
ISchema
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
history
}
from
'umi'
import
{
history
,
useIntl
,
FormattedMessage
}
from
'umi'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
EyePreview
from
'@/components/EyePreview'
...
...
@@ -41,7 +41,7 @@ const schema: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'页面名称'
,
placeholder
:
<
FormattedMessage
id=
'shop.seo.table.name'
/>
,
advanced
:
false
}
}
...
...
@@ -57,13 +57,14 @@ const controllerBtns = <Row>
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
新建
<
FormattedMessage
id=
'common.button.add'
/>
</
Button
>
</
Col
>
</
Row
>
const
SeoList
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
intl
=
useIntl
()
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
...
...
@@ -71,7 +72,7 @@ const SeoList: React.FC<{}> = () => {
key
:
'id'
,
},
{
title
:
'页面名称'
,
title
:
intl
.
formatMessage
({
id
:
'shop.seo.table.name'
})
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -81,14 +82,14 @@ const SeoList: React.FC<{}> = () => {
)
},
{
title
:
'访问链接'
,
title
:
intl
.
formatMessage
({
id
:
'shop.seo.table.link'
})
,
align
:
'center'
,
dataIndex
:
'link'
,
key
:
'link'
,
render
:
(
text
)
=>
`http://
${
text
}
`
},
{
title
:
'状态'
,
title
:
intl
.
formatMessage
({
id
:
'shop.seo.table.status'
})
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -100,17 +101,17 @@ const SeoList: React.FC<{}> = () => {
)
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'common.table.action'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
_
,
record
)
=>
!
record
.
status
&&
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/ownMallAbility/ownMallManager/ownMallSeo/edit?id=${record.id}`
)
}
>
修改
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/ownMallAbility/ownMallManager/ownMallSeo/edit?id=${record.id}`
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.modify'
})
}
</
Button
>
<
Popconfirm
title=
"确定要执行这个操作?"
title=
{
intl
.
formatMessage
({
id
:
'common.tip.option.confirm'
})
}
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'common.button.delete'
})
}
</
Button
>
</
Popconfirm
>
</>
)
...
...
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
View file @
8c744b25
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
LayoutOutlined
,
EyeOutlined
,
PushpinOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
useIntl
}
from
'umi'
import
{
message
}
from
'antd'
import
DetailPage
from
'@/components/DetailPage'
import
UseModal
from
'../components/useModal'
...
...
@@ -22,6 +23,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
any
>
()
const
[
useModalVisible
,
setUseModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
const
intl
=
useIntl
()
useEffect
(()
=>
{
fetchDetail
()
...
...
@@ -65,7 +67,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
// 自营商城装修
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
&environment=
${
detailInfo
?.
environment
}
`
} else {
message.info(
"暂不支持该类型模板装修"
)
message.info(
intl.formatMessage({ id: 'shop.template.edit.tip' })
)
}
}
...
...
@@ -75,13 +77,13 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3 || detailInfo?.environment === 2) {
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
.
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
`
} else {
message.info(
"暂不支持该类型模板预览"
)
message.info(
intl.formatMessage({ id: 'shop.template.preview.tip' })
)
}
}
const handleCategoryJump = () => {
if (detailInfo?.environment === 1) {
message.info(
"暂不支持该类型模板装修"
)
message.info(
intl.formatMessage({ id: 'shop.template.edit.tip' })
)
return
}
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
categoryNavigation
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
.
shopId
}
&
isSelf
=
1
`
...
...
@@ -89,7 +91,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
return (
<DetailPage
title=
"查看模板"
title=
{intl.formatMessage({ id: 'shop.template.detail.title' })}
>
<div className={styles.template_detail}>
<div className={styles.template_info_wrap}>
...
...
@@ -98,51 +100,51 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<img src={detailInfo?.templatePicUrl} />
</div>
<div className={styles.template_info}>
<div className={styles.template_info_line}>
<label>
模板名称:
</label>
<div className={styles.template_info_line}>
<label>
{intl.formatMessage({ id: 'shop.template.form.label.templateName' })}
</label>
<span>{detailInfo?.templateName}</span>
</div>
<div className={styles.template_info_line}>
<label>
适用环境:
</label>
<label>
{intl.formatMessage({ id: 'shop.template.form.label.environment' })}
</label>
<span>{Environment_Status[detailInfo?.environment]}</span>
</div>
<div className={styles.template_info_line}>
<label>模板描述:
</label>
<label>{intl.formatMessage({ id: 'shop.template.form.label.templateDescribe' })}
</label>
<span>{detailInfo?.templateDescribe}</span>
</div>
<div className={styles.template_info_line}>
<label>使用站点:
</label>
<label>{intl.formatMessage({ id: 'shop.template.form.label.siteName' })}
</label>
<span>{detailInfo?.siteName}</span>
</div>
<div className={styles.template_info_line}>
<label>
使用商城:
</label>
<label>
{intl.formatMessage({ id: 'shop.template.form.label.shopName' })}
</label>
<span>{detailInfo?.shopName}</span>
</div>
</div>
</div>
<div className={styles.btn} onClick={() => handleLinkPreview()}>
<EyeOutlined />
<label>
预览
</label>
<label>
{intl.formatMessage({ id: 'common.button.preview' })}
</label>
</div>
<div className={cx(styles.btn, styles.fit)} onClick={() => handleLinkEdit()}>
<LayoutOutlined />
<label>
商城装修
</label>
<label>
{intl.formatMessage({ id: 'own.template.button.mall.edit' })}
</label>
</div>
{
(detailInfo?.environment === 4 || detailInfo?.environment === 3) && (
<div className={cx(styles.btn, styles.fit)} onClick={() => handleCategoryJump()}>
<LayoutOutlined />
<label>
品类导航页装修
</label>
<label>
{intl.formatMessage({ id: 'own.template.button.mall.category.edit' })}
</label>
</div>
)
}
<div className={cx(styles.btn, detailInfo?.use === 1 ? styles.use : '')} onClick={() => detailInfo?.use !== 1 ? setUseModalVisible(true) : {}}>
<PushpinOutlined />
<label>{detailInfo?.use === 1 ?
'使用中' : '使用'
}</label>
<label>{detailInfo?.use === 1 ?
intl.formatMessage({ id: 'shop.template.button.state.using' }) : intl.formatMessage({ id: 'shop.template.button.state.use' })
}</label>
</div>
<UseModal
title=
"使用自营商城模板"
title=
{intl.formatMessage({ id: 'own.template.modal.title.use' })}
visible={useModalVisible}
dataInfo={detailInfo}
confirmLoading={confirmLoading}
...
...
src/pages/shop/components/templateItem/index.tsx
View file @
8c744b25
...
...
@@ -14,7 +14,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
const
intl
=
useIntl
()
const
Environment_Status
=
{
0
:
{
name
:
"所有"
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_0'
})
},
1
:
{
name
:
"web"
...
...
@@ -23,7 +23,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
name
:
"H5"
},
3
:
{
name
:
"小程序"
name
:
intl
.
formatMessage
({
id
:
'shop.template.environment.status_3'
})
},
4
:
{
name
:
"APP"
...
...
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