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
b2e93039
Commit
b2e93039
authored
Feb 18, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
9dd7b7ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
303 additions
and
2 deletions
+303
-2
igirl-channel/app/base/api/impl/action/product.js
+43
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+59
-2
igirl-channel/app/front/entry/public/apidoc/opTrademark/icbc.md
+201
-0
No files found.
igirl-channel/app/base/api/impl/action/product.js
0 → 100644
View file @
b2e93039
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
ProductAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
orderSve
=
system
.
getObject
(
"service.dborder.orderSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"getProductList"
:
//通过产品类别编码路径获取产品列表
opResult
=
await
this
.
orderSve
.
getProductList
(
pobj
,
pobj
.
actionBody
,
req
.
app
);
break
;
case
"getProductDetail"
:
//根据渠道产品编码获取产品详情
opResult
=
await
this
.
orderSve
.
getProductDetail
(
pobj
,
pobj
.
actionBody
,
req
.
app
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
ProductAPI
;
\ No newline at end of file
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
b2e93039
...
@@ -852,6 +852,63 @@ class OrderService extends ServiceBase {
...
@@ -852,6 +852,63 @@ class OrderService extends ServiceBase {
});
});
}
}
}
}
//------------新的产品查询----start---------
/**
* 通过产品类别编码路径获取产品列表
* @param {*} pobj
* @param {*} actionBody pathCode 为类别编码路径,一级类下产品列表 sbfu,二级类下产品列表sbfu/sbzc
*/
async
getProductList
(
pobj
,
actionBody
,
app
)
{
if
(
!
actionBody
.
pathCode
)
{
return
system
.
getResult
(
null
,
"actionBody.pathCode can not be empty"
);
}
var
token
=
""
;
var
tokenRes
=
await
this
.
getCenterChannelToken
(
app
);
if
(
tokenRes
&&
tokenRes
.
status
==
0
&&
tokenRes
.
data
)
{
token
=
tokenRes
.
data
.
token
;
}
if
(
!
token
)
{
return
system
.
getResultFail
(
-
88
,
"获取token失败"
);
}
var
url
=
settings
.
centerChannelUrl
()
+
"web/action/product/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPushDataPost
(
pobj
,
url
,
token
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
/**
* 获取产品详情
* @param {*} pobj
* @param {*} actionBody channelItemCode 渠道产品编码
*/
async
getProductDetail
(
pobj
,
actionBody
,
app
)
{
if
(
!
actionBody
.
channelItemCode
)
{
return
system
.
getResult
(
null
,
"actionBody.channelItemCode can not be empty"
);
}
var
token
=
""
;
var
tokenRes
=
await
this
.
getCenterChannelToken
(
app
);
if
(
tokenRes
&&
tokenRes
.
status
==
0
&&
tokenRes
.
data
)
{
token
=
tokenRes
.
data
.
token
;
}
if
(
!
token
)
{
return
system
.
getResultFail
(
-
88
,
"获取token失败"
);
}
var
url
=
settings
.
centerChannelUrl
()
+
"web/action/product/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPushDataPost
(
pobj
,
url
,
token
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
//------------end----------------
//-------------------------通联支付------start---------------------------------------------------------
//-------------------------通联支付------start---------------------------------------------------------
//获取center-channel token
//获取center-channel token
...
@@ -899,7 +956,7 @@ class OrderService extends ServiceBase {
...
@@ -899,7 +956,7 @@ class OrderService extends ServiceBase {
token
=
tokenRes
.
data
.
token
;
token
=
tokenRes
.
data
.
token
;
}
}
if
(
!
token
)
{
if
(
!
token
)
{
return
system
.
getResultFail
(
-
99
,
"获取token失败"
);
return
system
.
getResultFail
(
-
88
,
"获取token失败"
);
}
}
var
url
=
settings
.
centerChannelUrl
()
+
"web/payment/paymentApi/springBoard"
;
var
url
=
settings
.
centerChannelUrl
()
+
"web/payment/paymentApi/springBoard"
;
var
pobj
=
{
var
pobj
=
{
...
@@ -1036,7 +1093,7 @@ class OrderService extends ServiceBase {
...
@@ -1036,7 +1093,7 @@ class OrderService extends ServiceBase {
token
=
tokenRes
.
data
.
token
;
token
=
tokenRes
.
data
.
token
;
}
}
if
(
!
token
)
{
if
(
!
token
)
{
return
system
.
getResultFail
(
-
99
,
"获取token失败"
);
return
system
.
getResultFail
(
-
88
,
"获取token失败"
);
}
}
var
url
=
settings
.
centerChannelUrl
()
+
"web/payment/paymentApi/springBoard"
;
var
url
=
settings
.
centerChannelUrl
()
+
"web/payment/paymentApi/springBoard"
;
var
pobj
=
{
var
pobj
=
{
...
...
igirl-channel/app/front/entry/public/apidoc/opTrademark/icbc.md
View file @
b2e93039
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
获取公司注册详情信息
](
#getIcbcOrderDetails
)
1.
[
获取公司注册详情信息
](
#getIcbcOrderDetails
)
1.
[
产品列表-根据产品大类获取
](
#getProductListByOneCode
)
1.
[
产品列表-根据产品二类获取
](
#getProductListByTwoCode
)
1.
[
产品详情
](
#getProductDetail
)
## **<a name="getIcbcOrderDetails"> 获取公司注册详情信息</a>**
## **<a name="getIcbcOrderDetails"> 获取公司注册详情信息</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
...
@@ -145,3 +148,201 @@
...
@@ -145,3 +148,201 @@
}
}
```
```
## **<a name="getProductListByOneCode"> 产品列表-根据产品大类编码获取</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/product/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getProductList
```
javascript
{
"pathCode"
:
"gsfu"
//查询的路径:大类code
}
```
#### 返回结果 0为成功,否则为失败
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
[
{
"uapp_id"
:
26
,
//平台id--显示不用
"path_code"
:
"/sbfu/sbzc/"
,
//产品路径编码--显示不用
"path_name"
:
"/商标服务/商标注册/"
,
//产品路径名称--显示不用
"item_code"
:
"zzsbzc"
,
//产品code
"item_name"
:
"商标注册【自助申请】"
,
//产品名称
"channel_item_code"
:
"zzsbzc"
,
//渠道产品code
"channel_item_name"
:
"商标注册【自助申请】"
,
//渠道产品名称
"pic_url"
:
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_qft_pi15755163570461.png"
,
//产品的图片
"product_short_desc"
:
"适合熟知商标注册流程的企业用户"
,
//产品的介绍
"product_desc"
:
"[
\"
自己检索商标,准备官方所需注册材料
\"
,
\"
提交迅速,及时反馈
\"
,
\"
全流程跟踪,掌握申请进度
\"
]"
,
//产品的描述列表
"desc_url"
:
null
,
//产品介绍图片地址
"icon_url"
:
null
,
//产品的icon
"productType_id"
:
2
,
//产品类型id--显示用不到
"sort"
:
1
,
//排序
"pay_code"
:
"zzsbzc-1"
,
//支付价格code
"service_charge"
:
30
,
//服务费
"public_expense"
:
270
,
//官费
"price"
:
300
,
//价格
"price_type"
:
"mj"
,
//定价类型:mj:每件,mc:每次,mt:每天,my:每月,mn:每年,qj:区间
"price_type_name"
:
"每件"
,
//定价类型名称
"price_desc"
:
"每件(10小项)"
,
//定价描述
"min_qty"
:
null
,
//区间最小值
"max_qty"
:
null
//区间最大值
}
],
"requestId"
:
"c39ee8a924074904b1694dd3bf2d6c4b"
}
```
## **<a name="getProductListByTwoCode"> 产品列表-根据产品二类获取</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/product/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getProductList
```
javascript
{
"pathCode"
:
"gsfu/gszc"
//查询的路径:大类code/二类code
}
```
#### 返回结果 0为成功,否则为失败
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
[
{
"uapp_id"
:
26
,
//平台id--显示不用
"path_code"
:
"/sbfu/sbzc/"
,
//产品路径编码--显示不用
"path_name"
:
"/商标服务/商标注册/"
,
//产品路径名称--显示不用
"item_code"
:
"zzsbzc"
,
//产品code
"item_name"
:
"商标注册【自助申请】"
,
//产品名称
"channel_item_code"
:
"zzsbzc"
,
//渠道产品code
"channel_item_name"
:
"商标注册【自助申请】"
,
//渠道产品名称
"pic_url"
:
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_qft_pi15755163570461.png"
,
//产品的图片
"product_short_desc"
:
"适合熟知商标注册流程的企业用户"
,
//产品的介绍
"product_desc"
:
"[
\"
自己检索商标,准备官方所需注册材料
\"
,
\"
提交迅速,及时反馈
\"
,
\"
全流程跟踪,掌握申请进度
\"
]"
,
//产品的描述列表
"desc_url"
:
null
,
//产品介绍图片地址
"icon_url"
:
null
,
//产品的icon
"productType_id"
:
2
,
//产品类型id--显示用不到
"sort"
:
1
,
//排序
"pay_code"
:
"FW_GOODS-582246-1"
,
//支付价格code----京东合作的跳转到京东详情页面,和之前的一样
"service_charge"
:
30
,
//服务费
"public_expense"
:
270
,
//官费
"price"
:
300
,
//价格
"price_type"
:
"mj"
,
//定价类型:mj:每件,mc:每次,mt:每天,my:每月,mn:每年,qj:区间
"price_type_name"
:
"每件"
,
//定价类型名称
"price_desc"
:
"每件(10小项)"
,
//定价描述
"min_qty"
:
null
,
//区间最小值
"max_qty"
:
null
//区间最大值
},
{
"uapp_id"
:
31
,
"path_code"
:
"/gsfu/gszc/"
,
"path_name"
:
"/工商服务/公司注册/"
,
"item_code"
:
"shgszc"
,
"item_name"
:
"公司注册(上海)"
,
"channel_item_code"
:
"FW_GOODS-582246-1"
,
"channel_item_name"
:
"京东云PLUS公司注册(上海)"
,
"pic_url"
:
null
,
"product_short_desc"
:
null
,
"product_desc"
:
null
,
"desc_url"
:
null
,
"icon_url"
:
null
,
"productType_id"
:
4
,
"sort"
:
30
,
"pay_code"
:
"FW_GOODS-582246-2"
,
"service_charge"
:
120
,
"public_expense"
:
0
,
"price"
:
500
,
"price_type"
:
"mj"
,
"price_type_name"
:
"每件"
,
"price_desc"
:
"杨浦内资小规模"
,
"min_qty"
:
null
,
"max_qty"
:
null
},
],
"requestId"
:
"c39ee8a924074904b1694dd3bf2d6c4b"
}
```
## **<a name="getProductDetail"> 产品详情</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/product/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getProductDetail
```
javascript
{
"channelItemCode"
:
"zzsbzc"
}
```
#### 返回结果 0为成功,否则为失败
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"id"
:
1
,
//产品Id
"uapp_id"
:
26
,
"path_code"
:
"/sbfu/sbzc/"
,
"path_name"
:
"/商标服务/商标注册/"
,
"item_code"
:
"zzsbzc"
,
"item_name"
:
"商标注册【自助申请】"
,
"channel_item_code"
:
"zzsbzc"
,
"channel_item_name"
:
"商标注册【自助申请】"
,
"pic_url"
:
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_qft_pi15755163570461.png"
,
"product_short_desc"
:
"适合熟知商标注册流程的企业用户"
,
//产品的介绍
"product_desc"
:
"[
\"
自己检索商标,准备官方所需注册材料
\"
,
\"
提交迅速,及时反馈
\"
,
\"
全流程跟踪,掌握申请进度
\"
]"
,
//产品的描述列表
"desc_url"
:
null
,
"icon_url"
:
null
,
"productType_id"
:
2
,
"price_list"
:
[
{
"pay_code"
:
"zzsbzc-1"
,
//支付价格code
"price"
:
300
,
"supply_price"
:
270
,
"service_charge"
:
30
,
"public_expense"
:
270
,
"is_default"
:
1
,
//是否默认,1默认,0不是默认
"price_type"
:
"mj"
,
"price_type_name"
:
"每件"
,
"sort"
:
1
,
"price_desc"
:
"每件(10小项)"
,
"min_qty"
:
null
,
"max_qty"
:
null
},
{
"pay_code"
:
"zzsbzc-2"
,
//支付价格code
"price"
:
580
,
"supply_price"
:
540
,
"service_charge"
:
40
,
"public_expense"
:
540
,
"is_default"
:
0
,
"price_type"
:
"mj"
,
"price_type_name"
:
"每件"
,
"sort"
:
2
,
"price_desc"
:
"2件(20小项)"
,
"min_qty"
:
null
,
"max_qty"
:
null
}
]
},
"requestId"
:
"5913fc3ae97a402e93330c2d488f1f7e"
}
```
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