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
64ef0608
Commit
64ef0608
authored
Jun 18, 2020
by
xsren@gongsibao.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工商H5
parent
c27bcea7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
1 deletions
+70
-1
center-channel/app/base/api/impl/action/product.js
+3
-1
center-channel/app/base/api/impl/opreceive/need.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+53
-0
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+11
-0
No files found.
center-channel/app/base/api/impl/action/product.js
View file @
64ef0608
...
...
@@ -31,9 +31,11 @@ class ProductAPI extends WEBBase {
case
"getProductDetail"
:
//根据渠道产品编码获取产品详情
opResult
=
await
this
.
utilsProductSve
.
getProductDetail
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getProductPrice"
:
opResult
=
await
this
.
utilsProductSve
.
getProductPrice
(
pobj
,
pobj
.
actionBody
)
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
...
...
center-channel/app/base/api/impl/opreceive/need.js
View file @
64ef0608
...
...
@@ -32,6 +32,9 @@ class Need extends APIBase {
case
"submitNeed"
:
//提交需求
opResult
=
await
this
.
utilsNeedSve
.
submitNeed
(
pobj
,
pobj
.
actionBody
);
break
;
case
"submitNeedH5"
:
//提交需求
opResult
=
await
this
.
utilsNeedSve
.
submitNeedH5
(
pobj
,
pobj
.
actionBody
);
break
;
case
"needClose"
:
//关闭需求
opResult
=
await
this
.
utilsNeedSve
.
needClose
(
pobj
,
pobj
.
actionBody
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
64ef0608
...
...
@@ -66,6 +66,59 @@ class UtilsNeedService extends AppServiceBase {
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
}
/**
* 提交需求
* @param {*} pobj
* @param {*} actionBody
*/
async
submitNeedH5
(
pobj
,
actionBody
)
{
var
sobj
=
pobj
;
sobj
.
actionType
=
"getProductTypeInfo"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5015
,
"需求類型查询失败"
);
}
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5015
,
"需求類型查询失败"
);
}
pobj
.
actionBody
.
type_code
=
data
.
data
.
type_code
;
pobj
.
actionBody
.
type_name
=
data
.
data
.
type_name
;
pobj
.
actionBody
.
channel_type_code
=
data
.
data
.
channel_type_code
;
pobj
.
actionBody
.
channel_type_name
=
data
.
data
.
channel_type_name
;
pobj
.
actionType
=
"submitNeedH5"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
){
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
// else{
// if(pobj.actionBody.channel_type_code==5){
// pobj.actionBody.regType="ali.icp";
// }else{
// pobj.actionBody.regType="ali.edi";
// }
// this.utilsPushSve.aliBusiness2Fq(pobj, "intention");
// }
}
return
result
;
}
//调用center-order icp需求反馈
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
"action/icpapi/springBoard"
;
if
(
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
}
pobj
.
actionType
=
"receiveIcpFeedback"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
}
/**
* 获取需求详情
* @param {*} pobj
...
...
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
64ef0608
...
...
@@ -38,6 +38,17 @@ class UtilsProductService extends AppServiceBase {
//--------------------------------应用中心获取产品信息--end----------------------------------------------------
/**
* 产品询价
* @param pobj.actionType ='getProductPrice'
* @param actionBody
* @returns {Promise<{msg: *, data, bizmsg: *|string, status: number}>}
*/
async
getProductPrice
(
pobj
,
actionBody
){
pobj
.
actionType
=
'getProductPrice'
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
module
.
exports
=
UtilsProductService
;
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