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
linweijiong
jinfa-platform
Commits
5339cf13
Commit
5339cf13
authored
Jan 18, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into dev
parents
724d6c4b
ec632265
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
108 additions
and
86 deletions
+108
-86
index.ts
src/constants/index.ts
+3
-3
index.tsx
src/pages/channel/components/templateItem/index.tsx
+0
-1
index.tsx
src/pages/channel/templateDetail/index.tsx
+1
-2
index.less
.../commodityDetail/components/ProductDescription/index.less
+5
-2
index.tsx
...l/commodityDetail/components/ProductDescription/index.tsx
+20
-1
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+2
-2
index.tsx
src/pages/lxMall/components/Category/index.tsx
+5
-2
index.tsx
src/pages/lxMall/components/TopBar/index.tsx
+1
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+2
-2
index.tsx
src/pages/shop/components/templateItem/index.tsx
+68
-68
index.tsx
src/pages/shop/templateDetail/index.tsx
+1
-2
No files found.
src/constants/index.ts
View file @
5339cf13
...
...
@@ -72,10 +72,10 @@ export const isDev = process.env.NODE_ENV === "development"
// export const isDev = false
export
const
Environment_Status
=
{
0
:
"所有"
,
1
:
"PC"
,
1
:
"web"
,
2
:
"H5"
,
3
:
"APP"
3
:
"小程序"
,
4
:
"APP"
}
export
enum
FILTER_TYPE
{
...
...
src/pages/channel/components/templateItem/index.tsx
View file @
5339cf13
...
...
@@ -2,7 +2,6 @@ import React from 'react'
import
{
PlayCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateItemPropsType
{
...
...
src/pages/channel/templateDetail/index.tsx
View file @
5339cf13
...
...
@@ -7,7 +7,6 @@ import UseModal from '../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GetTemplateWebPageTemplateWebFindChannelTemplateDetailsResponse
}
from
'@/services/TemplateApi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateDetailPropsType
{
...
...
@@ -74,7 +73,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<
div
className=
{
styles
.
template_info_wrap
}
>
<
div
className=
{
styles
.
template_img_box
}
>
<
div
className=
{
cx
(
styles
.
type_tag
)
}
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
div
>
<
img
src=
{
de
fault_img
}
/>
<
img
src=
{
de
tailInfo
?.
templatePicUrl
}
/>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_line
}
>
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/index.less
View file @
5339cf13
...
...
@@ -19,6 +19,10 @@
line-height: 32px;
right: 0;
bottom: 0;
&.hide {
display: none;
}
}
:global {
...
...
@@ -68,4 +72,4 @@
}
}
}
\ No newline at end of file
}
src/pages/lxMall/commodityDetail/components/ProductDescription/index.tsx
View file @
5339cf13
...
...
@@ -22,13 +22,26 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
const
[
productIds
,
setProductIds
]
=
useState
<
number
[]
>
([])
const
[
tradeRecordCount
,
setTradeRecordCount
]
=
useState
<
number
>
(
0
)
const
[
commentCount
,
setCommentCount
]
=
useState
<
number
>
(
0
)
const
[
backTopVisible
,
setBackTopVisible
]
=
useState
<
boolean
>
(
false
)
const
handleAnchorChange
=
(
currentActiveLink
:
string
)
=>
{
if
(
currentActiveLink
)
{
setBackTopVisible
(
true
)
setCurrentAnchor
(
currentActiveLink
)
}
}
const
handleScroll
=
()
=>
{
const
scrollTop
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
if
(
scrollTop
===
0
)
{
setBackTopVisible
(
false
)
}
}
useEffect
(()
=>
{
window
.
addEventListener
(
'scroll'
,
handleScroll
)
},
[])
useEffect
(()
=>
{
if
(
commodityDetail
)
{
if
(
commodityDetail
.
unitPricePicList
)
{
...
...
@@ -47,7 +60,13 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
<
Link
className=
{
cx
(
currentAnchor
===
"#introduction"
?
'active'
:
''
)
}
href=
"#introduction"
title=
"产品简介"
/>
<
Link
href=
"#trade_record"
title=
{
commodityDetail
?.
priceType
===
COMMODITY_TYPE
.
integral
?
`兑换记录${tradeRecordCount ? `
(
$
{
tradeRecordCount
})
` : `
(
0
)
`}`
:
`交易记录${tradeRecordCount ? `
(
$
{
tradeRecordCount
})
` : `
(
0
)
`}`
}
/>
<
Link
href=
"#comment"
title=
{
`交易评价(${commentCount > 999 ? '999+' : commentCount})`
}
/>
<
BackTop
className=
{
styles
.
buy_now_btn
}
visibilityHeight=
{
800
}
>
立即订购
</
BackTop
>
<
BackTop
className=
{
cx
(
styles
.
buy_now_btn
,
!
backTopVisible
?
styles
.
hide
:
null
)
}
visibilityHeight=
{
800
}
onClick=
{
()
=>
setBackTopVisible
(
false
)
}
>
{
commodityDetail
?.
priceType
===
COMMODITY_TYPE
.
integral
?
'立即兑换'
:
'立即订购'
}
</
BackTop
>
</
Anchor
>
<
Introduction
commodityDetail=
{
commodityDetail
}
/>
<
TradeRecord
productIds=
{
productIds
}
setCount=
{
(
count
)
=>
setTradeRecordCount
(
count
)
}
/>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
5339cf13
...
...
@@ -547,8 +547,8 @@ const CommodityDetail = (props) => {
name
:
commodityDetail
.
name
,
priceRange
:
commodityPriceInfo
,
memberDiscount
:
parameter
,
category
:
commodityDetail
.
customerCategory
.
name
,
brand
:
commodityDetail
.
brand
.
name
,
category
:
commodityDetail
.
customerCategory
&&
commodityDetail
.
customerCategory
.
name
,
brand
:
commodityDetail
.
brand
&&
commodityDetail
.
brand
.
name
,
stockCount
:
stockCount
,
minOrder
:
commodityDetail
.
minOrder
,
commodityPic
:
attrAndValList
.
commodityPic
?
attrAndValList
.
commodityPic
[
0
]
:
commodityDetail
.
mainPic
,
...
...
src/pages/lxMall/components/Category/index.tsx
View file @
5339cf13
...
...
@@ -4,6 +4,7 @@ import { inject, observer } from 'mobx-react'
import
{
Link
}
from
'umi'
import
cx
from
'classnames'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
ImageBox
from
'@/components/ImageBox'
import
{
PublicApi
}
from
'@/services/api'
import
{
GlobalConfig
}
from
'@/global/config'
import
styles
from
'./index.less'
...
...
@@ -140,9 +141,11 @@ const Category: React.FC<CategoryPropsType> = (props) => {
<
div
className=
{
styles
.
category_type_right_wrap
}
>
<
div
className=
{
styles
.
category_advert
}
>
{
(
item
.
brand
BOList
&&
item
.
brandBOList
.
length
>
0
)
&&
item
.
brandBO
List
.
map
((
brandItem
,
brandIndex
)
=>
brandIndex
<
4
&&
(
(
item
.
brand
List
&&
item
.
brandList
.
length
>
0
)
&&
item
.
brand
List
.
map
((
brandItem
,
brandIndex
)
=>
brandIndex
<
4
&&
(
<
div
key=
{
`category_advert_item_${brandIndex}`
}
className=
{
styles
.
category_advert_item
}
>
<
Link
to=
{
getBrandLink
(
brandItem
)
}
>
<
img
src=
{
brandItem
.
brandLogo
}
/></
Link
>
<
a
href=
{
getBrandLink
(
brandItem
)
}
>
<
ImageBox
width=
{
160
}
height=
{
80
}
imgUrl=
{
brandItem
.
brandLogo
}
/>
</
a
>
</
div
>
))
}
...
...
src/pages/lxMall/components/TopBar/index.tsx
View file @
5339cf13
...
...
@@ -74,7 +74,7 @@ const TopBar: React.FC<TopBarPropsType> = (props) => {
<
div
className=
{
styles
.
userInfo_card_header
}
>
<
ImageBox
width=
{
64
}
height=
{
64
}
circle=
{
true
}
direction=
"column"
imgUrl=
{
defaultAvatar
}
/>
<
div
className=
{
styles
.
userInfo_card_column
}
>
<
div
className=
{
styles
.
credit_count
}
>
信用积分:
<
span
>
{
numFormat
(
userInfo
.
score
||
0
)
}
</
span
></
div
>
<
div
className=
{
styles
.
credit_count
}
>
信用积分:
<
span
>
{
numFormat
(
userInfo
.
creditPoint
||
0
)
}
</
span
></
div
>
<
div
className=
{
styles
.
user_type
}
>
{
userInfo
.
levelTag
}
</
div
>
</
div
>
<
div
className=
{
styles
.
sign_out_btn
}
onClick=
{
handleSignOut
}
>
退出账号
</
div
>
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
5339cf13
...
...
@@ -565,8 +565,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
name
:
item
.
commodityUnitPrice
.
commodity
.
name
,
minOrder
:
item
.
commodityUnitPrice
.
commodity
.
minOrder
,
priceRange
:
item
.
commodityUnitPrice
.
priceRange
,
category
:
item
.
commodityUnitPrice
.
commodity
.
customerCategory
.
name
,
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
category
:
item
.
commodityUnitPrice
.
commodity
.
customerCategory
&&
item
.
commodityUnitPrice
.
commodity
.
customerCategory
.
name
,
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
&&
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
.
mainPic
,
attribute
:
item
.
commodityUnitPrice
.
attributeAndValueList
,
stockCount
:
item
.
stockCount
||
0
,
...
...
src/pages/shop/components/templateItem/index.tsx
View file @
5339cf13
import
React
from
'react'
import
{
PlayCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateItemPropsType
{
templateInfo
:
any
;
type
:
string
;
}
const
Environment_Status
=
{
0
:
{
name
:
"
所有"
},
1
:
{
name
:
"
PC "
},
2
:
{
name
:
"
H5 "
},
3
:
{
name
:
"APP
"
}
}
const
TemplateItem
:
React
.
FC
<
TemplateItemPropsType
>
=
(
props
)
=>
{
const
{
templateInfo
,
type
}
=
props
return
(
<
div
className=
{
styles
.
template_item
}
>
<
div
className=
{
styles
.
img_box
}
style=
{
{
backgroundImage
:
`url(${templateInfo.templatePicUrl})`
}
}
>
<
div
className=
{
styles
.
img_box_mask
}
>
<
Link
to=
{
`/memberCenter/shopAbility/template/detail?type=${type}&id=${templateInfo.id}`
}
className=
{
styles
.
detail_btn
}
>
查看详情
</
Link
>
</
div
>
<
div
className=
{
cx
(
styles
.
type_tag
,
templateInfo
.
environment
===
2
?
styles
.
h5
:
''
)
}
>
{
Environment_Status
[
templateInfo
.
environment
].
name
}
</
div
>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_name
}
>
<
span
>
{
templateInfo
.
templateName
}
</
span
>
{
templateInfo
.
isDefault
&&
<
div
className=
{
styles
.
tag
}
>
默认模板
</
div
>
}
</
div
>
<
div
className=
{
cx
(
styles
.
template_info_content
,
type
===
'goods'
?
styles
.
goods
:
''
)
}
>
<
div
className=
{
styles
.
template_info_content_text_wrap
}
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用站点:
</
label
>
<
span
>
{
templateInfo
.
siteName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用商城:
</
label
>
<
span
>
{
templateInfo
.
shopName
}
</
span
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
template_item_btn
,
templateInfo
.
use
===
1
?
styles
.
active
:
''
)
}
>
<
PlayCircleOutlined
/>
<
label
>
{
templateInfo
.
use
===
1
?
'启用中'
:
'启用'
}
</
label
>
</
div
>
</
div
>
</
div
>
</
div
>
)
}
export
default
TemplateItem
import
React
from
'react'
import
{
PlayCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
}
from
'umi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateItemPropsType
{
templateInfo
:
any
;
type
:
string
;
}
const
Environment_Status
=
{
1
:
{
name
:
"
web"
},
2
:
{
name
:
"
H5"
},
3
:
{
name
:
"
小程序"
},
4
:
{
name
:
"APP
"
}
}
const
TemplateItem
:
React
.
FC
<
TemplateItemPropsType
>
=
(
props
)
=>
{
const
{
templateInfo
,
type
}
=
props
return
(
<
div
className=
{
styles
.
template_item
}
>
<
div
className=
{
styles
.
img_box
}
style=
{
{
backgroundImage
:
`url(${templateInfo.templatePicUrl})`
}
}
>
<
div
className=
{
styles
.
img_box_mask
}
>
<
Link
to=
{
`/memberCenter/shopAbility/template/detail?type=${type}&id=${templateInfo.id}`
}
className=
{
styles
.
detail_btn
}
>
查看详情
</
Link
>
</
div
>
<
div
className=
{
cx
(
styles
.
type_tag
,
templateInfo
.
environment
===
2
?
styles
.
h5
:
''
)
}
>
{
Environment_Status
[
templateInfo
.
environment
].
name
}
</
div
>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_name
}
>
<
span
>
{
templateInfo
.
templateName
}
</
span
>
{
templateInfo
.
isDefault
&&
<
div
className=
{
styles
.
tag
}
>
默认模板
</
div
>
}
</
div
>
<
div
className=
{
cx
(
styles
.
template_info_content
,
type
===
'goods'
?
styles
.
goods
:
''
)
}
>
<
div
className=
{
styles
.
template_info_content_text_wrap
}
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用站点:
</
label
>
<
span
>
{
templateInfo
.
siteName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用商城:
</
label
>
<
span
>
{
templateInfo
.
shopName
}
</
span
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
template_item_btn
,
templateInfo
.
use
===
1
?
styles
.
active
:
''
)
}
>
<
PlayCircleOutlined
/>
<
label
>
{
templateInfo
.
use
===
1
?
'启用中'
:
'启用'
}
</
label
>
</
div
>
</
div
>
</
div
>
</
div
>
)
}
export
default
TemplateItem
src/pages/shop/templateDetail/index.tsx
View file @
5339cf13
...
...
@@ -6,7 +6,6 @@ import UseModal from '../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GetTemplateWebPageTemplateWebFindShopTemplateDetailsResponse
}
from
'@/services/TemplateApi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateDetailPropsType
{
...
...
@@ -74,7 +73,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<
div
className=
{
styles
.
template_info_wrap
}
>
<
div
className=
{
styles
.
template_img_box
}
>
<
div
className=
{
cx
(
styles
.
type_tag
)
}
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
div
>
<
img
src=
{
de
fault_img
}
/>
<
img
src=
{
de
tailInfo
?.
templatePicUrl
}
/>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_line
}
>
...
...
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