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
d18f3db9
Commit
d18f3db9
authored
Oct 19, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
5509eb9b
53de411c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
398 additions
and
245 deletions
+398
-245
contentRoute.ts
config/routes/contentRoute.ts
+8
-8
Phone.tsx
src/components/NiceForm/components/Phone.tsx
+29
-12
environment.ts
src/constants/environment.ts
+1
-1
procurement.ts
src/constants/procurement.ts
+3
-1
schema.tsx
src/pages/content/category/schema.tsx
+2
-3
infomationInfo.tsx
src/pages/content/infomation/infomationInfo.tsx
+18
-3
infomationInfoSchema.tsx
src/pages/content/infomation/schema/infomationInfoSchema.tsx
+0
-4
index.tsx
src/pages/content/tagsManagement/schema/index.tsx
+5
-6
effect.ts
src/pages/editor/components/drawer/commodityDrawer/effect.ts
+4
-2
index.tsx
src/pages/editor/components/drawer/commodityDrawer/index.tsx
+5
-0
index.tsx
src/pages/editor/components/drawer/mixDrawer/index.tsx
+1
-1
index.tsx
src/pages/editor/components/toolBar/index.tsx
+7
-3
returnSaveParams.ts
src/pages/editor/components/toolBar/returnSaveParams.ts
+0
-0
index.tsx
...ileSettingPanel/propsSettings/components/banner/index.tsx
+2
-1
index.tsx
...ttingPanel/propsSettings/components/cardNavItem/index.tsx
+97
-11
schema.ts
...ttingPanel/propsSettings/components/cardNavItem/schema.ts
+1
-1
index.tsx
src/pages/editor/ownMallEdit/index.tsx
+17
-16
preview.tsx
src/pages/editor/ownMallEdit/preview.tsx
+17
-16
config.ts
src/pages/mobileTemplate/ownMallTemplateEdit/config.ts
+0
-10
index.tsx
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
+18
-14
preview.tsx
src/pages/mobileTemplate/ownMallTemplateEdit/preview.tsx
+19
-27
index.less
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.less
+11
-2
index.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
+32
-23
add.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
+20
-10
index.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
+5
-5
index.tsx
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
+1
-1
PriceSetting.tsx
...ages/priceManage/priceStrategy/component/PriceSetting.tsx
+0
-0
priceSetting.tsx
...ages/priceManage/priceStrategy/component/priceSetting.tsx
+29
-29
index.tsx
...ity/logisticsBillSubmit/waitSbumitLogisticsBill/index.tsx
+6
-6
index.tsx
...ty/marketingActivitiesManagement/activePage/add/index.tsx
+1
-1
index.tsx
...n/marketingAbility/paltformSign/readyExamineOne/index.tsx
+1
-2
index.tsx
...n/marketingAbility/paltformSign/readyExamineTwo/index.tsx
+1
-2
index.tsx
...ction/marketingAbility/paltformSign/readySubmit/index.tsx
+1
-2
index.tsx
...arketingAbility/paltformSign/readySubmitExamine/index.tsx
+1
-2
index.tsx
...ransaction/marketingAbility/paltformSign/search/index.tsx
+1
-2
index.tsx
...marketingAbility/selfManagement/readyExamineOne/index.tsx
+1
-2
index.tsx
...marketingAbility/selfManagement/readyExamineTwo/index.tsx
+1
-2
index.tsx
...ction/marketingAbility/selfManagement/readyLive/index.tsx
+1
-2
index.tsx
...ion/marketingAbility/selfManagement/readySubmit/index.tsx
+1
-2
index.tsx
...ketingAbility/selfManagement/readySubmitExamine/index.tsx
+1
-2
index.tsx
...nsaction/marketingAbility/selfManagement/search/index.tsx
+1
-2
ScanLoginWrap.tsx
src/pages/user/components/ScanLoginWrap.tsx
+26
-4
request.ts
src/utils/request.ts
+1
-1
ytt.config.ts
ytt.config.ts
+1
-1
No files found.
config/routes/contentRoute.ts
View file @
d18f3db9
...
...
@@ -13,7 +13,7 @@
{
path
:
'/memberCenter/contentAbility/category'
,
name
:
'分类管理'
,
component
:
'@/pages/
memberCenter/contentAbility
/category'
component
:
'@/pages/
content
/category'
},
// 栏目管理
...
...
@@ -41,19 +41,19 @@
{
path
:
'/memberCenter/contentAbility/tagsManagement'
,
name
:
'tagsManagement'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement'
component
:
'@/pages/
content
/tagsManagement'
},
{
path
:
'/memberCenter/contentAbility/tagsManagement/add'
,
name
:
'tagsAdd'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement/tagsInfo'
,
component
:
'@/pages/
content
/tagsManagement/tagsInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
{
path
:
'/memberCenter/contentAbility/tagsManagement/detail'
,
name
:
'tagsInfo'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement/tagsInfo'
,
component
:
'@/pages/
content
/tagsManagement/tagsInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
...
...
@@ -78,24 +78,24 @@
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
// 公告管理
{
path
:
'/memberCenter/contentAbility/announcements'
,
name
:
'announcements'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements'
component
:
'@/pages/
content
/announcements'
},
{
path
:
'/memberCenter/contentAbility/announcements/add'
,
name
:
'announceAdd'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements/announceInfo'
,
component
:
'@/pages/
content
/announcements/announceInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
{
path
:
'/memberCenter/contentAbility/announcements/detail'
,
name
:
'announceInfo'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements/announceInfo'
,
component
:
'@/pages/
content
/announcements/announceInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
...
...
src/components/NiceForm/components/Phone.tsx
View file @
d18f3db9
...
...
@@ -141,18 +141,35 @@ const Phone = (props) => {
const
handleStartSms
=
()
=>
{
setLoading
(
true
)
form
.
setFieldState
(
'phone'
,
state
=>
{
state
.
smsLoading
=
instanceRef
.
current
.
canIUseSms
})
PublicApi
.
postMemberRegisterSms
({
countryCode
:
'+86'
,
width
:
String
(
remoteImg
.
x
),
imgId
:
remoteImg
.
imgId
,
phone
:
encryptedByAES
(
form
.
getFieldValue
(
'phone'
))
}).
finally
(()
=>
{
start
()
setLoading
(
false
)
})
if
(
form
.
getFieldValue
(
'phone'
))
{
form
.
setFieldState
(
'phone'
,
state
=>
{
state
.
smsLoading
=
instanceRef
.
current
.
canIUseSms
})
PublicApi
.
postMemberRegisterSms
({
countryCode
:
'+86'
,
width
:
remoteImg
.
x
,
imgId
:
remoteImg
.
imgId
,
phone
:
encryptedByAES
(
form
.
getFieldValue
(
'phone'
))
}).
finally
(()
=>
{
start
()
setLoading
(
false
)
})
}
if
(
form
.
getFieldValue
(
'account'
))
{
form
.
setFieldState
(
'account'
,
state
=>
{
state
.
smsLoading
=
instanceRef
.
current
.
canIUseSms
})
PublicApi
.
postMemberRegisterPswSms
({
countryCode
:
'+86'
,
width
:
remoteImg
.
x
,
imgId
:
remoteImg
.
imgId
,
phone
:
encryptedByAES
(
form
.
getFieldValue
(
'account'
))
}).
finally
(()
=>
{
start
()
setLoading
(
false
)
})
}
}
const
handleCheckSuccess
=
(
reset
)
=>
{
...
...
src/constants/environment.ts
View file @
d18f3db9
...
...
@@ -29,7 +29,7 @@ export const environmentList = [
value
:
H5
,
},
{
label
:
'
APPLETS
'
,
label
:
'
小程序
'
,
value
:
APPLETS
,
},
{
...
...
src/constants/procurement.ts
View file @
d18f3db9
...
...
@@ -321,7 +321,9 @@ export enum DOORTYPE {
/** 渠道门户 */
PLACE_DOORTYPE
,
/** 采购门户 */
PROCUREMENT_DOORTYPE
PROCUREMENT_DOORTYPE
,
/** 自营门户 */
OWN_DOORTYPE
}
/** 年加工额 */
...
...
src/pages/content/category/schema.tsx
View file @
d18f3db9
...
...
@@ -28,19 +28,18 @@ export const classSchema: ISchema = {
title
:
'分类名称'
,
required
:
true
,
"x-component-props"
:
{
placeholder
:
'请输入
品
类名称'
placeholder
:
'请输入
分
类名称'
},
"x-rules"
:
[
{
limitByte
:
true
,
maxByte
:
16
maxByte
:
20
}
]
},
describe
:
{
type
:
'textarea'
,
title
:
'类型'
,
required
:
true
,
"x-component-props"
:
{
placeholder
:
'最多100个字符,50个汉字'
},
...
...
src/pages/content/infomation/infomationInfo.tsx
View file @
d18f3db9
...
...
@@ -44,6 +44,8 @@ const InfomationInfo = () => {
const
initialValues
=
useInitialValues
({
id
:
id
},
PublicApi
.
getManageMemberInformationGet
);
const
[
category
,
setCategory
]
=
useState
<
any
>
([]);
const
[
column
,
setColumn
]
=
useState
<
ColumnListType
[]
>
([])
const
[
recommendLabelValue
,
setRecommendLabelValue
]
=
useState
<
number
>
();
const
isEdit
=
id
&&
!
preview
;
const
isAdd
=
!
id
&&
!
preview
;
const
isView
=
id
&&
preview
;
...
...
@@ -142,13 +144,17 @@ const InfomationInfo = () => {
: PublicApi.postManageMemberInformationUpdate
const postData = isAdd ? tempPostData : {...tempPostData, id: id};
console.log(`
postData
`, postData)
setSubmitLoading(true)
setUnsaved(false)
serviceActions(postData).then((data) => {
setSubmitLoading(false);
if(data.code === 1000) {
history.push('/memberCenter/contentAbility/infomations')
} else {
setSubmitLoading(false)
}
}).catch(() => {
setSubmitLoading(false)
})
}
...
...
@@ -199,7 +205,16 @@ const InfomationInfo = () => {
state.props['x-component-props']!["options"] = list;
})
})
onFieldValueChange$('recommendLabel').subscribe(({ value }) => {
console.log(`
recommendLabel
value
`, value)
setRecommendLabelValue(value)
actions.setFieldState('imageUrl', state => {
state.props["x-rules"] = [1, 2, 3, 4, 6].includes(value) ? {
"required": true,
"message": "请上传图片"
} : {}
})
})
}}
expressionScope={{
tagOnChange: (value) => {
...
...
@@ -208,7 +223,7 @@ const InfomationInfo = () => {
label: (
<div>
{
isAdd || isEdit
(isAdd || isEdit) && [1, 2, 3, 4, 6].includes(recommendLabelValue)
? <span style={{color: '#ff4d4f'}}>* </span>
: null
}
...
...
src/pages/content/infomation/schema/infomationInfoSchema.tsx
View file @
d18f3db9
...
...
@@ -219,10 +219,6 @@ const schema = {
// onChange: "{{uploadImage}}",
fileMaxSize
:
300
},
"x-rules"
:
{
"required"
:
true
,
"message"
:
"请上传图片"
},
},
digest
:
{
type
:
'string'
,
...
...
src/pages/content/tagsManagement/schema/index.tsx
View file @
d18f3db9
...
...
@@ -3,7 +3,7 @@ import EyePreview from '@/components/EyePreview';
const
columns
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
},
{
title
:
'标签名称'
,
dataIndex
:
'name'
,
title
:
'标签名称'
,
dataIndex
:
'name'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/contentAbility/tagsManagement/detail?id=${record.id}&preview=1`
}
...
...
@@ -51,9 +51,9 @@ const schema = {
name
:
'search'
,
'x-component'
:
'CustomSearch'
,
'x-component-props'
:
{
placeholder
:
"请填写
栏目
名称"
,
placeholder
:
"请填写
标签
名称"
,
"onSearch"
:
"{{search}}"
,
}
},
searchBtn
:
{
...
...
@@ -70,7 +70,7 @@ const schema = {
},
}
}
}
},
"table"
:
{
...
...
@@ -102,4 +102,4 @@ const schema = {
}
}
export
default
schema
;
\ No newline at end of file
export
default
schema
;
src/pages/editor/components/drawer/commodityDrawer/effect.ts
View file @
d18f3db9
...
...
@@ -19,7 +19,8 @@ export const searchBrandOptionEffect = (
memberRoleId
,
}).
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
?.
data
?.
map
(
item
=>
{
const
result
=
res
.
data
?.
data
||
[]
state
.
props
[
'x-component-props'
].
dataoption
=
result
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
id
:
item
.
id
};
});
});
...
...
@@ -44,7 +45,8 @@ export const searchCustomerCategoryOptionEffect = (
}).
then
(
res
=>
{
// PublicApi.getProductPlatformGetCategoryTree().then(res => {
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
?.
map
(
item
=>
{
const
result
=
res
.
data
||
[]
state
.
props
[
'x-component-props'
].
dataoption
=
result
.
map
(
item
=>
{
return
{
title
:
item
.
name
,
id
:
item
.
id
};
});
});
...
...
src/pages/editor/components/drawer/commodityDrawer/index.tsx
View file @
d18f3db9
...
...
@@ -150,6 +150,11 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
case
LAYOUT_TYPE
.
shop
:
getFn
=
PublicApi
.
getMarketingAdornGoodsListAdorn
break
;
case
LAYOUT_TYPE
.
own
:
_params
.
memberId
=
memberId
_params
.
memberRoleId
=
memberRoleId
getFn
=
PublicApi
.
getMarketingAdornGoodsListAdorn
break
default
:
break
;
}
...
...
src/pages/editor/components/drawer/mixDrawer/index.tsx
View file @
d18f3db9
...
...
@@ -34,7 +34,7 @@ const Environment_MAPS = {
const
Property_MAPS
=
{
1
:
'B端商城'
,
2
:
'C端商城'
,
3
:
'
SRM
商城'
,
3
:
'
自营
商城'
,
}
const
Title_MAPS
=
{
...
...
src/pages/editor/components/toolBar/index.tsx
View file @
d18f3db9
...
...
@@ -5,7 +5,7 @@ import { PublicApi } from '@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
STATE_PROPS
,
PageConfigType
,
PROPS_SETTING_TYPES
}
from
'@lingxi-disign/core'
import
{
useSelector
}
from
'@lingxi-disign/react'
import
{
paramsShop
,
paramsChannel
}
from
'./returnSaveParams'
import
{
paramsShop
,
paramsChannel
,
paramsOwnMall
}
from
'./returnSaveParams'
import
{
history
}
from
'umi'
import
styles
from
'./index.less'
...
...
@@ -42,8 +42,10 @@ const ToolBar: React.FC<ToolBarPropsType> = (props) => {
const
handleSave
=
useCallback
(()
=>
{
if
(
layoutType
===
LAYOUT_TYPE
.
shop
)
{
saveAppEnterprise
(
paramsShop
(
templateId
,
pageConfig
))
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
saveAppEnterprise
(
paramsChannel
(
templateId
,
pageConfig
,
templateInfo
))
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
own
)
{
saveAppEnterprise
(
paramsOwnMall
(
templateId
,
pageConfig
,
templateInfo
))
}
},
[
pageConfig
])
...
...
@@ -51,8 +53,10 @@ const ToolBar: React.FC<ToolBarPropsType> = (props) => {
let
postFn
if
(
layoutType
===
LAYOUT_TYPE
.
shop
)
{
postFn
=
PublicApi
.
postTemplateAdornAppStoreSave
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
postFn
=
PublicApi
.
postTemplateAdornAppChannelSave
}
else
if
(
layoutType
===
LAYOUT_TYPE
.
own
)
{
postFn
=
PublicApi
.
postTemplateAdornAppSelfSave
}
if
(
postFn
)
{
postFn
(
param
).
then
(
res
=>
{
...
...
src/pages/editor/components/toolBar/returnSaveParams.ts
View file @
d18f3db9
This diff is collapsed.
Click to expand it.
src/pages/editor/mobileSettingPanel/propsSettings/components/banner/index.tsx
View file @
d18f3db9
...
...
@@ -148,9 +148,10 @@ const BannerClient: React.FC<BannerClientProps> = (props: BannerClientProps) =>
if
(
layoutType
===
LAYOUT_TYPE
.
shop
)
{
return
RedirectTypeList
}
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
if
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
own
)
{
return
RedirectTypeList_Channel
}
return
[]
},
[
layoutType
])
const
_recordDetail
=
useMemo
(()
=>
{
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/cardNavItem/index.tsx
View file @
d18f3db9
...
...
@@ -11,6 +11,7 @@ import FormilyUpload from '@/components/UploadFiles/FormilyUploadFiles';
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
ActivityDrawer
from
'@/pages/editor/components/drawer/activityDrawer'
;
import
MixDrawer
from
'@/pages/editor/components/drawer/mixDrawer'
;
import
{
getAuth
}
from
'@/utils/auth'
import
{
cardNavSchema
}
from
'./schema'
import
styles
from
'./index.less'
;
...
...
@@ -47,6 +48,25 @@ const TyleList = [
},
]
const
TyleList_Own
=
[
{
value
:
1
,
label
:
'积分兑换'
,
},
{
value
:
2
,
label
:
'公司介绍'
,
},
{
value
:
3
,
label
:
'成为会员'
,
},
{
value
:
4
,
label
:
'公司介绍'
,
},
]
const
ChannelTyleList
=
[
{
value
:
1
,
...
...
@@ -70,6 +90,29 @@ const ChannelTyleList = [
},
]
const
RedirectTypeList_Own
=
[
{
value
:
5
,
label
:
'商城导航'
,
},
{
value
:
2
,
label
:
'活动导航'
,
},
{
value
:
1
,
label
:
'品类导航'
,
},
{
value
:
3
,
label
:
'频道导航'
,
},
{
value
:
4
,
label
:
'外部链接'
,
},
];
const
RedirectTypeList
=
[
{
value
:
1
,
...
...
@@ -98,11 +141,14 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{}
const
fixtureContext
=
useContext
(
context
);
const
[
formValue
,
setFormVale
]
=
useState
<
any
>
();
const
[
mixVisible
,
setMixVisible
]
=
useState
<
boolean
>
(
false
);
const
_fetch
:
any
=
useMemo
(()
=>
{
switch
(
type
)
{
case
2
:
return
PublicApi
.
getTemplateWebActivityPageGet
case
5
:
return
PublicApi
.
getManageShopDetails
default
:
return
async
()
=>
{
}
}
...
...
@@ -110,7 +156,7 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
useEffect
(()
=>
{
if
(
id
)
{
if
(
type
===
2
)
{
if
(
[
2
,
5
].
includes
(
type
)
)
{
_fetch
?.({
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setRecord
(
res
.
data
)
...
...
@@ -172,6 +218,7 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
return
useMemo
(()
=>
{
if
(
record
)
{
const
chooseType
=
fixtureContext
?.
formActions
.
getFieldValue
(
'type'
)
if
(
chooseType
===
2
)
{
return
(
<
div
className=
{
styles
[
'banner-record-activity'
]
}
>
...
...
@@ -185,6 +232,17 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
<
div
className=
{
styles
[
'banner-record-activity-tag'
]
}
><
StatusTag
title=
{
record
?.
type
===
1
?
'平台'
:
'商家'
}
type=
{
record
?.
type
===
1
?
'success'
:
'primary'
}
/></
div
>
</
div
>
)
}
else
if
(
chooseType
===
5
)
{
return
(
<
div
className=
{
styles
[
'banner-record-activity'
]
}
>
<
img
src=
{
record
?.
logoUrl
}
/>
<
div
className=
{
styles
[
'banner-record-activity-right'
]
}
>
<
Tooltip
title=
{
record
?.
name
}
>
<
div
className=
{
styles
[
'banner-record-activity-right-top'
]
}
>
{
record
?.
name
}
</
div
>
</
Tooltip
>
</
div
>
</
div
>
)
}
}
return
null
...
...
@@ -201,6 +259,9 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
case
2
:
setActVisible
(
true
);
break
;
case
5
:
setMixVisible
(
true
)
break
default
:
break
;
}
...
...
@@ -208,7 +269,17 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
const
_onChooseConfirm
=
(
record
)
=>
{
setRecord
(
record
);
_onActClose
();
const
chooseType
=
fixtureContext
?.
formActions
.
getFieldValue
(
'type'
)
switch
(
chooseType
)
{
case
2
:
_onActClose
();
break
;
case
5
:
setMixVisible
(
false
)
break
default
:
break
;
}
}
const
_getTypeList
=
useMemo
(()
=>
{
...
...
@@ -217,6 +288,8 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
return
TyleList
case
LAYOUT_TYPE
.
channel
:
return
ChannelTyleList
case
LAYOUT_TYPE
.
own
:
return
TyleList_Own
default
:
return
TyleList
}
...
...
@@ -249,7 +322,7 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
}
if
(
values
.
channel
&&
values
.
type
===
3
)
{
newProps
.
id
=
values
.
channel
}
else
if
(
values
.
type
===
2
)
{
}
else
if
(
values
.
type
===
2
||
values
.
type
===
5
)
{
newProps
.
id
=
record
.
id
}
...
...
@@ -259,16 +332,16 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
});
}
// 会员弹框筛选select值
const
fetchSelectOptions
=
async
()
=>
{
const
list
=
await
getFirstCategoryList
()
// 会员弹框筛选select值
const
fetchSelectOptions
=
async
()
=>
{
const
list
=
await
getFirstCategoryList
()
return
{
type
:
RedirectTypeList
,
id
:
list
,
channel
:
_getTypeList
,
}
return
{
type
:
LAYOUT_TYPE
.
own
?
RedirectTypeList_Own
:
RedirectTypeList
,
id
:
list
,
channel
:
_getTypeList
,
}
}
const
formProps
=
{
// onSubmit: handleSubmit,
...
...
@@ -280,6 +353,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
components
:
{
FormilyUpload
,
recordDetail
},
};
const
_onMixClose
=
()
=>
{
setMixVisible
(
false
);
}
return
(
<>
<
NiceForm
...
...
@@ -305,6 +382,15 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
onClose=
{
_onActClose
}
onConfirm=
{
_onChooseConfirm
}
/>
<
MixDrawer
selectId=
{
id
}
layoutType=
{
layoutType
}
onClose=
{
_onMixClose
}
type=
{
1
}
property=
{
3
}
onConfirm=
{
_onChooseConfirm
}
visible=
{
mixVisible
}
/>
</>
)
}
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/cardNavItem/schema.ts
View file @
d18f3db9
...
...
@@ -75,7 +75,7 @@ export const cardNavSchema: ISchema = {
{
type
:
'value:visible'
,
target
:
'recordDetail'
,
condition
:
"{{$value === 2}}"
condition
:
"{{$value === 2
|| $value === 5
}}"
},
],
'x-rules'
:
[
...
...
src/pages/editor/ownMallEdit/index.tsx
View file @
d18f3db9
...
...
@@ -140,22 +140,23 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
})
}
// const getCategoryTree = () => {
// return new Promise((resolve) => {
// const param: any = {
// templateId: id,
// categoryId,
// memberId,
// roleId: memberRoleId
// }
const
getCategoryTree
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
const
param
:
any
=
{
memberId
,
}
const
headers
:
any
=
{
shopId
}
// PublicApi.getTemplateAdornWebSelfMemberCategoryAdorn(param
).then(res => {
//
if (res.code === 1000) {
//
resolve(res.data)
//
}
//
})
//
})
//
}
PublicApi
.
getSearchShopSelfGetCustomerCategoryTree
(
param
,
{
headers
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
const
fetchNewByLabel
=
(
label
:
string
)
=>
{
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
...
...
@@ -186,7 +187,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
getDefaultMenuData
(
mallPath
,
memberId
);
}
mainNavConfig
[
mainNavConfig
.
key
].
props
.
type
=
LAYOUT_TYPE
.
shop
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
[]
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
await
getCategoryTree
()
// 一号位广告
oneBannerConfig
[
oneBannerConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
1
)
...
...
src/pages/editor/ownMallEdit/preview.tsx
View file @
d18f3db9
...
...
@@ -139,22 +139,23 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
})
}
// const getCategoryTree = () => {
// return new Promise((resolve) => {
// const param: any = {
// templateId: id,
// categoryId,
// memberId,
// roleId: memberRoleId
// }
const
getCategoryTree
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
const
param
:
any
=
{
memberId
,
}
const
headers
:
any
=
{
shopId
}
// PublicApi.getTemplateAdornWebSelfMemberCategoryAdorn(param
).then(res => {
//
if (res.code === 1000) {
//
resolve(res.data)
//
}
//
})
//
})
//
}
PublicApi
.
getSearchShopSelfGetCustomerCategoryTree
(
param
,
{
headers
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
const
fetchNewByLabel
=
(
label
:
string
)
=>
{
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
...
...
@@ -180,7 +181,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
menuData
;
}
mainNavConfig
[
mainNavConfig
.
key
].
props
.
type
=
LAYOUT_TYPE
.
shop
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
[]
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
await
getCategoryTree
()
// 一号位广告
oneBannerConfig
[
oneBannerConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
1
)
...
...
src/pages/mobileTemplate/ownMallTemplateEdit/config.ts
View file @
d18f3db9
...
...
@@ -43,18 +43,8 @@ export const channelLayoutConfig : PageConfigType = {
title
:
'${channelName}'
,
categoryList
:
'${categoryList}'
,
},
childNodes
:
[
'2'
],
childComponentName
:
'ChannelHeaderNav.ActionItem'
,
},
'2'
:
{
loop
:
'${top}'
,
title
:
'${item.name}'
,
hideActions
:
true
,
componentName
:
'ChannelHeaderNav.ActionItem'
,
props
:
{
data
:
'${item}'
},
},
'3'
:
{
title
:
'广告图'
,
canDelete
:
false
,
...
...
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
View file @
d18f3db9
...
...
@@ -21,6 +21,7 @@ import config from '../../editor/configs';
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
*
as
MarketingConfigs
from
'./marketing_config'
;
import
{
cloneDeep
}
from
'lodash'
;
import
{
GlobalConfig
}
from
'@/global/config'
import
{
defaultHeaderNavData
,
channelLayoutConfig
,
...
...
@@ -52,7 +53,6 @@ import {
import
Loading
from
'../../editor/components/Loading'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
LAYOUT_TYPE
}
from
'@/constants'
;
// import { GlobalConfig } from '@/global/config'
import
MobileSettingPanel
from
'../../editor/mobileSettingPanel'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
styles
from
'./index.less'
;
...
...
@@ -117,14 +117,14 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
};
/**
* 获取app
店铺
装修信息
* 获取app装修信息
*/
const
getAppC
hannelC
onfig
=
():
Promise
<
any
>
=>
{
const
getAppConfig
=
():
Promise
<
any
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
:
any
=
{
templateId
:
id
,
};
PublicApi
.
getTemplateAdornApp
Channel
Find
(
param
)
PublicApi
.
getTemplateAdornApp
Self
Find
(
param
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
setTemplateInfo
(
res
.
data
)
...
...
@@ -144,8 +144,9 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const
param
:
any
=
{
shopId
,
memberId
,
memberRoleId
};
PublicApi
.
getSearchC
hannelC
ommodityTemplateGetFirstCategoryListByMemberId
(
PublicApi
.
getSearchCommodityTemplateGetFirstCategoryListByMemberId
(
param
,
)
.
then
(
res
=>
{
...
...
@@ -175,6 +176,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
recommendLabel
:
[
2
,
3
],
};
const
res
=
await
PublicApi
.
getManageContentInformationPage
(
param
);
message
.
destroy
()
if
(
res
.
code
===
1000
&&
res
.
data
.
data
)
{
return
res
.
data
.
data
[
0
].
title
;
}
...
...
@@ -183,13 +185,15 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const
getComponentsConfig
=
async
()
=>
{
try
{
const
appConfig
=
await
getAppChannelConfig
();
//渠道信息
const
channelInfo
=
await
fetchChannelInfo
();
const
appConfig
=
await
getAppConfig
();
// 商城信息
const
shopList
=
GlobalConfig
.
web
.
shopInfo
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
const
_mallLayoutConfig
:
any
=
cloneDeep
(
channelLayoutConfig
);
const
allState
=
{
top
:
defaultHeaderNavData
,
channelName
:
channelInfo
.
memberN
ame
,
channelName
:
webMallInfo
.
n
ame
,
categoryList
:
await
getFirstCategoryList
(),
navList
:
appConfig
?.
navList
?
appConfig
?.
navList
.
details
:
[],
advert
:
appConfig
?.
advert
?
appConfig
?.
advert
.
details
:
[],
...
...
@@ -1041,20 +1045,20 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
return
!
loading
?
(
<
BrickProvider
config=
{
config
}
>
<
Helmet
>
<
title
>
渠道装修-渠道主
页
</
title
>
<
title
>
自营商城装修-首
页
</
title
>
</
Helmet
>
<
div
className=
{
styles
[
'wrapper'
]
}
>
<
ToolBar
type=
{
1
}
title=
"
渠道商城
-首页"
title=
"
自营商城装修
-首页"
showActions=
{
true
}
layoutType=
{
LAYOUT_TYPE
.
channel
}
layoutType=
{
LAYOUT_TYPE
.
own
}
templateId=
{
id
}
templateInfo=
{
templateInfo
}
/>
<
div
className=
{
styles
[
'content'
]
}
>
<
MobileClientEditLeft
layoutType=
{
LAYOUT_TYPE
.
channel
}
layoutType=
{
LAYOUT_TYPE
.
own
}
marketConfigs=
{
MarketingConfigs
}
/>
<
div
className=
{
styles
[
'app-wrapper'
]
}
>
...
...
@@ -1068,7 +1072,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
</
div
>
<
MobileSettingPanel
shopId=
{
shopId
}
layoutType=
{
LAYOUT_TYPE
.
channel
}
layoutType=
{
LAYOUT_TYPE
.
own
}
/>
</
div
>
</
div
>
...
...
src/pages/mobileTemplate/ownMallTemplateEdit/preview.tsx
View file @
d18f3db9
...
...
@@ -21,6 +21,7 @@ import config from '../../editor/configs';
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
*
as
MarketingConfigs
from
'./marketing_config'
;
import
{
cloneDeep
}
from
'lodash'
;
import
{
GlobalConfig
}
from
'@/global/config'
import
{
defaultHeaderNavData
,
channelLayoutConfig
,
...
...
@@ -52,7 +53,6 @@ import {
import
Loading
from
'../../editor/components/Loading'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
LAYOUT_TYPE
}
from
'@/constants'
;
// import { GlobalConfig } from '@/global/config'
import
MobileSettingPanel
from
'../../editor/mobileSettingPanel'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
styles
from
'./index.less'
;
...
...
@@ -117,14 +117,14 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
};
/**
* 获取app
店铺
装修信息
* 获取app装修信息
*/
const
getAppC
hannelC
onfig
=
():
Promise
<
any
>
=>
{
const
getAppConfig
=
():
Promise
<
any
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
:
any
=
{
templateId
:
id
,
};
PublicApi
.
getTemplateAdornApp
Channel
Find
(
param
)
PublicApi
.
getTemplateAdornApp
Self
Find
(
param
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
setTemplateInfo
(
res
.
data
)
...
...
@@ -144,8 +144,9 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
const
param
:
any
=
{
shopId
,
memberId
,
memberRoleId
};
PublicApi
.
getSearchC
hannelC
ommodityTemplateGetFirstCategoryListByMemberId
(
PublicApi
.
getSearchCommodityTemplateGetFirstCategoryListByMemberId
(
param
,
)
.
then
(
res
=>
{
...
...
@@ -175,6 +176,7 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
recommendLabel
:
[
2
,
3
],
};
const
res
=
await
PublicApi
.
getManageContentInformationPage
(
param
);
message
.
destroy
()
if
(
res
.
code
===
1000
&&
res
.
data
.
data
)
{
return
res
.
data
.
data
[
0
].
title
;
}
...
...
@@ -183,13 +185,15 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
const
getComponentsConfig
=
async
()
=>
{
try
{
const
appConfig
=
await
getAppChannelConfig
();
//渠道信息
const
channelInfo
=
await
fetchChannelInfo
();
const
appConfig
=
await
getAppConfig
();
// 商城信息
const
shopList
=
GlobalConfig
.
web
.
shopInfo
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
const
_mallLayoutConfig
:
any
=
cloneDeep
(
channelLayoutConfig
);
const
allState
=
{
top
:
defaultHeaderNavData
,
channelName
:
channelInfo
.
memberN
ame
,
channelName
:
webMallInfo
.
n
ame
,
categoryList
:
await
getFirstCategoryList
(),
navList
:
appConfig
?.
navList
?
appConfig
?.
navList
.
details
:
[],
advert
:
appConfig
?.
advert
?
appConfig
?.
advert
.
details
:
[],
...
...
@@ -1041,35 +1045,23 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
return
!
loading
?
(
<
BrickProvider
config=
{
config
}
>
<
Helmet
>
<
title
>
渠道装修-渠道主
页
</
title
>
<
title
>
自营商城装修-首
页
</
title
>
</
Helmet
>
<
div
className=
{
styles
[
'wrapper'
]
}
>
<
ToolBar
type=
{
1
}
title=
"
渠道商城
-首页"
showActions=
{
tru
e
}
layoutType=
{
LAYOUT_TYPE
.
channel
}
type=
{
2
}
title=
"
自营商城装修
-首页"
showActions=
{
fals
e
}
layoutType=
{
LAYOUT_TYPE
.
own
}
templateId=
{
id
}
templateInfo=
{
templateInfo
}
/>
<
div
className=
{
styles
[
'content'
]
}
>
<
MobileClientEditLeft
layoutType=
{
LAYOUT_TYPE
.
channel
}
marketConfigs=
{
MarketingConfigs
}
/>
<
div
className=
{
styles
[
'app-wrapper'
]
}
>
<
div
className=
{
styles
[
'app-canvas-container'
]
}
>
<
MobileDesignPanel
onlyEidt
theme=
{
theme
}
pageConfig=
{
componentConfigs
}
/>
<
MobileDesignPanel
isPreview
onlyEidt
theme=
{
theme
}
pageConfig=
{
componentConfigs
}
/>
</
div
>
</
div
>
<
MobileSettingPanel
shopId=
{
shopId
}
layoutType=
{
LAYOUT_TYPE
.
channel
}
/>
</
div
>
</
div
>
</
BrickProvider
>
...
...
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.less
View file @
d18f3db9
...
...
@@ -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;
}
}
\ No newline at end of file
}
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
View file @
d18f3db9
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
=
()
=>
{
...
...
@@ -51,10 +55,10 @@ const OwnMallAboutUs = () => {
const
[
saveLoading
,
setSaveLoading
]
=
useState
<
boolean
>
(
false
)
const
[
isFormChange
,
setIsFormChange
]
=
useState
<
boolean
>
(
false
)
const
[
albumUrls
,
setAlbumUrls
]
=
useState
<
any
[]
>
([])
const
[
albumUrls
,
setAlbumUrls
]
=
useState
<
any
[]
>
([])
const
[
allMallList
,
setAllMallList
]
=
useState
<
any
[]
>
([])
const
[
selectCityData
,
setSelectCityData
]
=
useState
<
any
>
([
defaultCityData
])
const
[
mallUrl
,
setMallUrl
]
=
useState
<
string
>
()
const
[
mallUrl
,
setMallUrl
]
=
useState
<
string
>
()
const
getAlbumUrls
=
(
data
)
=>
{
setAlbumUrls
(
data
);
...
...
@@ -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,16 +148,16 @@ 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
const
newAlbumUrls
=
albumName
&&
albumUrl
?
[{
name
:
albumName
,
url
:
albumUrl
}]
:
[]
workshopImgRef
.
current
.
setData
(
workshopPics
)
honorImgRef
.
current
.
setData
(
honorPics
)
workshopImgRef
.
current
?
.
setData
(
workshopPics
)
honorImgRef
.
current
?
.
setData
(
honorPics
)
form
.
setFieldsValue
({
...
rest
,
albumUrls
:
newAlbumUrls
...
...
@@ -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
>
...
...
@@ -272,4 +282,4 @@ const OwnMallAboutUs = () => {
)
}
export
default
observer
(
OwnMallAboutUs
)
\ No newline at end of file
export
default
observer
(
OwnMallAboutUs
)
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
View file @
d18f3db9
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
>
...
...
@@ -152,4 +163,4 @@ const SeoAdd = () => {
)
}
export
default
SeoAdd
\ No newline at end of file
export
default
SeoAdd
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
View file @
d18f3db9
...
...
@@ -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
)
})
})
...
...
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
View file @
d18f3db9
...
...
@@ -84,7 +84,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
message
.
info
(
"暂不支持该类型模板装修"
)
return
}
window
.
location
.
href
=
`
memberCenter/channelAbility
/template/categoryNavigation?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
&isSelf=1`
window
.
location
.
href
=
`
/memberCenter/ownMallAbility/ownMallManager
/template/categoryNavigation?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
.
shopId
}
&isSelf=1`
}
return
(
...
...
src/pages/priceManage/priceStrategy/component/PriceSetting.tsx
0 → 100644
View file @
d18f3db9
This diff is collapsed.
Click to expand it.
src/pages/priceManage/priceStrategy/component/priceSetting.tsx
View file @
d18f3db9
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
ISchemaFormActions
,
ISchema
,
FormEffectHooks
}
from
'@formily/antd'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
...
...
@@ -54,8 +54,8 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
}
=
usePageStatus
()
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getProductCommodityGetUnitPriceStrategy
({
id
}).
then
(
res
=>
{
if
(
id
)
{
PublicApi
.
getProductCommodityGetUnitPriceStrategy
({
id
}).
then
(
res
=>
{
const
{
initValue
}
=
transformDataForNiceForm
(
res
.
data
,
addSchemaAction
)
setInitialFormValue
(
initValue
)
dataRef
.
current
=
initValue
...
...
@@ -74,7 +74,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
addSchemaAction
.
setFieldState
(
'commodityMemberList'
,
state
=>
{
state
.
isDelete
=
true
})
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
let
hasMember
=
memberRef
.
current
.
rowSelectionCtl
.
selectRow
memberRef
.
current
.
rowSelectionCtl
.
setSelectRow
(
hasMember
.
filter
(
item
=>
item
.
memberId
!=
reocrd
.
memberId
))
}
...
...
@@ -99,7 +99,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
const
handleSetProductPrice
=
(
record
:
any
)
=>
{
console
.
log
(
record
,
'record'
)
if
(
record
?.
id
)
{
if
(
record
?.
id
)
{
priceRef
.
current
.
setVisible
(
true
)
priceRef
.
current
.
setCurrentSetPriceRow
(
record
)
}
...
...
@@ -131,27 +131,27 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
}
const
searchMember
=
(
value
)
=>
{
if
(
!
value
)
{
if
(
!
value
)
{
addSchemaAction
.
setFieldValue
(
"commodityMemberList"
,
addSchemaAction
.
getFieldState
(
"commodityMemberList"
)[
"dataSource"
])
return
;
return
;
}
let
commodityMemberList
=
addSchemaAction
.
getFieldValue
(
"commodityMemberList"
).
filter
(
item
=>
item
.
name
.
indexOf
(
value
)
!==
-
1
)
addSchemaAction
.
setFieldValue
(
"commodityMemberList"
,
commodityMemberList
)
}
/**
* 生成价格设置 table 和会员 column
* @param pId 商品id
* @param ctx action
* @param priceType 价格类型(可选)1现货2询价
*/
/**
* 生成价格设置 table 和会员 column
* @param pId 商品id
* @param ctx action
* @param priceType 价格类型(可选)1现货2询价
*/
const
producePriceTableMemerColumn
=
async
(
pId
,
ctx
,
priceType
?)
=>
{
const
res
=
await
PublicApi
.
getProductCommodityGetCommodityUnitPrice
({
id
:
pId
,})
const
res
=
await
PublicApi
.
getProductCommodityGetCommodityUnitPrice
({
id
:
pId
,
})
// 填充价格设置table(编辑采用initValue数据)
let
source
=
pageStatus
===
PageStatus
.
ADD
?
res
.
data
:
dataRef
.
current
[
"memberUnitPriceList"
]
const
{
columsUnit
,
tableUnitData
}
=
constructTableData
(
source
,
ctx
,
pageStatus
)
const
{
columsUnit
,
tableUnitData
}
=
constructTableData
(
source
,
ctx
,
pageStatus
)
ctx
.
setFieldState
(
"memberUnitPriceList"
,
state
=>
{
state
.
dataSource
=
source
// 存源数据
priceType
!==
2
?
columsUnit
.
push
({
...
...
@@ -160,8 +160,8 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
align
:
'center'
,
render
:
(
_i
,
_r
)
=>
<
Button
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
type=
'link'
onClick=
{
()
=>
handleSetProductPrice
(
_r
)
}
>
设置价格
</
Button
>
})
:
columsUnit
.
pop
()
:
columsUnit
.
pop
()
state
.
props
[
"x-component-props"
].
columns
=
columsUnit
})
ctx
.
setFieldValue
(
"memberUnitPriceList"
,
priceType
===
2
?
tableUnitData
.
map
(
item
=>
{
delete
item
[
"单价"
];
return
item
})
:
tableUnitData
)
...
...
@@ -170,7 +170,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
// 填充适用会员table
ctx
.
setFieldState
(
"commodityMemberList"
,
state
=>
{
memberColumns
[
memberColumns
.
length
-
1
].
render
=
(
text
,
record
)
=>
{
memberColumns
[
memberColumns
.
length
-
1
].
render
=
(
text
,
record
)
=>
{
return
<
Button
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
type=
'link'
onClick=
{
()
=>
handleDeleteMemberTable
(
record
)
}
>
删除
</
Button
>
}
state
.
props
[
"x-component-props"
].
columns
=
memberColumns
...
...
@@ -179,21 +179,21 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
// 新增会员
const
tableAddMemberButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
<>
<
p
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
flexWrap
:
'wrap'
}
}
>
<
p
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
flexWrap
:
'wrap'
}
}
>
<
Search
placeholder=
"会员名称"
onSearch=
{
value
=>
searchMember
(
value
)
}
style=
{
{
width
:
256
}
}
/>
</
p
>
<
Button
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAddMemberBtn
}
type=
'dashed'
>
选择指定会员
</
Button
>
<
Button
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAddMemberBtn
}
type=
'dashed'
>
选择指定会员
</
Button
>
</>
// 批量设置价格按钮
const
batchPriceButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
priceType
!==
2
&&
<
Button
type=
"text"
onClick=
{
clickBatchSetPrice
}
style=
{
{
marginBottom
:
12
,
float
:
"right"
}
}
><
SettingOutlined
/>
批量设置价格
</
Button
>
const
batchPriceButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
priceType
!==
2
&&
<
Button
type=
"text"
onClick=
{
clickBatchSetPrice
}
style=
{
{
marginBottom
:
12
,
float
:
"right"
}
}
><
SettingOutlined
/>
批量设置价格
</
Button
>
// 选择商品
const
connectProduct
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleAddProductBtn
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
connectProduct
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleAddProductBtn
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
questionNameLabel
=
<>
价格策略名称
...
...
@@ -240,14 +240,14 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
// :
// state.dataSource = GlobalConfig.web.shopInfo.filter(v => v.id === parentState.value)
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
state
.
props
[
'x-component-props'
].
disabled
=
true
;
}
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
state
.
props
[
'x-component-props'
].
disabled
=
true
;
}
})
ctx
.
setFieldState
(
'priceType'
,
state
=>
{
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
state
.
props
[
'x-component-props'
].
disabled
=
true
;
}
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
state
.
props
[
'x-component-props'
].
disabled
=
true
;
}
});
}
})
...
...
@@ -260,7 +260,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
$
(
"onFieldValueChange"
,
"priceType"
).
subscribe
(
parentState
=>
{
let
pId
=
ctx
.
getFieldValue
(
"productId"
)
if
(
pId
)
{
if
(
pId
)
{
producePriceTableMemerColumn
(
pId
,
ctx
,
parentState
.
value
)
}
setPriceType
(
parentState
.
value
)
...
...
src/pages/transaction/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill/index.tsx
View file @
d18f3db9
...
...
@@ -85,16 +85,16 @@ const LogisticsBillQuery = () => {
title
:
'操作'
,
key
:
'submitOrUpdateOrDel'
,
dataIndex
:
'submitOrUpdateOrDel'
,
render
:
(
text
,
data
)
=>
text
&&
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill/edit?id=${data.id}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
data
.
id
)
}
>
render
:
(
text
,
data
)
=>
<>
{
data
.
update
&&
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill/edit?id=${data.id}`
)
}
>
编辑
</
Button
>
}
{
data
.
submit
&&
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
data
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
data
.
id
)
}
>
</
Popconfirm
>
}
{
data
.
delete
&&
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
data
.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</
Popconfirm
>
}
</>
},
]
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/add/index.tsx
View file @
d18f3db9
...
...
@@ -138,7 +138,7 @@ const Add = () => {
},
[
initialValue
]);
const
fetchMallData
=
async
(
params
:
{
siteId
:
string
,
environment
:
string
})
=>
{
const
{
code
,
data
}
=
await
PublicApi
.
getManageShopFindShopsBySiteIdAndEnvironment
(
params
);
const
{
code
,
data
}
=
await
PublicApi
.
postManageWebShopWebAll
(
params
as
any
,
{
ctlType
:
'none'
}
);
if
(
code
===
1000
)
{
return
data
.
map
((
_item
)
=>
{
return
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineOne/index.tsx
View file @
d18f3db9
...
...
@@ -180,8 +180,7 @@ const ReadyExamineOne = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineTwo/index.tsx
View file @
d18f3db9
...
...
@@ -180,8 +180,7 @@ const ReadyExamineTwo = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmit/index.tsx
View file @
d18f3db9
...
...
@@ -193,8 +193,7 @@ const ReadySubmit = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/index.tsx
View file @
d18f3db9
...
...
@@ -210,8 +210,7 @@ const ReadySubmitExamine = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/paltformSign/search/index.tsx
View file @
d18f3db9
...
...
@@ -157,8 +157,7 @@ const Search = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readyExamineOne/index.tsx
View file @
d18f3db9
...
...
@@ -178,8 +178,7 @@ const ReadyExamineOne = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readyExamineTwo/index.tsx
View file @
d18f3db9
...
...
@@ -178,8 +178,7 @@ const ReadyExamineTwo = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readyLive/index.tsx
View file @
d18f3db9
...
...
@@ -192,8 +192,7 @@ const ReadyLive = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmit/index.tsx
View file @
d18f3db9
...
...
@@ -192,8 +192,7 @@ const ReadySubmit = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/index.tsx
View file @
d18f3db9
...
...
@@ -207,8 +207,7 @@ const ReadySubmitExamine = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/transaction/marketingAbility/selfManagement/search/index.tsx
View file @
d18f3db9
...
...
@@ -196,8 +196,7 @@ const Search = () => {
},
},
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
...
...
src/pages/user/components/ScanLoginWrap.tsx
View file @
d18f3db9
...
...
@@ -16,17 +16,36 @@ const ScanLoginWrap: React.FC = () => {
time
-=
2
;
console
.
log
(
time
);
timer
.
current
=
setTimeout
(()
=>
{
loginInfo
(
authCode
)
const
code
=
getUrlParam
(
authCode
,
'authCode'
);
loginInfo
(
code
)
hanleCountdown
(
authCode
);
},
2000
);
return
;
}
else
{
AuthCode
();
time
=
60
*
5
;
}
}
const
getUrlParam
=
(
url
:
string
,
name
:
string
)
=>
{
const
paraString
:
any
=
url
.
substring
(
url
.
indexOf
(
"?"
)
+
1
,
url
.
length
).
split
(
"&"
);
const
paraObj
:
any
=
{};
let
j
:
any
;
// eslint-disable-next-line no-cond-assign
// eslint-disable-next-line no-plusplus
for
(
let
i
=
0
;
j
=
paraString
[
i
];
i
++
)
{
paraObj
[
j
.
substring
(
0
,
j
.
indexOf
(
"="
)).
toLowerCase
()]
=
j
.
substring
(
j
.
indexOf
(
"="
)
+
1
,
j
.
length
);
}
const
returnValue
:
any
=
paraObj
[
name
.
toLowerCase
()];
if
(
typeof
(
returnValue
)
===
"undefined"
)
{
return
""
;
}
return
returnValue
;
}
const
AuthCode
=
()
=>
{
PublicApi
.
postMemberAuthCode
({},
{
ctlType
:
'none'
}).
then
(
res
=>
{
hanleCountdown
(
res
.
data
.
authCode
);
QRCode
.
toDataURL
(
res
.
data
.
authCode
).
then
((
url
:
any
)
=>
{
// /member/login/authUrl
PublicApi
.
postMemberLoginAuthUrl
({},
{
ctlType
:
'none'
}).
then
(
res
=>
{
hanleCountdown
(
res
.
data
.
authUrl
);
QRCode
.
toDataURL
(
res
.
data
.
authUrl
).
then
((
url
:
any
)
=>
{
setQrCode
(
url
)
console
.
log
(
url
)
})
...
...
@@ -53,6 +72,9 @@ const ScanLoginWrap: React.FC = () => {
}
else
{
window
.
location
.
replace
(
'/memberCenter/home'
)
}
console
.
log
(
redirect
,
'redirect'
)
clearTimeout
(
timer
.
current
)
timer
.
current
=
null
}
})
}
...
...
src/utils/request.ts
View file @
d18f3db9
...
...
@@ -72,7 +72,7 @@ const baseRequest = extend({
timeout
:
30
*
1000
,
headers
:
defaultHeaders
,
credentials
:
'include'
,
// 默认请求是否带上cookie
errorHandler
errorHandler
,
});
const
cache
=
{}
...
...
ytt.config.ts
View file @
d18f3db9
...
...
@@ -20,7 +20,7 @@ const tokenList = [
{
name
:
'SettleV2'
,
token
:
'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346'
,
categoryIds
:
[
0
]
},
{
name
:
'TransactionV2'
,
token
:
'3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1'
,
categoryIds
:
[
0
]
},
// 交易服务V2
{
name
:
'ContractV2'
,
token
:
'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4'
,
categoryIds
:
[
0
]
},
// 合同能力V2
{
name
:
'OrderV2'
,
token
:
'
033f83bd5f519506f65f46d1513b1f8028a1dc1b5238d22edd0a2feb53cd3a19
'
,
categoryIds
:
[
0
],
},
//订单服务V2
{
name
:
'OrderV2'
,
token
:
'
89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba
'
,
categoryIds
:
[
0
],
},
//订单服务V2
{
name
:
'OrderV2New'
,
token
:
'c11d6e07d958caff4fc5e26feaeb2637e38f1619e850cd2b6e7d5e7072d4989a'
,
categoryIds
:
[
0
],
},
//订单服务V2 New
{
name
:
'Platform'
,
token
:
'db3b086157528c865a1a1a9fafffa574e9c3f098c0518a7c374a72988ba1edbb'
,
categoryIds
:
[
0
]
},
// 平台后台v2
{
name
:
'ProductV2'
,
token
:
'b915026587fa1f6edf056f3335817fe2d4b350b0aa84da456786e15e83d45827'
,
categoryIds
:
[
0
],
},
// 商品服务V2
...
...
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