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
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
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
22 deletions
+45
-22
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
+4
-0
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
+6
-6
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 {
...
...
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
...
...
@@ -11,17 +11,17 @@ interface TemplateItemPropsType {
}
const
Environment_Status
=
{
0
:
{
name
:
"所有"
},
1
:
{
name
:
"
PC "
name
:
"
web"
},
2
:
{
name
:
"H5
"
name
:
"H5
"
},
3
:
{
name
:
"APP "
name
:
"小程序"
},
4
:
{
name
:
"APP"
}
}
...
...
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