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
f47136da
Commit
f47136da
authored
Sep 24, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
151a7446
d57e90fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
377 additions
and
182 deletions
+377
-182
index.ts
config/shopRoutes/index.ts
+23
-23
index.less
src/components/NestTable/index.less
+0
-0
index.tsx
src/components/NestTable/index.tsx
+56
-0
index.tsx
src/pages/lxMall/commodity/index.tsx
+8
-1
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+23
-8
index.tsx
src/pages/lxMall/components/Category/index.tsx
+14
-1
index.tsx
...pages/lxMall/components/Filter/components/Brand/index.tsx
+15
-1
index.tsx
...es/lxMall/components/Filter/components/Category/index.tsx
+19
-1
index.tsx
...ges/lxMall/components/Filter/components/UseArea/index.tsx
+15
-1
index.tsx
src/pages/lxMall/components/ShopHeader/index.tsx
+6
-7
index.less
...lxMall/information/components/informationRight/index.less
+10
-0
index.tsx
.../lxMall/information/components/informationRight/index.tsx
+112
-47
index.less
src/pages/lxMall/information/index.less
+31
-12
index.tsx
src/pages/lxMall/information/index.tsx
+0
-0
index.tsx
src/pages/lxMall/pointsMall/index.tsx
+18
-4
index.tsx
src/pages/lxMall/shop/index.tsx
+1
-1
PositionSetting.tsx
src/pages/repositories/components/PositionSetting.tsx
+24
-31
index.ts
src/store/category/index.ts
+2
-44
No files found.
config/shopRoutes/index.ts
View file @
f47136da
...
...
@@ -41,29 +41,29 @@ const shopRoute = {
key
:
'shopPointsMall'
,
component
:
'@/pages/lxMall/pointsMall'
,
},
{
// 资讯
path
:
`/shop/infomation`
,
name
:
'shopInfomation'
,
key
:
'shopInfomation'
,
component
:
'@/pages/lxMall/information'
,
},
{
// 资讯详情
path
:
'/shop/infomation/detail'
,
name
:
'infomationDetail'
,
key
:
'infomationDetail'
,
hide
:
true
,
component
:
'@/pages/lxMall/information/detail'
,
},
{
// 资讯详情搜索
path
:
'/shop/infomation/search'
,
name
:
'infomationSearch'
,
key
:
'infomationSearch'
,
hide
:
true
,
component
:
'@/pages/lxMall/information/search'
,
},
//
{
//
// 资讯
//
path: `/shop/infomation`,
//
name: 'shopInfomation',
//
key: 'shopInfomation',
//
component: '@/pages/lxMall/information',
//
},
//
{
//
// 资讯详情
//
path: '/shop/infomation/detail',
//
name: 'infomationDetail',
//
key: 'infomationDetail',
//
hide: true,
//
component: '@/pages/lxMall/information/detail',
//
},
//
{
//
// 资讯详情搜索
//
path: '/shop/infomation/search',
//
name: 'infomationSearch',
//
key: 'infomationSearch',
//
hide: true,
//
component: '@/pages/lxMall/information/search',
//
},
{
// 关于我们
path
:
`/shop/about`
,
...
...
src/components/NestTable/index.less
0 → 100644
View file @
f47136da
src/components/NestTable/index.tsx
0 → 100644
View file @
f47136da
import
React
,
{
useCallback
}
from
'react'
import
{
Table
}
from
'antd'
import
{
TableProps
,
ColumnsType
}
from
'antd/es/table'
import
{
CaretRightOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
export
interface
NestTableProps
extends
TableProps
<
any
>
{
/**
* 扁平化的递归嵌套类型, 后面一项永远为前一项的直系子集
*/
NestColumns
:
ColumnsType
<
any
>
[],
// 指定获得的子集数据类型
childrenDataKey
:
string
}
/**
* 嵌套表格
* @todo 实现无限嵌套, 目前暂时实现两层
*/
const
NestTable
:
React
.
FC
<
NestTableProps
>
=
(
props
)
=>
{
const
{
NestColumns
,
childrenDataKey
,
dataSource
,
...
resetProps
}
=
props
if
(
NestColumns
.
length
>
2
)
{
throw
new
Error
(
'暂时不支持2项以上的嵌套table'
)
}
const
[
parentColumns
=
[],
childColumns
=
[]]
=
NestColumns
const
childRenderTable
=
useCallback
((
record
)
=>
{
return
<
Table
columns=
{
childColumns
}
dataSource=
{
dataSource
[
childrenDataKey
]
||
[]
}
/>
},
[
childColumns
,
dataSource
])
return
(
<
Table
columns=
{
parentColumns
}
dataSource=
{
dataSource
}
expandable=
{
{
expandedRowRender
:
childRenderTable
,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
:
(
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
}
}
pagination=
{
false
}
{
...
resetProps
}
/>
)
}
NestTable
.
defaultProps
=
{}
export
default
NestTable
\ No newline at end of file
src/pages/lxMall/commodity/index.tsx
View file @
f47136da
...
...
@@ -118,6 +118,7 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
}
setLoading
(
true
)
let
getFn
;
let
headers
=
{}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
getSearchShopEnterpriseGetCommodityList
...
...
@@ -128,16 +129,22 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
break
case
LAYOUT_TYPE
.
channel
:
param
.
channelMemberId
=
memberId
headers
=
{
type
:
3
}
getFn
=
PublicApi
.
getSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
param
.
channelMemberId
=
memberId
headers
=
{
type
:
4
}
getFn
=
PublicApi
.
getSearchShopChannelGetCommodityList
break
}
//@ts-ignore
getFn
&&
getFn
(
param
).
then
(
res
=>
{
getFn
&&
getFn
(
param
,
{
headers
}
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
setCommodityList
(
res
.
data
.
data
)
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
f47136da
...
...
@@ -85,13 +85,28 @@ const CommodityDetail = (props) => {
let
params
:
any
=
{
commodityId
:
id
}
if
(
layoutType
===
LAYOUT_TYPE
.
channel
)
{
params
.
channelMemberId
=
memberId
getDetailFn
=
PublicApi
.
getSearchShopChannelGetCommodityDetail
}
else
{
getDetailFn
=
PublicApi
.
getSearchShopStoreGetCommodityDetail
let
headers
=
{}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
params
.
channelMemberId
=
memberId
getDetailFn
=
PublicApi
.
getSearchShopChannelGetCommodityDetail
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
params
.
channelMemberId
=
memberId
getDetailFn
=
PublicApi
.
getSearchShopChannelGetCommodityDetail
break
default
:
getDetailFn
=
PublicApi
.
getSearchShopStoreGetCommodityDetail
break
}
getDetailFn
(
params
).
then
(
res
=>
{
getDetailFn
&&
getDetailFn
(
params
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// res.data.priceType = 3
setCommodityDetail
(
res
.
data
)
...
...
@@ -422,7 +437,7 @@ const CommodityDetail = (props) => {
})
if
(
!
judgeAttrValueInList
(
tempAttrList
[
tempAttrListIndex
].
customerAttributeValueList
,
attrListItem
.
customerAttributeValue
.
id
))
{
if
(
tempAttrListIndex
===
0
)
{
attrListItem
.
customerAttributeValue
.
commodityPic
=
item
.
commodityPic
[
0
]
item
.
commodityPic
&&
(
attrListItem
.
customerAttributeValue
.
commodityPic
=
item
.
commodityPic
[
0
])
}
tempAttrList
[
tempAttrListIndex
].
customerAttributeValueList
=
[...
tempAttrList
[
tempAttrListIndex
].
customerAttributeValueList
,
attrListItem
.
customerAttributeValue
]
}
...
...
@@ -432,7 +447,7 @@ const CommodityDetail = (props) => {
temp
.
customerAttribute
=
attrListItem
.
customerAttribute
if
(
tempAttrList
.
length
===
0
)
{
attrListItem
.
customerAttributeValue
.
commodityPic
=
item
.
commodityPic
[
0
]
item
.
commodityPic
&&
(
attrListItem
.
customerAttributeValue
.
commodityPic
=
item
.
commodityPic
[
0
])
temp
.
customerAttributeValueList
=
[
attrListItem
.
customerAttributeValue
]
}
else
{
temp
.
customerAttributeValueList
=
[
attrListItem
.
customerAttributeValue
]
...
...
src/pages/lxMall/components/Category/index.tsx
View file @
f47136da
...
...
@@ -26,6 +26,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect
(()
=>
{
let
getCategoryFn
let
params
:
any
=
{}
let
headers
=
{}
switch
(
type
)
{
case
LAYOUT_TYPE
.
mall
:
if
(
mallTemplateId
)
{
...
...
@@ -42,11 +43,23 @@ const Category: React.FC<CategoryPropsType> = (props) => {
}
break
case
LAYOUT_TYPE
.
channel
:
if
(
memberId
)
{
headers
=
{
type
:
3
}
params
.
channelMemberId
=
memberId
getCategoryFn
=
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
fetchCategoryList
(
getCategoryFn
,
params
,
type
,
{
headers
})
}
break
case
LAYOUT_TYPE
.
ichannel
:
if
(
memberId
)
{
headers
=
{
type
:
4
}
params
.
channelMemberId
=
memberId
getCategoryFn
=
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
fetchCategoryList
(
getCategoryFn
,
params
,
type
)
fetchCategoryList
(
getCategoryFn
,
params
,
type
,
{
headers
}
)
}
break
default
:
...
...
src/pages/lxMall/components/Filter/components/Brand/index.tsx
View file @
f47136da
...
...
@@ -21,6 +21,7 @@ const Brand: React.FC<BrandPropsType> = (props) => {
useEffect
(()
=>
{
let
getBrandFn
let
param
:
any
=
{}
let
headers
=
{}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getBrandFn
=
PublicApi
.
getSearchShopEnterpriseGetBrand
...
...
@@ -30,15 +31,28 @@ const Brand: React.FC<BrandPropsType> = (props) => {
getBrandFn
=
PublicApi
.
getSearchShopStoreGetBrand
break
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
param
.
channelMemberId
=
memberId
getBrandFn
=
PublicApi
.
getSearchShopChannelGetBrand
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
param
.
channelMemberId
=
memberId
getBrandFn
=
PublicApi
.
getSearchShopChannelGetBrand
break
case
LAYOUT_TYPE
.
channelScoreMall
:
headers
=
{
type
:
5
}
param
.
channelMemberId
=
memberId
getBrandFn
=
PublicApi
.
getSearchShopChannelGetBrand
break
}
getBrandFn
&&
getBrandFn
(
param
).
then
((
res
)
=>
{
getBrandFn
&&
getBrandFn
(
param
,
{
headers
}
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setBrandList
(
res
.
data
)
}
...
...
src/pages/lxMall/components/Filter/components/Category/index.tsx
View file @
f47136da
...
...
@@ -47,6 +47,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect
(()
=>
{
let
getCategoryListFn
let
param
:
any
=
{}
let
headers
=
{}
/**
* 根据不通过的页面类型,请求不同的品类接口
*/
...
...
@@ -59,6 +60,23 @@ const Category: React.FC<CategoryPropsType> = (props) => {
getCategoryListFn
=
PublicApi
.
getSearchShopStoreGetCustomerCategoryTree
break
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
param
.
channelMemberId
=
memberId
getCategoryListFn
=
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
param
.
channelMemberId
=
memberId
getCategoryListFn
=
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
break
case
LAYOUT_TYPE
.
channelScoreMall
:
headers
=
{
type
:
5
}
param
.
channelMemberId
=
memberId
getCategoryListFn
=
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
break
...
...
@@ -74,7 +92,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
default
:
break
}
getCategoryListFn
&&
getCategoryListFn
(
param
).
then
((
res
)
=>
{
getCategoryListFn
&&
getCategoryListFn
(
param
,
{
headers
}
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setCategoryList
(
initTreeData
(
res
.
data
))
}
...
...
src/pages/lxMall/components/Filter/components/UseArea/index.tsx
View file @
f47136da
...
...
@@ -66,6 +66,7 @@ const UseArea: React.FC<UseAreaPropsType> = (props) => {
useEffect
(()
=>
{
let
getAreaFn
let
param
:
any
=
{}
let
headers
=
{}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
case
LAYOUT_TYPE
.
shopList
:
...
...
@@ -76,15 +77,28 @@ const UseArea: React.FC<UseAreaPropsType> = (props) => {
getAreaFn
=
PublicApi
.
getSearchShopStoreGetArea
break
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
param
.
channelMemberId
=
memberId
getAreaFn
=
PublicApi
.
getSearchShopChannelGetArea
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
param
.
channelMemberId
=
memberId
getAreaFn
=
PublicApi
.
getSearchShopChannelGetArea
break
case
LAYOUT_TYPE
.
channelScoreMall
:
headers
=
{
type
:
5
}
param
.
channelMemberId
=
memberId
getAreaFn
=
PublicApi
.
getSearchShopChannelGetArea
break
}
getAreaFn
&&
getAreaFn
(
param
).
then
((
res
)
=>
{
getAreaFn
&&
getAreaFn
(
param
,
{
headers
}
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setAreaList
(
initAreaData
(
res
.
data
))
}
...
...
src/pages/lxMall/components/ShopHeader/index.tsx
View file @
f47136da
...
...
@@ -56,15 +56,14 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
<
div
className=
{
styles
.
shop_header_info_content_about
}
>
<
div
className=
{
styles
.
shop_header_info_content_about_item
}
>
<
i
className=
{
styles
.
icon
}
><
img
src=
{
shop_icon
}
/></
i
>
<
span
className=
{
styles
.
red
}
>
2
</
span
>
<
span
className=
{
styles
.
red
}
>
{
shopInfo
?.
registerYears
}
</
span
>
<
span
>
年
</
span
>
</
div
>
<
div
className=
{
styles
.
shop_header_info_content_about_item
}
>
<
i
className=
{
styles
.
icon
}
><
img
src=
{
credit_icon
}
/></
i
>
<
span
>
1288
</
span
>
<
span
>
{
200
}
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
shop_info
}
>
<
div
className=
{
styles
.
shop_info_title
}
>
...
...
@@ -75,19 +74,19 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
<
div
className=
{
styles
.
shop_info_list
}
>
<
div
className=
{
styles
.
shop_info_list_item
}
>
<
div
className=
{
styles
.
label
}
>
满意度:
</
div
>
<
div
className=
{
styles
.
breif
}
><
Rate
className=
"star"
count=
{
4
}
disabled
defaultValue=
{
4
}
/></
div
>
<
div
className=
{
styles
.
breif
}
><
Rate
className=
{
styles
.
star
}
count=
{
4
}
disabled
defaultValue=
{
4
}
/></
div
>
</
div
>
<
div
className=
{
styles
.
shop_info_list_item
}
>
<
div
className=
{
styles
.
label
}
>
注册资本:
</
div
>
<
div
className=
{
styles
.
breif
}
>
5
000万元
</
div
>
<
div
className=
{
styles
.
breif
}
>
1
000万元
</
div
>
</
div
>
<
div
className=
{
styles
.
shop_info_list_item
}
>
<
div
className=
{
styles
.
label
}
>
成立日期:
</
div
>
<
div
className=
{
styles
.
breif
}
>
20
14-09-09
</
div
>
<
div
className=
{
styles
.
breif
}
>
20
20-09-01
</
div
>
</
div
>
<
div
className=
{
styles
.
shop_info_list_item
}
>
<
div
className=
{
styles
.
label
}
>
营业执照:
</
div
>
<
div
className=
{
styles
.
breif
}
><
span
className=
"certified"
>
[已认证]
</
span
></
div
>
<
div
className=
{
styles
.
breif
}
><
span
className=
"certified"
>
{
shopInfo
?.
outerStatus
===
3
?
'[已认证]'
:
'[未认证]'
}
</
span
></
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
dashed_split
}
></
div
>
...
...
src/pages/lxMall/information/components/informationRight/index.less
View file @
f47136da
...
...
@@ -15,6 +15,10 @@
align-items: center;
margin-bottom: 30px;
a {
color: #333333;
}
&.first {
.information_lead_news_list_item_sort {
position: relative;
...
...
@@ -40,6 +44,8 @@
white-space: normal;
font-weight: 500;
padding-left: 20px;
}
}
...
...
@@ -101,6 +107,10 @@
font-size: 12px;
margin-top: 15px;
margin-bottom: 10px;
&>a {
color: #333333;
}
}
&_date {
...
...
src/pages/lxMall/information/components/informationRight/index.tsx
View file @
f47136da
import
React
from
'react'
import
React
,
{
useState
,
useEffect
,
Fragment
}
from
'react'
import
cx
from
'classnames'
import
informationImg2
from
'@/assets/imgs/information_2.png'
import
ImageBox
from
'@/components/ImageBox'
import
{
PublicApi
}
from
'@/services/api'
import
{
Link
}
from
'umi'
import
moment
from
'moment'
import
{
GetManageContentLabelHotResponse
}
from
'@/services/PassApi'
import
styles
from
'./index.less'
const
TAG_LIST
=
[
...
...
@@ -49,34 +55,91 @@ const TAG_LIST = [
const
InformationRight
:
React
.
FC
=
()
=>
{
const
[
leadNews
,
setLeadNews
]
=
useState
<
any
[]
>
([])
// 头条新闻
const
[
recommendNews
,
setRecommendNews
]
=
useState
<
any
[]
>
([])
// 推荐新闻
const
[
hotLabel
,
setHotLabel
]
=
useState
<
GetManageContentLabelHotResponse
>
([])
// 热门标签
useEffect
(()
=>
{
Promise
.
all
([
fetchLeadNews
(),
fetchRecommomendNews
()])
fetchHotLabl
()
},
[])
/**
* 获取头条新闻
*/
const
fetchLeadNews
=
async
()
=>
{
try
{
let
data
:
any
=
await
fetchNewByLabel
(
1
)
data
&&
setLeadNews
(
data
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
/**
* 获取推荐新闻
*/
const
fetchRecommomendNews
=
async
()
=>
{
try
{
let
data
:
any
=
await
fetchNewByLabel
(
4
)
data
&&
setRecommendNews
(
data
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
/**
* 获取热门标签
*/
const
fetchHotLabl
=
()
=>
{
PublicApi
.
getManageContentLabelHot
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setHotLabel
(
res
.
data
)
}
})
}
const
fetchNewByLabel
=
(
label
)
=>
{
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
label
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
return
(
<
div
className=
{
styles
.
information_right
}
>
<
div
className=
{
styles
.
information_title
}
>
<
span
>
头条文章
</
span
>
</
div
>
<
div
className=
{
styles
.
information_lead_news
}
>
<
ImageBox
width=
{
336
}
height=
{
224
}
imgUrl=
{
informationImg2
}
/>
{
(
leadNews
&&
leadNews
[
0
])
&&
(
<
Link
to=
{
`/infomation/detail?id=${leadNews[0]?.id}`
}
>
<
ImageBox
width=
{
336
}
height=
{
224
}
imgUrl=
{
leadNews
[
0
]?.
imageUrl
}
/>
</
Link
>
)
}
<
div
className=
{
styles
.
information_lead_news_list
}
>
<
div
className=
{
cx
(
styles
.
information_lead_news_list_item
,
styles
.
first
)
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
01
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
杨幂蔡依林撞包,原来今年时髦的包包长杨幂蔡依林撞包,原来今年时髦原来今年时髦原来今
</
div
>
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
02
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
维柯(VECO)公司——第20届中国国际展览盛大开幕
</
div
>
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
03
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
广交会同期2017秋季广州国际鞋类皮革鞋火爆开场热销
</
div
>
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
04
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
你有钱,我不一定有货!2017年涨价已成定局
</
div
>
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
05
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
智造新契机——第二十二届温州国际皮革火爆开场热销
</
div
>
</
div
>
{
leadNews
&&
leadNews
.
map
((
item
:
any
,
index
:
number
)
=>
index
<
5
&&
(
<
div
key=
{
`information_lead_news_list_item_${item.id}`
}
className=
{
cx
(
styles
.
information_lead_news_list_item
,
index
===
0
?
styles
.
first
:
''
)
}
>
<
div
className=
{
styles
.
information_lead_news_list_item_sort
}
>
{
`0${index + 1}`
}
</
div
>
<
div
className=
{
styles
.
information_lead_news_list_item_title
}
>
<
Link
to=
{
`/infomation/detail?id=${item.id}`
}
>
{
item
.
title
}
</
Link
>
</
div
>
</
div
>
))
}
</
div
>
</
div
>
<
div
className=
{
styles
.
information_title
}
>
...
...
@@ -84,7 +147,7 @@ const InformationRight: React.FC = () => {
</
div
>
<
div
className=
{
styles
.
information_new_label_list
}
>
{
TAG_LIST
.
map
(
item
=>
(
hotLabel
.
map
(
item
=>
(
<
div
key=
{
`information_new_label_list_item_${item.id}`
}
className=
{
styles
.
information_new_label_list_item
}
>
<
span
>
{
item
.
name
}
</
span
>
</
div
>
...
...
@@ -95,31 +158,33 @@ const InformationRight: React.FC = () => {
<
span
>
推荐阅读
</
span
>
</
div
>
<
div
className=
{
styles
.
information_recommend
}
>
<
ImageBox
width=
{
336
}
height=
{
224
}
imgUrl=
{
informationImg2
}
/>
<
p
className=
{
styles
.
information_recommend_main_title
}
>
收藏!制革污水新技术
</
p
>
<
div
className=
{
styles
.
information_recommend_date
}
>
2019-09-15
</
div
>
{
(
recommendNews
&&
recommendNews
[
0
])
&&
(
<
Fragment
>
<
Link
to=
{
`/infomation/detail?id=${recommendNews[0].id}`
}
>
<
ImageBox
width=
{
336
}
height=
{
224
}
imgUrl=
{
recommendNews
[
0
].
imageUrl
}
/>
</
Link
>
<
p
className=
{
styles
.
information_recommend_main_title
}
>
<
Link
to=
{
`/infomation/detail?id=${recommendNews[0].id}`
}
>
{
recommendNews
[
0
].
title
}
</
Link
>
</
p
>
<
div
className=
{
styles
.
information_recommend_date
}
>
{
(
moment
(
recommendNews
[
0
].
createTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
))
}
</
div
>
</
Fragment
>
)
}
<
div
className=
{
styles
.
information_recommend_list
}
>
<
div
className=
{
styles
.
information_recommend_list_item
}
>
<
ImageBox
imgUrl=
{
informationImg2
}
/>
<
div
className=
{
styles
.
information_recommend_list_item_main
}
>
<
p
className=
{
styles
.
information_recommend_list_item_main_title
}
>
智造新契机——第二十二届温州国际皮革火爆开场热销
</
p
>
<
div
className=
{
styles
.
information_recommend_list_item_main_date
}
>
2019-09-15
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
information_recommend_list_item
}
>
<
ImageBox
imgUrl=
{
informationImg2
}
/>
<
div
className=
{
styles
.
information_recommend_list_item_main
}
>
<
p
className=
{
styles
.
information_recommend_list_item_main_title
}
>
智造新契机——第二十二届温州国际皮革火爆开场热销
</
p
>
<
div
className=
{
styles
.
information_recommend_list_item_main_date
}
>
2019-09-15
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
information_recommend_list_item
}
>
<
ImageBox
imgUrl=
{
informationImg2
}
/>
<
div
className=
{
styles
.
information_recommend_list_item_main
}
>
<
p
className=
{
styles
.
information_recommend_list_item_main_title
}
>
智造新契机——第二十二届温州国际皮革火爆开场热销
</
p
>
<
div
className=
{
styles
.
information_recommend_list_item_main_date
}
>
2019-09-15
</
div
>
</
div
>
</
div
>
{
recommendNews
&&
recommendNews
.
map
((
item
:
any
,
index
:
number
)
=>
index
>
0
&&
(
<
div
key=
{
`information_recommend_list_item_${item.id}`
}
className=
{
styles
.
information_recommend_list_item
}
>
<
ImageBox
imgUrl=
{
informationImg2
}
/>
<
div
className=
{
styles
.
information_recommend_list_item_main
}
>
<
p
className=
{
styles
.
information_recommend_list_item_main_title
}
>
{
item
.
title
}
</
p
>
<
div
className=
{
styles
.
information_recommend_list_item_main_date
}
>
{
(
moment
(
item
.
createTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
))
}
</
div
>
</
div
>
</
div
>
))
}
</
div
>
</
div
>
</
div
>
...
...
src/pages/lxMall/information/index.less
View file @
f47136da
...
...
@@ -83,8 +83,14 @@
}
&_right {
position: relative;
display: flex;
flex-wrap: wrap;
.information_focus_imgbox_sub_1 {
position: relative;
height: 220px;
overflow: hidden;
&_img {
width: 598px;
...
...
@@ -104,25 +110,32 @@
white-space: nowrap;
font-size: 14px;
margin-bottom: 0;
width: 100%;
}
.information_focus_imgbox_sub_2 {
position: relative;
margin-top: 4px;
height: 220px;
width: 297px;
overflow: hidden;
&:not(:last-child) {
margin-right: 4px;
}
&_img {
width: 297px;
height: 220px;
.common_background()
}
}
.information_focus_sub_bottom {
display: flex;
margin-top: 4px;
.information_focus_imgbox_sub_2 {
position: relative;
&:not(:last-child) {
margin-right: 4px;
}
&_img {
width: 297px;
height: 220px;
.common_background()
}
}
}
}
...
...
@@ -295,6 +308,12 @@
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
&>a {
color: #ffffff;
}
}
&>a {
color: #ffffff;
}
...
...
src/pages/lxMall/information/index.tsx
View file @
f47136da
This diff is collapsed.
Click to expand it.
src/pages/lxMall/pointsMall/index.tsx
View file @
f47136da
...
...
@@ -37,6 +37,8 @@ interface filterQuery {
Max
?:
number
;
priceType
?:
number
;
storeId
?:
number
;
channelMemberId
?:
number
;
}
const
PointsMall
:
React
.
FC
<
CommodityPropsType
>
=
(
props
)
=>
{
...
...
@@ -79,14 +81,25 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
param
=
Object
.
assign
(
param
,
filterParam
)
}
setLoading
(
true
)
let
headers
=
{}
let
getFn
=
PublicApi
.
getSearchShopScoreGetCommodityList
if
(
layoutType
===
LAYOUT_TYPE
.
shop
)
{
param
.
storeId
=
shopId
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
shop
:
param
.
storeId
=
shopId
break
case
LAYOUT_TYPE
.
channel
:
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
5
}
param
.
channelMemberId
=
memberId
param
.
priceType
=
3
getFn
=
PublicApi
.
getSearchShopChannelGetCommodityList
break
}
//@ts-ignore
getFn
(
param
).
then
(
res
=>
{
getFn
(
param
,
{
headers
}
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
setCommodityList
(
res
.
data
.
data
)
...
...
@@ -125,6 +138,7 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
result
=
LAYOUT_TYPE
.
shopScoreMall
break
case
LAYOUT_TYPE
.
channel
:
case
LAYOUT_TYPE
.
ichannel
:
result
=
LAYOUT_TYPE
.
channelScoreMall
break
}
...
...
src/pages/lxMall/shop/index.tsx
View file @
f47136da
...
...
@@ -140,7 +140,7 @@ const ShopIndex: React.FC<ChannelIndexPropsType> = (props) => {
categoryComponents
?
categoryComponents
:
<
FloorSkeleton
type=
{
LAYOUT_TYPE
.
shop
}
/>
}
<
Advert
visible=
{
secondAdvertList
.
length
>
0
}
type=
"service"
advertList=
{
secondAdvertList
}
/>
<
Information
/>
{
/* <Information /> */
}
</
div
>
)
}
...
...
src/pages/repositories/components/PositionSetting.tsx
View file @
f47136da
...
...
@@ -52,8 +52,8 @@ const transferLabelToValue = (list: any[], label: string, value: string) => {
})
}
const
BUSINESS_INTEGRATE
=
[
1
,
2
];
const
CANAL
=
[
3
,
4
,
5
]
const
BUSINESS_INTEGRATE
=
[
1
,
2
];
// 企业商城, 积分商城
const
CANAL
=
[
3
,
4
,
5
]
;
// 渠道商城
const
PositionSetting
:
React
.
FC
<
PositionSettingProps
>
=
(
props
)
=>
{
const
{
addSchemaAction
,
schema
,
formSubmit
,
onFieldChange
=
()
=>
{}
}
=
props
...
...
@@ -72,7 +72,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
const
[
productState
,
setProductState
]
=
useState
<
any
>
({})
const
[
membersFilterState
,
setMemberFilter
]
=
useState
({
level
:
[],
role
:
[],
type
:
[]});
const
[
initValue
,
setInitialValue
]
=
useState
({});
const
[
membersLength
,
setMembersLength
]
=
useState
(
0
)
const
[
membersLength
,
setMembersLength
]
=
useState
(
0
);
// const [channelMemberState, setChannelMemberState] = useState({channelMemberRoleId: '', channelMemberIdList: []})
// useUnitPreview(initValue, addSchemaAction)
...
...
@@ -83,14 +84,14 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
const
{
levels
=
[],
memberTypes
=
[],
roles
=
[]
}
=
response
.
data
;
const
allLevels
=
all
.
concat
(
transferLabelToValue
(
levels
,
"levelTag"
,
"level"
));
const
allMemberTypes
=
all
.
concat
(
transferLabelToValue
(
memberTypes
,
"memberTypeName"
,
"memberTypeId"
))
const
allRoles
=
all
.
concat
(
transferLabelToValue
(
roles
,
"roleName"
,
"roleId"
))
//
const allRoles = all.concat(transferLabelToValue(roles, "roleName", "roleId"))
setMemberFilter
((
state
)
=>
{
return
{
...
state
,
level
:
allLevels
,
role
:
allMemberTyp
es
,
type
:
all
Rol
es
// role: allRol
es,
type
:
all
MemberTyp
es
}
})
}
...
...
@@ -235,24 +236,14 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
const
fetchMemberList
=
async
(
params
)
=>
{
const
shopType
=
addSchemaAction
.
getFieldValue
(
'shopType'
);
// 当商城类型为 渠道商城、渠道自由商城和渠道积分商城时,需要带上memberResponseList
const
{
memberResponseList
}
=
productState
;
if
(
CANAL
.
includes
(
shopType
)
&&
memberResponseList
==
null
)
{
// 如果为空的话那我就不调用了
return
{
code
:
200
,
message
:
''
,
data
:
{
data
:
[],
totalCount
:
[]
}
}
}
// 当商城类型为 渠道商城、渠道自由商城和渠道积分商城时,需要带上下面两个参数
const
{
channelMemberIdList
,
channelMemberRoleId
}
=
productState
;
const
data
=
{
...
params
,
shopType
:
shopType
,
member
s
:
memberResponse
List
,
member
Ids
:
channelMemberId
List
,
roleId
:
channelMemberRoleId
}
const
res
=
await
PublicApi
.
postMemberManageAllPageByshoptype
(
data
,
{
ctlType
:
'none'
});
return
res
.
data
...
...
@@ -374,15 +365,15 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
}
},
roleId
:
{
type
:
'string'
,
"x-component"
:
'Select'
,
"x-component-props"
:
{
options
:
membersFilterState
.
role
,
style
:
{
width
:
'180px'
},
placeholder
:
'请选择会员角色'
}
},
//
roleId: {
//
type: 'string',
//
"x-component": 'Select',
//
"x-component-props": {
//
options: membersFilterState.role,
//
style: {width: '180px'},
//
placeholder: '请选择会员角色'
//
}
//
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
...
...
@@ -501,9 +492,11 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
state
.
value
=
[]
})
}
return
parentState
.
value
});
// 商城类型修改的时候,就清空商品
addSchemaAction
.
setFieldValue
(
'productId'
,
""
);
addSchemaAction
.
setFieldValue
(
'productName'
,
""
);
}
})
// FormEffectHooks.
...
...
src/store/category/index.ts
View file @
f47136da
...
...
@@ -2,48 +2,6 @@ import { action, computed, observable, runInAction } from 'mobx'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
const
defaultCategory
=
[
{
id
:
1
,
name
:
'成品皮'
,
categoryTree
:
[
{
id
:
11
,
title
:
'牛皮'
,
children
:
[
{
id
:
111
,
title
:
'黄牛皮'
},
{
id
:
112
,
title
:
'水牛皮'
}
]
}
]
},
{
id
:
2
,
name
:
'成品皮'
,
categoryTree
:
[
{
id
:
21
,
title
:
'牛皮'
,
children
:
[
{
id
:
211
,
title
:
'黄牛皮'
},
{
id
:
212
,
title
:
'水牛皮'
}
]
}
]
}
]
class
CategoryStore
{
@
observable
public
categoryList
:
any
=
[];
// 品类列表
...
...
@@ -54,10 +12,10 @@ class CategoryStore {
* 企业商城商品分类列表
*/
@
action
.
bound
public
async
fetchCategoryList
(
getCategoryFn
,
params
,
type
)
{
public
async
fetchCategoryList
(
getCategoryFn
,
params
,
type
,
options
?
)
{
if
(
this
.
categoryType
!==
type
)
{
this
.
categoryType
=
type
let
res
=
await
getCategoryFn
(
params
)
let
res
=
await
getCategoryFn
(
params
,
options
||
{}
)
runInAction
(()
=>
{
this
.
categoryList
=
res
.
data
||
[]
})
...
...
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