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
1c626a65
Commit
1c626a65
authored
Nov 13, 2020
by
前端-钟卫鹏
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
cb110e6b
8be70b28
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
17 deletions
+70
-17
config.ts
config/config.ts
+2
-1
package.json
package.json
+3
-3
index.ts
src/constants/index.ts
+3
-0
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+13
-1
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+43
-8
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+2
-4
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+4
-0
No files found.
config/config.ts
View file @
1c626a65
...
...
@@ -9,7 +9,8 @@ const config: any = {
// 如需写入环境变量 需在config中先写入
define
:
{
"process.env.SITE_ID"
:
process
.
env
.
SITE_ID
,
"process.env.BACK_GATEWAY"
:
process
.
env
.
BACK_GATEWAY
"process.env.BACK_GATEWAY"
:
process
.
env
.
BACK_GATEWAY
,
'process.env.SOCKET_URL'
:
process
.
env
.
SOCKET_URL
},
// layout: {},
esbuild
:
{},
...
...
package.json
View file @
1c626a65
...
...
@@ -18,9 +18,9 @@
"prettier"
:
"prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
,
"test"
:
"umi-test"
,
"test:coverage"
:
"umi-test --coverage"
,
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false yarn start"
,
"start:url"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true yarn start"
,
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true yarn start"
"start:cross"
:
"cross-env SITE_ID=352 USE_ROUTE_CONFIG=false
SOCKET_URL=http://10.0.0.25:8100
yarn start"
,
"start:url"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true
SOCKET_URL=http://lingxi-all.wg.shushangyun.com
yarn start"
,
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true
SOCKET_URL=http://10.0.0.10:8100
yarn start"
},
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
...
...
src/constants/index.ts
View file @
1c626a65
export
const
NOT_CHANGE_VALUE
=
'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
||
process
.
env
.
BACK_GATEWAY
export
const
MALL_TYPE
=
{
1
:
'企业商城'
,
2
:
'积分商城'
,
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
1c626a65
...
...
@@ -636,11 +636,23 @@ const CommodityDetail = (props) => {
}
}
setCurrentPriceRange
(
sortUnitPrice
(
unitPricePicList
[
0
].
unitPrice
))
setStockCount
(
unitPricePicList
[
0
].
stockCount
)
initStockCount
(
unitPricePicList
)
// setStockCount(unitPricePicList[0].stockCount)
setCommodityImgList
(
tempImgList
)
setAttributeList
(
tempAttrList
)
}
const
initStockCount
=
(
unitPricePicList
:
any
)
=>
{
if
(
!
unitPricePicList
)
{
return
}
let
total
=
0
for
(
let
item
of
unitPricePicList
)
{
total
+=
item
.
stockCount
}
setStockCount
(
total
)
}
/**
* 对阶梯价格进行从大到小的排序
* @param priceObj
...
...
src/pages/lxMall/components/Recommand/index.tsx
View file @
1c626a65
...
...
@@ -13,12 +13,13 @@ interface RecommandPropsType {
layoutType
:
LAYOUT_TYPE
,
categoryIds
:
number
[],
// 商品品类集合
loading
:
boolean
,
memberId
?:
number
memberId
?:
number
,
shopInfo
?:
any
}
const
Recommand
:
React
.
FC
<
RecommandPropsType
>
=
(
props
)
=>
{
const
{
mallTemplateId
}
=
props
.
SiteStore
const
{
layoutType
,
categoryIds
,
loading
,
memberId
}
=
props
const
{
layoutType
,
categoryIds
,
loading
,
memberId
,
shopInfo
}
=
props
const
[
list
,
setList
]
=
useState
<
any
>
([])
useEffect
(()
=>
{
...
...
@@ -100,7 +101,20 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplatePlatformFindAllFirstCategory
().
then
(
res
=>
{
let
getFn
let
param
:
any
=
{}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
case
LAYOUT_TYPE
.
ichannel
:
param
.
memberId
=
memberId
getFn
=
PublicApi
.
getTemplateChannelFindAllFirstCategory
break
;
default
:
getFn
=
PublicApi
.
getTemplatePlatformFindAllFirstCategory
break
;
}
getFn
&&
getFn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -113,13 +127,32 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
*/
const
fetchCategoryById
=
(
categoryId
)
=>
{
return
new
Promise
((
resolve
)
=>
{
let
param
=
{
templateId
:
mallTemplateId
,
let
param
:
any
=
{
categoryId
}
let
templateId
let
getFn
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
param
.
memberId
=
memberId
templateId
=
shopInfo
.
channelShopTemplateId
getFn
=
PublicApi
.
getTemplateChannelFindFirstCategoryDetail
break
;
case
LAYOUT_TYPE
.
ichannel
:
param
.
memberId
=
memberId
templateId
=
shopInfo
.
channelOwnShopTemplateId
getFn
=
PublicApi
.
getTemplateChannelFindFirstCategoryDetail
break
default
:
getFn
=
PublicApi
.
getTemplatePlatformFindFirstCategoryDetail
templateId
=
mallTemplateId
break
;
}
param
.
templateId
=
templateId
// @ts-ignore
PublicApi
.
getTemplatePlatformFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
getFn
&&
getFn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -129,8 +162,10 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
const
getCategoryComponents
=
async
()
=>
{
let
firstCategory
:
any
=
await
fetchFirstCategory
()
let
categoryDetail
:
any
=
await
fetchCategoryById
(
firstCategory
[
0
].
id
)
setList
(
changeDataKey
(
categoryDetail
.
goodsBOList
))
if
(
firstCategory
[
0
])
{
let
categoryDetail
:
any
=
await
fetchCategoryById
(
firstCategory
[
0
].
id
)
setList
(
changeDataKey
(
categoryDetail
.
goodsBOList
))
}
}
const
getCommodityDetailLink
=
(
item
)
=>
{
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
1c626a65
...
...
@@ -515,7 +515,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
priceRange
:
item
.
commodityUnitPrice
.
priceRange
,
category
:
item
.
commodityUnitPrice
.
commodity
.
customerCategory
.
name
,
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
Pic
[
0
]
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
.
mainPic
,
attribute
:
item
.
commodityUnitPrice
.
attributeAndValueList
,
stockCount
:
item
.
stockCount
||
0
}
...
...
@@ -710,9 +710,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
</
div
>
<
div
className=
{
cx
(
styles
.
order_list_item_item
,
styles
.
goods_info
)
}
>
<
div
className=
{
styles
.
order_list_item_item_imgbox
}
>
{
childItem
.
commodityUnitPrice
.
commodityPic
&&
<
ImageBox
width=
{
80
}
height=
{
80
}
imgUrl=
{
childItem
.
commodityUnitPrice
.
commodityPic
[
0
]
}
direction=
"column"
/>
}
<
ImageBox
width=
{
80
}
height=
{
80
}
imgUrl=
{
childItem
.
commodityUnitPrice
.
commodity
.
mainPic
}
direction=
"column"
/>
</
div
>
<
div
>
<
div
className=
{
styles
.
order_list_item_item_name
}
>
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
1c626a65
...
...
@@ -138,7 +138,11 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const
handleConfirmProduct
=
async
()
=>
{
// 判断所选择的商品是否属于同一个工作流
<<
<
<<<<
HEAD
const
{
code
,
data
}
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[0]
.
memberId
,
productIds
:
rowSelectionCtl
.
selectedRowKeys
},
{
ctlType
:
'
none
'
})
=======
const
res
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[0]
.
memberId
,
productIds
:
rowSelectionCtl
.
selectedRowKeys
},
{
ctlType
:
'
none
'
})
>
>>>>>>
4d959facff1bbb3a2ebd1328ff93729394559ba4
if (res.code === 1000)
{
const
productData
=
schemaAction
.
getFieldValue
(
'orderProductRequests'
)
...
...
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