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
96b6db53
Commit
96b6db53
authored
Sep 28, 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
111dcd11
b314927f
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
404 additions
and
0 deletions
+404
-0
ownMallRoute.ts
config/routes/ownMallRoute.ts
+63
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
+9
-0
editMallModal.tsx
...MallManager/ownMallConfigure/components/editMallModal.tsx
+113
-0
constant.ts
...pages/ownMall/ownMallManager/ownMallConfigure/constant.ts
+51
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallConfigure/index.tsx
+138
-0
add.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
+10
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
+10
-0
index.tsx
src/pages/ownMall/ownMallManager/ownMallTemplate/index.tsx
+10
-0
No files found.
config/routes/ownMallRoute.ts
0 → 100644
View file @
96b6db53
/*
* 商城能力
* @Author: Crayon
* @Date: 2021-09-28
* @Last Modified by: ghua
* @Last Modified time: 2021-09-28 11:29:36
* @Description: 商城能力路由相关
*/
import
{
RouterChild
}
from
'../utils/index'
;
const
ownMallRoute
:
RouterChild
=
{
path
:
'/memberCenter/ownMallAbility'
,
name
:
'ownMallAbility'
,
icon
:
'shop'
,
routes
:
[
// 自营商城管理
{
path
:
'/memberCenter/ownMallAbility/ownMallManager'
,
name
:
'ownMallManager'
,
icon
:
'smile'
,
routes
:
[
// 自营商城配置
{
path
:
'/memberCenter/ownMallAbility/ownMallManager/ownMallConfigure'
,
name
:
'ownMallConfigure'
,
icon
:
'smile'
,
component
:
'@/pages/ownMall/ownMallManager/ownMallConfigure'
,
},
// 自营商城模板管理
{
path
:
'/memberCenter/ownMallAbility/ownMallManager/ownMallTemplate'
,
name
:
'ownMallTemplate'
,
icon
:
'smile'
,
component
:
'@/pages/ownMall/ownMallManager/ownMallTemplate'
,
},
// 自营商城SEO设置
{
path
:
'/memberCenter/ownMallAbility/ownMallManager/ownMallSeo'
,
name
:
'ownMallSeo'
,
icon
:
'smile'
,
component
:
'@/pages/ownMall/ownMallManager/ownMallSeo'
,
},
// 自营商城SEO设置-新增
{
path
:
'/memberCenter/ownMallAbility/ownMallManager/ownMallSeo/add'
,
name
:
'addOwnMallSeo'
,
hideInMenu
:
true
,
icon
:
'smile'
,
component
:
'@/pages/ownMall/ownMallManager/ownMallSeo/add'
,
},
// 自营商城关于我们信息设置
{
path
:
'/memberCenter/ownMallAbility/ownMallManager/ownMallAboutUs'
,
name
:
'ownMallAboutUs'
,
icon
:
'smile'
,
component
:
'@/pages/ownMall/ownMallManager/ownMallAboutUs'
,
},
]
},
]
}
export
default
ownMallRoute
src/pages/ownMall/ownMallManager/ownMallAboutUs/index.tsx
0 → 100644
View file @
96b6db53
import
React
from
'react'
export
default
function
index
()
{
return
(
<
div
>
</
div
>
)
}
src/pages/ownMall/ownMallManager/ownMallConfigure/components/editMallModal.tsx
0 → 100644
View file @
96b6db53
import
{
useState
,
useImperativeHandle
,
forwardRef
}
from
'react'
import
{
Modal
}
from
'antd'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
export
type
RefProps
=
{
show
:
(
flag
:
boolean
,
data
?:
any
)
=>
void
}
const
formActions
=
createFormActions
()
const
classSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
"x-component"
:
"mega-layout"
,
"x-component-props"
:
{
grid
:
true
,
columns
:
16
,
labelAlign
:
'top'
},
properties
:
{
noField1
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
full
:
true
,
},
"x-mega-props"
:
{
span
:
1
},
properties
:
{
name
:
{
type
:
'string'
,
title
:
'商城名称'
,
required
:
true
,
"x-component-props"
:
{
placeholder
:
'请输入商城名称'
},
"x-rules"
:
[
{
limitByte
:
true
,
maxByte
:
20
}
]
},
describe
:
{
type
:
'string'
,
title
:
'商城描述'
,
"x-component-props"
:
{
placeholder
:
'请输入商城描述'
},
"x-rules"
:
[
{
limitByte
:
true
,
maxByte
:
80
}
]
},
logoUrl
:
{
title
:
'商城LOGO'
,
'x-component'
:
'CustomUpload'
},
}
},
}
}
}
}
const
Page
=
({
onOk
}:
any
,
ref
:
any
)
=>
{
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
[
initData
,
setInitData
]
=
useState
<
any
>
({})
useImperativeHandle
(
ref
,
()
=>
({
show
(
flag
:
boolean
,
data
?:
any
)
{
if
(
data
)
{
setInitData
(
data
)
}
setVisible
(
flag
)
}
}))
const
onFinish
=
(
value
)
=>
{
onOk
&&
onOk
(
value
)
setVisible
(
false
)
}
return
(
<
Modal
title=
'修改商城信息'
maskClosable=
{
false
}
destroyOnClose
visible=
{
visible
}
onOk=
{
()
=>
formActions
.
submit
()
}
onCancel=
{
()
=>
setVisible
(
false
)
}
>
<
NiceForm
value=
{
initData
}
name=
'classForm'
onSubmit=
{
onFinish
}
actions=
{
formActions
}
schema=
{
classSchema
}
>
</
NiceForm
>
</
Modal
>
)
}
export
default
forwardRef
(
Page
)
src/pages/ownMall/ownMallManager/ownMallConfigure/constant.ts
0 → 100644
View file @
96b6db53
/**
* 商城类型
*/
export
const
MALL_TYPE
=
{
1
:
'企业商城'
,
2
:
'积分商城'
,
3
:
'渠道商城'
,
4
:
'渠道自有商城'
,
5
:
'渠道积分商城'
,
6
:
'采购门户'
,
7
:
'物流服务门户'
,
8
:
'加工服务门户'
,
9
:
'行情资讯门户'
}
/**
* 商城环境
*/
export
const
MALL_ENV
=
{
1
:
'web'
,
2
:
'H5'
,
3
:
'小程序'
,
4
:
'APP'
}
/**
* 商城属性
*/
export
const
MALL_PROPERTY
=
{
1
:
'B端商城'
,
2
:
'C端商城 '
,
3
:
'B端自营商城'
,
4
:
'C端自营商城'
}
/**
* 是否默认
*/
export
const
IS_DEFAULT
=
{
0
:
'否'
,
1
:
'是 '
,
}
/**
* 是否默认-COLOR
*/
export
const
IS_DEFAULT_COLOR
=
{
0
:
'default'
,
1
:
'processing '
,
}
\ No newline at end of file
src/pages/ownMall/ownMallManager/ownMallConfigure/index.tsx
0 → 100644
View file @
96b6db53
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Image
,
Tag
,
Button
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
MALL_ENV
,
MALL_PROPERTY
,
IS_DEFAULT
}
from
'./constant'
import
EditMallModal
,
{
RefProps
}
from
'./components/editMallModal'
import
{
StandardTable
}
from
'god'
const
OwnMallConfigure
=
()
=>
{
const
modalRef
=
useRef
<
RefProps
>
()
// 已选商城列表columns
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'商城ID'
,
key
:
'id'
,
dataIndex
:
'id'
},
{
title
:
'商城名称'
,
key
:
'name'
,
dataIndex
:
'name'
},
{
title
:
'商城LOGO'
,
key
:
'logoUrl'
,
dataIndex
:
'logoUrl'
,
render
:
(
tetx
)
=>
<
Image
src=
{
tetx
}
width=
{
40
}
/>
},
{
title
:
'商城环境'
,
key
:
'environment'
,
dataIndex
:
'environment'
,
render
:
(
text
)
=>
MALL_ENV
[
text
]
},
{
title
:
'商城属性'
,
key
:
'property'
,
dataIndex
:
'property'
,
render
:
(
text
)
=>
MALL_PROPERTY
[
text
]
},
{
title
:
'商城地址'
,
key
:
'url'
,
dataIndex
:
'url'
},
{
title
:
'商城描述'
,
key
:
'describe'
,
dataIndex
:
'describe'
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"state"
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
/>
)
},
{
title
:
'是否默认'
,
key
:
'isDefault'
,
dataIndex
:
'isDefault'
,
render
:
(
text
)
=>
IS_DEFAULT
[
text
]
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
_text
,
record
)
=>
{
return
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
modalRef
.
current
.
show
(
true
,
record
)
}
>
修改
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
{}
}
>
{
record
.
isDefault
===
1
?
'取消默认'
:
'设为默认'
}
</
Button
>
</>
)
}
}
]
// 改变状态
const
handleModify
=
async
(
record
:
any
)
=>
{
}
// 修改商城信息回调
const
onEdit
=
()
=>
{
}
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getManageActivityShopRuleList
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyLayouts=
{
{
justify
:
"space-between"
}
}
formilyProps=
{
{
layouts
:
{
order
:
3
},
ctx
:
{
schema
:
{
type
:
'object'
,
properties
:
{
name
:
{
type
:
'string'
,
"x-component"
:
'search'
,
"x-component-props"
:
{
placeholder
:
'输入商城名称'
}
}
}
}
}
}
}
/>
<
EditMallModal
ref=
{
modalRef
}
onOk=
{
onEdit
}
/>
</>
)
}
export
default
OwnMallConfigure
;
src/pages/ownMall/ownMallManager/ownMallSeo/add.tsx
0 → 100644
View file @
96b6db53
import
React
from
'react'
export
default
function
index
()
{
return
(
<
div
>
</
div
>
)
}
\ No newline at end of file
src/pages/ownMall/ownMallManager/ownMallSeo/index.tsx
0 → 100644
View file @
96b6db53
import
React
from
'react'
export
default
function
index
()
{
return
(
<
div
>
</
div
>
)
}
\ No newline at end of file
src/pages/ownMall/ownMallManager/ownMallTemplate/index.tsx
0 → 100644
View file @
96b6db53
import
React
from
'react'
export
default
function
index
()
{
return
(
<
div
>
</
div
>
)
}
\ No newline at end of file
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