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
7c80d65f
Commit
7c80d65f
authored
Nov 11, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 小程序装修选择商城类型错误问题修复
parent
15c28662
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
15 deletions
+22
-15
index.tsx
src/pages/editor/components/drawer/mixDrawer/index.tsx
+10
-3
index.tsx
src/pages/editor/mobileSettingPanel/index.tsx
+1
-0
index.tsx
...ttingPanel/propsSettings/components/cardNavItem/index.tsx
+3
-1
index.tsx
src/pages/editor/mobileSettingPanel/propsSettings/index.tsx
+3
-2
index.tsx
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
+3
-7
index.tsx
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
+2
-2
No files found.
src/pages/editor/components/drawer/mixDrawer/index.tsx
View file @
7c80d65f
...
...
@@ -14,6 +14,7 @@ interface MixDrawerProps {
// 1商城,3积分商品,4店铺,5资讯, 6品牌,
type
:
1
|
3
|
4
|
5
|
6
,
shopId
?:
number
,
environment
:
number
,
// 1.B端 2.C端 3.SRM
property
:
1
|
2
|
3
,
onConfirm
:
(
record
:
any
)
=>
void
,
...
...
@@ -46,7 +47,7 @@ const Title_MAPS = {
}
const
MixDrawer
:
React
.
FC
<
MixDrawerProps
>
=
(
props
:
MixDrawerProps
)
=>
{
const
{
visible
,
type
,
property
,
onConfirm
,
onClose
,
selectId
,
filterParam
,
shopId
,
selectType
=
'radio'
,
layoutType
}
=
props
;
const
{
visible
,
type
,
property
,
onConfirm
,
onClose
,
selectId
,
filterParam
,
shopId
,
selectType
=
'radio'
,
layoutType
,
environment
}
=
props
;
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([]);
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([]);
...
...
@@ -57,6 +58,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{}
useEffect
(()
=>
{
console
.
log
(
environment
,
'environment'
)
setSelectedRowKeys
(
selectId
?
[
selectId
]
:
[]);
},
[
selectId
])
...
...
@@ -74,11 +76,16 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
case
1
:
if
(
layoutType
!==
'own'
)
{
_params
.
type
=
1
;
_params
.
environment
=
4
;
_params
.
environment
=
environment
;
_params
.
property
=
property
;
_fetch
=
PublicApi
.
getManageShopListAdorn
;
}
else
{
_fetch
=
PublicApi
.
getManageWebShopWebFindAppSelfShopByCurrMember
;
if
(
environment
===
4
)
{
_fetch
=
PublicApi
.
getManageWebShopWebFindAppSelfShopByCurrMember
;
}
else
if
(
environment
===
3
)
{
_fetch
=
PublicApi
.
getManageWebShopWebFindAppletsSelfShopByCurrMember
}
}
if
(
keyWord
)
{
...
...
src/pages/editor/mobileSettingPanel/index.tsx
View file @
7c80d65f
...
...
@@ -18,6 +18,7 @@ type SettingPanelType = {
interface
MobileSettingPanelProps
{
shopId
:
number
,
environment
:
number
,
layoutType
:
LAYOUT_TYPE
}
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/cardNavItem/index.tsx
View file @
7c80d65f
...
...
@@ -25,6 +25,7 @@ interface CardNavItemProps {
// 当前选中组件的key
selectedKey
?:
any
,
shopId
:
string
,
environment
:
number
,
// 频道 1: 积分兑换; 2:公司介绍; 3:成为会员; 4:行情资讯; 5:最近成交
id
?:
any
,
// 1.B端 2.C端 3.SRM
...
...
@@ -135,7 +136,7 @@ const RedirectTypeList = [
const
{
onFieldInputChange$
}
=
FormEffectHooks
;
const
CardNavItem
:
React
.
FC
<
CardNavItemProps
>
=
(
props
:
CardNavItemProps
)
=>
{
const
{
name
,
type
,
url
,
icon
,
id
,
empty
,
shopId
,
selectedKey
,
layoutType
}
=
props
;
const
{
name
,
type
,
url
,
icon
,
id
,
empty
,
environment
,
shopId
,
selectedKey
,
layoutType
}
=
props
;
const
[
actVisible
,
setActVisible
]
=
useState
<
boolean
>
(
false
);
const
[
record
,
setRecord
]
=
useState
<
any
>
();
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{}
...
...
@@ -393,6 +394,7 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
onClose=
{
_onMixClose
}
type=
{
1
}
property=
{
3
}
environment=
{
environment
}
onConfirm=
{
_onChooseConfirm
}
visible=
{
mixVisible
}
/>
...
...
src/pages/editor/mobileSettingPanel/propsSettings/index.tsx
View file @
7c80d65f
...
...
@@ -25,14 +25,15 @@ interface PropsSettingsPropsType {
pageConfig
:
PageConfigType
,
layoutType
:
LAYOUT_TYPE
,
shopId
:
number
,
environment
:
number
,
}
const
PropsSettings
:
React
.
FC
<
PropsSettingsPropsType
>
=
(
props
)
=>
{
const
{
selectedInfo
,
shopId
,
layoutType
,
pageConfig
}
=
props
const
{
selectedInfo
,
shopId
,
environment
,
layoutType
,
pageConfig
}
=
props
const
renderSettingItem
=
()
=>
{
const
{
props
:
initProps
,
propsConfig
,
parentKey
}
=
selectedInfo
||
{};
const
_props
=
{
...
initProps
,
shopId
,
layoutType
,
selectedKey
:
selectedInfo
?.
selectedKey
}
const
_props
=
{
...
initProps
,
shopId
,
environment
,
layoutType
,
selectedKey
:
selectedInfo
?.
selectedKey
}
const
componentType
=
propsConfig
?.
componentType
if
(
componentType
)
{
...
...
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
View file @
7c80d65f
...
...
@@ -72,6 +72,7 @@ interface ShopPreviewPropsType {
template
:
string
;
type
:
number
;
shopId
:
number
;
environment
:
number
;
};
};
}
...
...
@@ -80,7 +81,7 @@ const TemplateList = ['science'];
const
OwnMallTempleteEdit
:
React
.
FC
<
ShopPreviewPropsType
>
=
props
=>
{
const
{
query
:
{
id
,
template
,
type
,
shopId
},
query
:
{
id
,
template
,
type
,
shopId
,
environment
=
4
},
}
=
props
.
location
;
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
);
const
[
theme
,
setTheme
]
=
useState
<
string
>
(
'theme-mall-science'
);
...
...
@@ -88,12 +89,6 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{};
const
[
templateInfo
,
setTemplateInfo
]
=
useState
<
any
>
()
const
headers
:
any
=
{
environment
:
'4'
,
type
:
Number
(
type
),
shopId
,
};
useEffect
(()
=>
{
if
(
!
TemplateList
.
includes
(
template
))
{
setTheme
(
`theme-mall-
${
TemplateList
[
0
]}
`
);
...
...
@@ -1119,6 +1114,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
</
div
>
<
MobileSettingPanel
shopId=
{
shopId
}
environment=
{
Number
(
environment
)
}
layoutType=
{
LAYOUT_TYPE
.
own
}
/>
</
div
>
...
...
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
View file @
7c80d65f
...
...
@@ -63,7 +63,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
`
}
else
if
(
detailInfo
?.
environment
===
4
||
detailInfo
?.
environment
===
3
||
detailInfo
?.
environment
===
2
)
{
// 自营商城装修
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
`
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
&environment=
${
detailInfo
?.
environment
}
`
} else {
message.info("暂不支持该类型模板装修")
}
...
...
@@ -73,7 +73,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
if(detailInfo?.environment === 1) {
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
.
shopId
}
`
} 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
}
`
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
.
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
`
} else {
message.info("暂不支持该类型模板预览")
}
...
...
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