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
597c1bae
Commit
597c1bae
authored
Dec 03, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:查询渠道商城信息添加用户id
parent
4e2f64ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
index.tsx
src/pages/channel/channelInfo/index.tsx
+18
-10
index.tsx
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+6
-5
No files found.
src/pages/channel/channelInfo/index.tsx
View file @
597c1bae
...
...
@@ -15,6 +15,7 @@ import styles from './index.less'
import
{
GetTemplateChannelFindChannelResponse
}
from
'@/services/TemplateApi'
import
{
isEmpty
}
from
'@formily/antd/esm/shared'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getAuth
}
from
'@/utils/auth'
interface
ShopInfoPropsType
{
SiteStore
:
{
...
...
@@ -46,8 +47,11 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
// 根据站点获取商城信息
const
fetchAllShop
=
()
=>
{
//@ts-ignore
PublicApi
.
getManageShopFindShopsBySiteId
({
siteId
,
type
:
2
}).
then
(
res
=>
{
const
param
:
any
=
{
siteId
,
type
:
2
}
PublicApi
.
getManageShopFindShopsBySiteId
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setAllMallList
(
res
.
data
)
}
...
...
@@ -58,7 +62,11 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
* 获取渠道信息
*/
const
fetchShopInfo
=
()
=>
{
PublicApi
.
getTemplateChannelFindChannel
().
then
(
res
=>
{
const
{
memberId
}
=
getAuth
()
||
{}
const
param
:
any
=
{
memberId
}
PublicApi
.
getTemplateChannelFindChannel
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
if
(
res
.
code
===
1000
)
{
setShopInfo
(
data
)
...
...
@@ -92,7 +100,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
}
const
handleAddNewCitySelect
=
(
item
:
any
)
=>
{
le
t
temp
=
[...
selectCityData
]
cons
t
temp
=
[...
selectCityData
]
temp
.
push
(
item
)
setSelectCityData
(
temp
)
form
.
setFieldsValue
({
...
...
@@ -136,7 +144,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const
handleSave
=
(
e
:
any
)
=>
{
e
.
preventDefault
()
form
.
validateFields
().
then
(
value
=>
{
form
.
validateFields
().
then
(
(
value
:
any
)
=>
{
if
(
!
checkmemberChannelAreas
(
value
.
memberChannelAreas
))
{
return
}
...
...
@@ -147,7 +155,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
value
.
storeUrl
=
storeUrl
||
`
${
siteUrl
}
/
${
GlobalConfig
.
channelRootRoute
}
`
value
.
shopId
=
shopId
setConfirmLoading
(
true
)
//@ts-ignore
PublicApi
.
postTemplateChannelSaveChannel
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchShopInfo
()
...
...
@@ -200,7 +208,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
}
/**
* 添加荣誉图片
* @param url
* @param url
*/
const
handleAddhonorPics
=
(
url
:
string
)
=>
{
setHonorPics
([...
honorPics
,
url
])
...
...
@@ -215,7 +223,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
return
}
if
(
shopInfo
.
shopId
&&
shopInfo
.
memberId
)
{
le
t
resUrl
=
getMallItemAndSetUrl
(
mallId
)
cons
t
resUrl
=
getMallItemAndSetUrl
(
mallId
)
setStoreUrl
(
resUrl
)
}
else
{
setStoreUrl
(
null
)
...
...
@@ -225,7 +233,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const
getMallItemAndSetUrl
=
(
mallId
)
=>
{
let
result
=
""
le
t
mallItem
=
allMallList
.
filter
(
item
=>
item
.
id
===
mallId
)[
0
]
cons
t
mallItem
=
allMallList
.
filter
(
item
=>
item
.
id
===
mallId
)[
0
]
if
(
!
mallItem
)
{
return
""
}
...
...
@@ -261,7 +269,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
return
null
}
if
(
shopId
&&
shopInfo
.
shopId
&&
shopInfo
.
memberId
)
{
le
t
resUrl
=
getMallItemAndSetUrl
(
shopId
)
cons
t
resUrl
=
getMallItemAndSetUrl
(
shopId
)
return
resUrl
?
(
<
div
className=
{
styles
.
shop_url
}
>
<
span
>
当前店铺链接:
</
span
>
...
...
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
597c1bae
...
...
@@ -5,7 +5,7 @@ import SettingList from '../../../../components/SettingList'
import
GoodsItem
from
'./GoodsItem'
import
SettingPanel
from
'../../../../components/SettingPanel'
import
{
CaretUpOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
import
{
GetTemplatePlatformFindGoodsListResponseDetail
}
from
'@/services'
import
{
GetTemplatePlatformFindGoodsListResponseDetail
}
from
'@/services
/TemplateApi
'
import
{
PublicApi
}
from
'@/services/api'
import
{
filterProps
}
from
'../../../../utils'
import
styles
from
'./index.less'
...
...
@@ -44,7 +44,6 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
filterParam
,
setFilterParam
]
=
useState
()
const
[
spinLoading
,
setSpinLoading
]
=
useState
<
boolean
>
(
false
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
const
[
noSelectBrands
,
setNoSelectBrands
]
=
useState
<
any
[]
>
([])
...
...
@@ -59,8 +58,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
categoryId
:
categoryid
,
templateId
:
templateid
}
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
PublicApi
.
getTemplateShopFindCategoryList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
...
...
@@ -283,7 +281,10 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
</
Button
>
)
:
(
<
Button
onClick=
{
()
=>
setOprationType
(
'list'
)
}
onClick=
{
()
=>
{
setOprationType
(
'list'
)
setIsHighSearch
(
false
)
}
}
>
查看已选择商品(
{
selectGoodsList
.
length
}
)
</
Button
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment