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
8ed54ed9
Commit
8ed54ed9
authored
Nov 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改PublicApi引入方式
parent
7a1fa98b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
114 additions
and
139 deletions
+114
-139
index.tsx
src/pages/channel/channelInfo/index.tsx
+6
-5
add.tsx
src/pages/channel/channelSeo/add.tsx
+3
-3
index.tsx
src/pages/channel/channelSeo/index.tsx
+4
-4
index.tsx
src/pages/channel/channelTemplate/index.tsx
+2
-2
index.tsx
src/pages/channel/components/useModal/index.tsx
+1
-2
detail.tsx
src/pages/channel/memberList/detail.tsx
+7
-30
index.tsx
src/pages/channel/memberList/index.tsx
+4
-6
index.tsx
src/pages/channel/templateDetail/index.tsx
+3
-3
index.tsx
src/pages/editor/channelEdit/index.tsx
+10
-8
index.tsx
src/pages/shop/components/templateItem/index.tsx
+0
-1
index.tsx
src/pages/shop/components/useModal/index.tsx
+57
-58
index.tsx
src/pages/shop/shopInfo/index.tsx
+5
-4
add.tsx
src/pages/shop/shopSeo/add.tsx
+3
-3
index.tsx
src/pages/shop/shopSeo/index.tsx
+4
-4
index.tsx
src/pages/shop/shopTemplate/index.tsx
+2
-3
index.tsx
src/pages/shop/templateDetail/index.tsx
+3
-3
No files found.
src/pages/channel/channelInfo/index.tsx
View file @
8ed54ed9
...
...
@@ -6,14 +6,15 @@ import { inject } from 'mobx-react'
import
{
QuestionCircleOutlined
,
DeleteOutlined
,
CopyOutlined
,
LinkOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
import
CitySelect
from
'@/components/CitySelect'
import
RequireItem
from
'@/components/RequireItem'
import
{
PublicApi
}
from
'@/services/api'
import
UploadImage
from
'@/components/UploadImage'
import
{
REQUEST_HEADER
,
UPLOAD_TYPE
,
TOP_DOMAIN
,
CHANNEL_CENTER_URL
,
ICHANNEL_CENTER_URL
}
from
'@/constants'
import
{
UPLOAD_TYPE
,
CHANNEL_CENTER_URL
,
ICHANNEL_CENTER_URL
}
from
'@/constants'
import
copy
from
'copy-to-clipboard'
import
cx
from
'classnames'
import
styles
from
'./index.less'
import
{
isEmpty
}
from
'@formily/antd/esm/shared'
import
{
getAuth
}
from
'@/utils/auth'
import
{
getTemplateWebMemberChannelWebFindCurrMemberChannel
,
postTemplateWebMemberChannelWebSaveCurrMemberChannel
}
from
'@/services/TemplateV2Api'
import
{
getManageShopFindByDoorType
}
from
'@/services/PlatformApi'
interface
ShopInfoPropsType
{
SiteStore
:
{
...
...
@@ -86,7 +87,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const
params
:
any
=
{
doorType
:
2
}
PublicApi
.
getManageShopFindByDoorType
(
params
).
then
(
res
=>
{
getManageShopFindByDoorType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setAllMallList
(
res
.
data
)
}
...
...
@@ -101,7 +102,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const
param
:
any
=
{
memberId
}
PublicApi
.
getTemplateWebMemberChannelWebFindCurrMemberChannel
(
param
).
then
(
res
=>
{
getTemplateWebMemberChannelWebFindCurrMemberChannel
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
if
(
res
.
code
===
1000
)
{
if
(
data
)
{
...
...
@@ -210,7 +211,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
address
:
value
.
address
,
}
PublicApi
.
postTemplateWebMemberChannelWebSaveCurrMemberChannel
(
params
).
then
(
res
=>
{
postTemplateWebMemberChannelWebSaveCurrMemberChannel
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchShopInfo
()
setFormIsHalfFilledOut
(
false
)
...
...
src/pages/channel/channelSeo/add.tsx
View file @
8ed54ed9
...
...
@@ -6,7 +6,7 @@ import ReutrnEle from '@/components/ReturnEle';
import
RequireItem
from
'@/components/RequireItem'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
CHANNEL_SELECT_NAME
,
DOORTYPE
}
from
'@/constants/procurement'
;
import
{
PublicApi
}
from
'@/services/a
pi'
;
import
{
getTemplateWebSeoWebGet
,
postTemplateWebSeoWebAdd
,
postTemplateWebSeoWebUpdate
}
from
'@/services/TemplateV2A
pi'
;
const
{
TabPane
}
=
Tabs
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -27,7 +27,7 @@ const ChannelSeoAdded = () => {
const
handleSave
=
(
e
:
any
)
=>
{
e
.
preventDefault
()
const
fetch
=
(
link
===
'add'
?
PublicApi
.
postTemplateWebSeoWebAdd
:
PublicApi
.
postTemplateWebSeoWebUpdate
);
const
fetch
=
(
link
===
'add'
?
postTemplateWebSeoWebAdd
:
postTemplateWebSeoWebUpdate
);
form
.
validateFields
().
then
((
value
:
any
)
=>
{
const
type
:
number
=
value
.
type
;
const
link
:
string
=
value
.
link
;
...
...
@@ -55,7 +55,7 @@ const ChannelSeoAdded = () => {
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getTemplateWebSeoWebGet
({
id
}).
then
(
res
=>
{
getTemplateWebSeoWebGet
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
src/pages/channel/channelSeo/index.tsx
View file @
8ed54ed9
...
...
@@ -5,13 +5,13 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import
{
Card
,
Row
,
Col
,
Button
,
Popconfirm
,
Typography
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
searchSelectGetSelectCategoryOptionEffect
}
from
'@/pages/transaction/effect/index'
;
import
{
PauseCircleOutlined
,
PlayCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getTemplateWebSeoWebPage
,
postTemplateWebSeoWebDelete
,
postTemplateWebSeoWebUpdateStatus
}
from
'@/services/TemplateV2Api'
;
const
ChannelSeo
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
...
...
@@ -19,7 +19,7 @@ const ChannelSeo = () => {
/** 修改状态 */
const
confirm
=
(
e
:
any
)
=>
{
const
status
=
e
.
status
===
1
?
0
:
1
;
PublicApi
.
postTemplateWebSeoWebUpdateStatus
({
id
:
e
.
id
,
status
}).
then
(
res
=>
{
postTemplateWebSeoWebUpdateStatus
({
id
:
e
.
id
,
status
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -28,7 +28,7 @@ const ChannelSeo = () => {
}
/** 删除 */
const
handleDelete
=
(
id
:
number
)
=>
{
PublicApi
.
postTemplateWebSeoWebDelete
({
id
}).
then
(
res
=>
{
postTemplateWebSeoWebDelete
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -109,7 +109,7 @@ const ChannelSeo = () => {
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getTemplateWebSeoWebPage
({
...
params
,
doorType
:
2
}).
then
(
res
=>
{
getTemplateWebSeoWebPage
({
...
params
,
doorType
:
2
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
src/pages/channel/channelTemplate/index.tsx
View file @
8ed54ed9
...
...
@@ -3,9 +3,9 @@ import { Row, Col, message } from 'antd'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplateWebPageTemplateWebFindAllShelfChannelTemplateResponse
}
from
'@/services/TemplateApi'
import
styles
from
'./index.less'
import
{
getTemplateWebPageTemplateWebFindAllShelfChannelTemplate
}
from
'@/services/TemplateV2Api'
const
ShopTemplate
:
React
.
FC
=
()
=>
{
...
...
@@ -16,7 +16,7 @@ const ShopTemplate: React.FC = () => {
},
[])
const
fetchAllShelfShopTemplate
=
()
=>
{
PublicApi
.
getTemplateWebPageTemplateWebFindAllShelfChannelTemplate
().
then
(
res
=>
{
getTemplateWebPageTemplateWebFindAllShelfChannelTemplate
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
else
{
...
...
src/pages/channel/components/useModal/index.tsx
View file @
8ed54ed9
import
React
from
'react'
import
{
Modal
,
Form
,
Select
,
Checkbox
}
from
'antd'
import
{
Modal
}
from
'antd'
import
styles
from
'./index.less'
import
detailInfo
from
'@/pages/logistics/components/orderSearchDetail'
interface
UseModalPropsType
{
visible
:
boolean
;
...
...
src/pages/channel/memberList/detail.tsx
View file @
8ed54ed9
import
React
,
{
useContext
,
useState
,
useEffect
,
useRef
,
useCallback
,
useMemo
,
}
from
'react'
;
import
{
Row
,
Col
,
Button
,
Form
,
Input
,
Space
,
Tabs
,
Checkbox
,
Badge
,
Card
,
Tag
,
Popconfirm
,
message
,
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
historyContainer
}
from
'@/hooks/useHistoryContainer'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
Search
from
'@/components/NiceForm/components/Search'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
;
import
TabTree
,
{
useTreeActions
,
createTreeActions
,
}
from
'@/components/TabTree'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
styled
from
'./index.less'
;
import
CheckboxTree
from
'@/components/CheckBoxTree'
;
import
{
useTreeData
}
from
'@/hooks/useTreeData'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
useLeavePage
}
from
'@/hooks/useLeavePage'
;
import
{
useMap
}
from
'@umijs/hooks'
;
import
FieldHeader
from
'@/components/FieldHeader'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
useTreeTabs
}
from
'@/hooks/useTreeTabs'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
StandardTable
}
from
'god'
;
import
ModalTable
from
'@/components/ModalTable'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getMemberAbilitySalesChannel
,
getMemberAbilitySalesChannelPage
,
getMemberAbilitySalesSelect
,
postMemberAbilitySalesChannelBind
,
postMemberAbilitySalesChannelUnbind
}
from
'@/services/MemberV2Api'
;
const
pageTitles
=
[
'新增业务员'
,
'编辑业务员'
,
'预览'
];
...
...
@@ -59,17 +41,12 @@ const TabFormErrors = props => {
);
};
const
fetchMenuData
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMemberRoleAuthTree
();
return
{
data
:
res
.
data
.
menus
};
};
const
TabsItem
=
Tabs
.
TabPane
;
const
formAction
=
createFormActions
();
const
fetchMemberAbilitySelect
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberAbilitySalesSelect
(
params
)
const
{
data
}
=
await
getMemberAbilitySalesSelect
(
params
)
return
data
}
...
...
@@ -94,7 +71,7 @@ const MemberDetail: React.FC<{}> = () => {
const
userInfo
=
formAction
.
getFieldValue
(
'userId'
)
if
(
userInfo
&&
userInfo
.
length
>
0
)
{
const
userId
=
userInfo
[
0
].
userId
const
{
data
,
code
}
=
await
PublicApi
.
getMemberAbilitySalesChannel
({
const
{
data
,
code
}
=
await
getMemberAbilitySalesChannel
({
userId
,
...
params
})
...
...
@@ -113,7 +90,7 @@ const MemberDetail: React.FC<{}> = () => {
},
[
id
])
const
fetchSaleChannel
=
async
()
=>
{
PublicApi
.
getMemberAbilitySalesChannel
({
getMemberAbilitySalesChannel
({
userId
:
id
,
current
:
'1'
,
pageSize
:
'20'
,
...
...
@@ -268,7 +245,7 @@ const MemberDetail: React.FC<{}> = () => {
]
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberAbilitySalesChannelPage
(
params
)
const
{
data
}
=
await
getMemberAbilitySalesChannelPage
(
params
)
return
data
}
...
...
@@ -322,7 +299,7 @@ const MemberDetail: React.FC<{}> = () => {
const
userInfo
=
formAction
.
getFieldValue
(
'userId'
)
const
userId
=
userInfo
[
0
].
userId
const
{
code
}
=
await
PublicApi
.
postMemberAbilitySalesChannelUnbind
({
const
{
code
}
=
await
postMemberAbilitySalesChannelUnbind
({
userId
,
relationIds
:
relationIds
})
...
...
@@ -347,7 +324,7 @@ const MemberDetail: React.FC<{}> = () => {
const
userInfo
=
formAction
.
getFieldValue
(
'userId'
)
if
(
userInfo
&&
userInfo
.
length
>
0
)
{
const
userId
=
userInfo
[
0
].
userId
const
result
=
await
PublicApi
.
postMemberAbilitySalesChannelBind
({
const
result
=
await
postMemberAbilitySalesChannelBind
({
userId
,
relationIds
:
tableData
.
map
(
v
=>
v
.
relationId
)
})
...
...
src/pages/channel/memberList/index.tsx
View file @
8ed54ed9
import
React
,
{
ReactNode
,
useRef
}
from
'react'
;
import
React
,
{
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
}
from
'antd'
;
import
{
...
...
@@ -6,14 +6,12 @@ import {
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
PublicApi
}
from
'@/services/api'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
STATUS_ENUM
}
from
'@/constants'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
getMemberAbilitySalesPage
,
postMemberAbilitySalesDelete
}
from
'@/services/MemberV2Api'
;
const
fetchData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberAbilitySalesPage
(
params
)
const
{
data
}
=
await
getMemberAbilitySalesPage
(
params
)
return
data
}
...
...
@@ -22,7 +20,7 @@ const ChannelMember: React.FC<{}> = () => {
const
deleteItem
=
async
(
record
)
=>
{
// 删除该项
await
PublicApi
.
postMemberAbilitySalesDelete
({
await
postMemberAbilitySalesDelete
({
userId
:
record
.
userId
})
ref
.
current
.
reload
()
...
...
src/pages/channel/templateDetail/index.tsx
View file @
8ed54ed9
...
...
@@ -4,9 +4,9 @@ import cx from 'classnames'
import
{
message
}
from
'antd'
import
DetailPage
from
'@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getTemplateWebPageTemplateWebFindChannelTemplateDetails
,
postTemplateWebPageTemplateWebUseChannelTemplate
}
from
'@/services/TemplateV2Api'
import
styles
from
'./index.less'
interface
TemplateDetailPropsType
{
...
...
@@ -38,7 +38,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
param
:
any
=
{
id
}
PublicApi
.
getTemplateWebPageTemplateWebFindChannelTemplateDetails
(
param
).
then
(
res
=>
{
getTemplateWebPageTemplateWebFindChannelTemplateDetails
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setShopType
(
getType
(
res
.
data
))
setDetailInfo
(
res
.
data
)
...
...
@@ -51,7 +51,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
*/
const
handleConfirmUse
=
()
=>
{
setConfirmLoading
(
true
)
PublicApi
.
postTemplateWebPageTemplateWebUseChannelTemplate
({
id
}).
then
(
res
=>
{
postTemplateWebPageTemplateWebUseChannelTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setUseModalVisible
(
false
)
fetchDetail
()
...
...
src/pages/editor/channelEdit/index.tsx
View file @
8ed54ed9
...
...
@@ -10,9 +10,11 @@ import { LAYOUT_TYPE } from '@/constants'
import
{
topBarConfig
,
headerConfig
,
mainNavConfig
,
horizontalWrap
,
channelCategoryConfig
,
bannerWrap
,
bannerAdvertConfig
,
interactAdvertConfig
,
channelQuickNavConfig
,
mallLayoutConfig
,
serviceAdvertConfig
,
CommonTitle2Config
,
CompanyInfoConfig
,
AlbumConfig
,
HonroPicConfig
,
InformationConfig
,
FooterConfig
}
from
'./defaultData'
import
Loading
from
'../components/Loading'
import
{
menuData
}
from
'./defaultMenu'
import
{
PublicApi
}
from
'@/services/api'
import
{
getAuth
}
from
'@/utils/auth'
import
styles
from
'./index.less'
import
{
getSearchShopChannelGetCustomerCategoryTree
}
from
'@/services/SearchV2Api'
;
import
{
getManageContentInformationFindAllByRecommendLabel
}
from
'@/services/PlatformApi'
;
import
{
getTemplateAdornWebChannelFindAdvertsByType
,
getTemplateAdornWebChannelFindAllFirstCategory
,
getTemplateAdornWebChannelMemberCategoryAdorn
,
getTemplateWebMemberChannelWebFindCurrMemberChannel
}
from
'@/services/TemplateV2Api'
;
interface
ChannelPreviewPropsType
{
location
:
{
...
...
@@ -57,7 +59,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateAdornWebChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
getTemplateAdornWebChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
...
...
@@ -78,7 +80,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const
headers
:
any
=
{
shopId
}
PublicApi
.
getTemplateAdornWebChannelFindAllFirstCategory
(
params
,
{
headers
}).
then
(
res
=>
{
getTemplateAdornWebChannelFindAllFirstCategory
(
params
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -98,7 +100,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
roleId
:
userInfo
.
memberRoleId
,
}
PublicApi
.
getTemplateAdornWebChannelMemberCategoryAdorn
(
param
).
then
(
res
=>
{
getTemplateAdornWebChannelMemberCategoryAdorn
(
param
).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
@@ -113,7 +115,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const
params
:
any
=
{
memberId
:
userInfo
.
memberId
}
PublicApi
.
getTemplateWebMemberChannelWebFindCurrMemberChannel
(
params
).
then
(
res
=>
{
getTemplateWebMemberChannelWebFindCurrMemberChannel
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -129,7 +131,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const
param
:
any
=
{
recommendLabel
:
1
}
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
(
param
).
then
(
res
=>
{
getManageContentInformationFindAllByRecommendLabel
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
leadNewsList
:
any
=
res
.
data
||
[]
if
(
leadNewsList
.
length
>=
2
)
{
...
...
@@ -153,7 +155,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const
fetchNewByLabel
=
(
label
:
string
)
=>
{
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
label
}).
then
((
res
:
{
code
:
number
;
data
:
unknown
})
=>
{
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
label
}).
then
((
res
:
{
code
:
number
;
data
:
unknown
})
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
...
...
@@ -230,7 +232,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
break
}
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
getSearchShopChannelGetCustomerCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
initCategoryData
(
res
.
data
))
}
...
...
src/pages/shop/components/templateItem/index.tsx
View file @
8ed54ed9
...
...
@@ -2,7 +2,6 @@ import React from 'react'
import
{
PlayCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateItemPropsType
{
...
...
src/pages/shop/components/useModal/index.tsx
View file @
8ed54ed9
import
React
from
'react'
import
{
Modal
,
Form
,
Select
,
Checkbox
}
from
'antd'
import
styles
from
'./index.less'
import
detailInfo
from
'@/pages/logistics/components/orderSearchDetail'
interface
UseModalPropsType
{
visible
:
boolean
;
onOk
:
Function
;
onCancel
:
Function
;
title
:
string
;
dataInfo
:
any
;
confirmLoading
?:
boolean
;
}
const
UseModal
:
React
.
FC
<
UseModalPropsType
>
=
(
props
)
=>
{
const
{
visible
,
onOk
,
onCancel
,
title
,
dataInfo
=
{},
confirmLoading
=
false
}
=
props
return
(
<
Modal
width=
{
576
}
title=
{
title
}
visible=
{
visible
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
onOk
()
}
centered
onCancel=
{
()
=>
onCancel
()
}
>
{
dataInfo
.
inUseTemplateName
?
(
<>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您选择的站点
</
span
>
<
label
>
{
dataInfo
.
siteName
}
-
{
dataInfo
.
shopName
}
</
label
>
<
span
>
现在使用的模板是
</
span
>
<
label
>
“
{
dataInfo
.
inUseTemplateName
}
”
</
label
>
<
span
>
模板,
</
span
>
</
div
>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您是否使用
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
模板,来替换您正在使用的模板
</
span
>
</
div
>
</>
)
:
(
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您是否使用
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
模板?
</
span
>
</
div
>
)
}
</
Modal
>
)
}
export
default
UseModal
import
React
from
'react'
import
{
Modal
}
from
'antd'
import
styles
from
'./index.less'
interface
UseModalPropsType
{
visible
:
boolean
;
onOk
:
Function
;
onCancel
:
Function
;
title
:
string
;
dataInfo
:
any
;
confirmLoading
?:
boolean
;
}
const
UseModal
:
React
.
FC
<
UseModalPropsType
>
=
(
props
)
=>
{
const
{
visible
,
onOk
,
onCancel
,
title
,
dataInfo
=
{},
confirmLoading
=
false
}
=
props
return
(
<
Modal
width=
{
576
}
title=
{
title
}
visible=
{
visible
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
onOk
()
}
centered
onCancel=
{
()
=>
onCancel
()
}
>
{
dataInfo
.
inUseTemplateName
?
(
<>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您选择的站点
</
span
>
<
label
>
{
dataInfo
.
siteName
}
-
{
dataInfo
.
shopName
}
</
label
>
<
span
>
现在使用的模板是
</
span
>
<
label
>
“
{
dataInfo
.
inUseTemplateName
}
”
</
label
>
<
span
>
模板,
</
span
>
</
div
>
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您是否使用
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
模板,来替换您正在使用的模板
</
span
>
</
div
>
</>
)
:
(
<
div
className=
{
styles
.
text_line
}
>
<
span
>
您是否使用
</
span
>
<
label
>
“
{
dataInfo
.
templateName
}
”
</
label
>
<
span
>
模板?
</
span
>
</
div
>
)
}
</
Modal
>
)
}
export
default
UseModal
src/pages/shop/shopInfo/index.tsx
View file @
8ed54ed9
...
...
@@ -6,7 +6,8 @@ import { inject } from 'mobx-react'
import
{
QuestionCircleOutlined
,
DeleteOutlined
,
CopyOutlined
,
UploadOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
import
CitySelect
from
'@/components/CitySelect'
import
RequireItem
from
'@/components/RequireItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
getTemplateWebMemberShopWebFindCurrMemberShop
,
postTemplateWebMemberShopWebSaveCurrMemberShop
}
from
'@/services/TemplateV2Api'
import
{
getManageShopFindByDoorType
}
from
'@/services/PlatformApi'
import
UploadImage
from
'@/components/UploadImage'
import
copy
from
'copy-to-clipboard'
import
cx
from
'classnames'
...
...
@@ -87,7 +88,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const
params
:
any
=
{
doorType
:
1
}
PublicApi
.
getManageShopFindByDoorType
(
params
).
then
(
res
=>
{
getManageShopFindByDoorType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setAllMallList
(
res
.
data
)
}
...
...
@@ -104,7 +105,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
roleId
:
memberRoleId
}
PublicApi
.
getTemplateWebMemberShopWebFindCurrMemberShop
(
param
).
then
(
res
=>
{
getTemplateWebMemberShopWebFindCurrMemberShop
(
param
).
then
(
res
=>
{
const
data
:
any
=
res
.
data
if
(
res
.
code
===
1000
)
{
if
(
data
)
{
...
...
@@ -216,7 +217,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
phone
:
value
.
phone
,
address
:
value
.
address
,
}
PublicApi
.
postTemplateWebMemberShopWebSaveCurrMemberShop
(
params
).
then
(
res
=>
{
postTemplateWebMemberShopWebSaveCurrMemberShop
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchShopInfo
()
setFormIsHalfFilledOut
(
false
)
...
...
src/pages/shop/shopSeo/add.tsx
View file @
8ed54ed9
...
...
@@ -6,7 +6,7 @@ import ReutrnEle from '@/components/ReturnEle';
import
RequireItem
from
'@/components/RequireItem'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
SELECT_NAME
,
DOORTYPE
}
from
'@/constants/procurement'
;
import
{
PublicApi
}
from
'@/services/a
pi'
;
import
{
getTemplateWebSeoWebGet
,
postTemplateWebSeoWebAdd
,
postTemplateWebSeoWebUpdate
}
from
'@/services/TemplateV2A
pi'
;
const
{
TabPane
}
=
Tabs
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -28,7 +28,7 @@ const ShopSeoAdded = () => {
const
handleSave
=
(
e
:
any
)
=>
{
e
.
preventDefault
()
const
fetch
=
(
link
===
'add'
?
PublicApi
.
postTemplateWebSeoWebAdd
:
PublicApi
.
postTemplateWebSeoWebUpdate
);
const
fetch
=
(
link
===
'add'
?
postTemplateWebSeoWebAdd
:
postTemplateWebSeoWebUpdate
);
form
.
validateFields
().
then
((
value
:
any
)
=>
{
const
type
:
number
=
value
.
type
;
const
link
:
string
=
value
.
link
;
...
...
@@ -56,7 +56,7 @@ const ShopSeoAdded = () => {
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getTemplateWebSeoWebGet
({
id
}).
then
(
res
=>
{
getTemplateWebSeoWebGet
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
src/pages/shop/shopSeo/index.tsx
View file @
8ed54ed9
...
...
@@ -5,13 +5,13 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import
{
Card
,
Row
,
Col
,
Button
,
Popconfirm
,
Typography
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
searchSelectGetSelectCategoryOptionEffect
}
from
'@/pages/transaction/effect/index'
;
import
{
PauseCircleOutlined
,
PlayCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getTemplateWebSeoWebPage
,
postTemplateWebSeoWebDelete
,
postTemplateWebSeoWebUpdateStatus
}
from
'@/services/TemplateV2Api'
;
const
ShopSeo
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
...
...
@@ -19,7 +19,7 @@ const ShopSeo = () => {
/** 修改状态 */
const
confirm
=
(
e
:
any
)
=>
{
const
status
=
e
.
status
===
1
?
0
:
1
;
PublicApi
.
postTemplateWebSeoWebUpdateStatus
({
id
:
e
.
id
,
status
}).
then
(
res
=>
{
postTemplateWebSeoWebUpdateStatus
({
id
:
e
.
id
,
status
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -28,7 +28,7 @@ const ShopSeo = () => {
}
/** 删除 */
const
handleDelete
=
(
id
:
number
)
=>
{
PublicApi
.
postTemplateWebSeoWebDelete
({
id
}).
then
(
res
=>
{
postTemplateWebSeoWebDelete
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -107,7 +107,7 @@ const ShopSeo = () => {
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getTemplateWebSeoWebPage
({
...
params
,
doorType
:
1
}).
then
(
res
=>
{
getTemplateWebSeoWebPage
({
...
params
,
doorType
:
1
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
src/pages/shop/shopTemplate/index.tsx
View file @
8ed54ed9
...
...
@@ -3,8 +3,7 @@ import { Row, Col, message } from 'antd'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplateWebPageTemplateWebFindAllShelfShopTemplateResponse
}
from
'@/services/TemplateApi'
import
{
getTemplateWebPageTemplateWebFindAllShelfShopTemplate
,
GetTemplateWebPageTemplateWebFindAllShelfShopTemplateResponse
}
from
'@/services/TemplateApi'
import
styles
from
'./index.less'
const
ShopTemplate
:
React
.
FC
=
()
=>
{
...
...
@@ -16,7 +15,7 @@ const ShopTemplate: React.FC = () => {
},
[])
const
fetchAllShelfShopTemplate
=
()
=>
{
PublicApi
.
getTemplateWebPageTemplateWebFindAllShelfShopTemplate
().
then
(
res
=>
{
getTemplateWebPageTemplateWebFindAllShelfShopTemplate
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
else
{
...
...
src/pages/shop/templateDetail/index.tsx
View file @
8ed54ed9
...
...
@@ -4,9 +4,9 @@ import cx from 'classnames'
import
{
message
}
from
'antd'
import
DetailPage
from
'@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
styles
from
'./index.less'
import
{
getTemplateWebPageTemplateWebFindShopTemplateDetails
,
postTemplateWebPageTemplateWebUseShopTemplate
}
from
'@/services/TemplateV2Api'
interface
TemplateDetailPropsType
{
location
:
{
...
...
@@ -32,7 +32,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
param
:
any
=
{
id
}
PublicApi
.
getTemplateWebPageTemplateWebFindShopTemplateDetails
(
param
).
then
(
res
=>
{
getTemplateWebPageTemplateWebFindShopTemplateDetails
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDetailInfo
(
res
.
data
)
}
...
...
@@ -45,7 +45,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
handleConfirmUse
=
()
=>
{
setConfirmLoading
(
true
)
PublicApi
.
postTemplateWebPageTemplateWebUseShopTemplate
({
id
}).
then
(
res
=>
{
postTemplateWebPageTemplateWebUseShopTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setUseModalVisible
(
false
)
fetchDetail
()
...
...
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