Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
3b9cad34
Commit
3b9cad34
authored
Jun 30, 2020
by
xsren@gongsibao.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
17a8686e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
center-channel/app/base/api/impl/action/product.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+28
-0
No files found.
center-channel/app/base/api/impl/action/product.js
View file @
3b9cad34
...
@@ -28,6 +28,9 @@ class ProductAPI extends WEBBase {
...
@@ -28,6 +28,9 @@ class ProductAPI extends WEBBase {
case
"getProductList"
:
//通过产品类别编码路径获取产品列表
case
"getProductList"
:
//通过产品类别编码路径获取产品列表
opResult
=
await
this
.
utilsProductSve
.
getProductList
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsProductSve
.
getProductList
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getProductListH5"
:
//通过产品类别编码路径获取产品列表
opResult
=
await
this
.
utilsProductSve
.
getProductListH5
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getProductDetail"
:
//根据渠道产品编码获取产品详情
case
"getProductDetail"
:
//根据渠道产品编码获取产品详情
opResult
=
await
this
.
utilsProductSve
.
getProductDetail
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsProductSve
.
getProductDetail
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
3b9cad34
...
@@ -23,6 +23,34 @@ class UtilsProductService extends AppServiceBase {
...
@@ -23,6 +23,34 @@ class UtilsProductService extends AppServiceBase {
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
/**
* 获取产品列表及最低价
* @param pobj
* @param actionBody
* @returns {Promise<{msg: *, data, bizmsg: *|string, status: number}|any>}
*/
async
getProductListH5
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
pathCode
)
{
return
system
.
getResult
(
null
,
"actionBody.pathCode can not be empty,100330"
);
}
pobj
.
actionType
=
'getProductList'
;
pobj
.
actionBody
.
pathCode
=
"/"
+
actionBody
.
pathCode
+
"/"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
let
list
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
!
list
.
data
){
return
system
.
getResult
(
null
,
'product data is empty'
)
}
for
(
let
item
of
list
.
data
){
pobj
.
actionType
=
'getMinPrice'
;
pobj
.
actionBody
=
{
product_id
:
item
.
product_id
}
let
re
=
await
this
.
restPostUrl
(
pobj
,
url
);
item
.
price
=
re
.
data
.
price
;
}
return
list
;
}
/**
/**
* 获取产品详情
* 获取产品详情
* @param {*} pobj
* @param {*} pobj
...
...
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