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
11e4a5ea
Commit
11e4a5ea
authored
Apr 27, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logo
parent
4e201ed1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
2 deletions
+140
-2
center-channel/app/base/api/impl/action/logoOrderApi.js
+54
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+31
-0
center-channel/app/front/entry/public/apidoc/README.md
+4
-2
center-channel/app/front/entry/public/apidoc/platform/logoOrder.md
+51
-0
No files found.
center-channel/app/base/api/impl/action/logoOrderApi.js
0 → 100644
View file @
11e4a5ea
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
LogoOrderAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
if
(
pobj
.
actionType
==
'getPolicyNeedList'
||
pobj
.
actionType
==
'submitPolicyNeedNotes'
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"user no login!"
);
}
if
(
!
pobj
.
appInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"app is null!"
);
}
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"singlelogo"
:
//生成logo
opResult
=
await
this
.
centerorderSve
.
singlelogo
(
pobj
);
break
;
case
"getLogoListByUser"
:
//获取已购买的logo
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"getCollectibleLogoListByUser"
:
//获取收藏的logo
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"collectLogo"
:
//收藏logo
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
LogoOrderAPI
;
\ No newline at end of file
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
11e4a5ea
...
@@ -399,6 +399,37 @@ class CenterorderService extends AppServiceBase {
...
@@ -399,6 +399,37 @@ class CenterorderService extends AppServiceBase {
return
res
;
return
res
;
}
}
//--------------------------阿里ICP---end--------------------------------------------------------
//--------------------------阿里ICP---end--------------------------------------------------------
//生成logo
async
singlelogo
(
pobj
){
var
reqUrl
=
"http://43.247.184.92:15501/api/singlelogo"
;
var
obj
=
pobj
.
actionBody
;
if
(
!
obj
.
title
){
return
system
.
getResult
(
null
,
"品牌名称不能为空"
);
}
if
(
!
obj
.
subtitle
){
return
system
.
getResult
(
null
,
"品牌标语不能为空"
);
}
if
(
!
obj
.
profession
){
return
system
.
getResult
(
null
,
"行业名称不能为空"
);
}
if
(
!
obj
.
description
){
obj
.
description
=
""
;
}
var
rtn
=
null
;
try
{
rtn
=
await
this
.
execClient
.
execPost
(
obj
,
reqUrl
);
var
res
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
){
return
system
.
getResultSuccess
(
res
.
data
);
}
else
{
return
system
.
getResult
(
null
,
"生成logo操作失败"
);
}
}
catch
(
e
)
{
return
system
.
getResult
(
null
,
"生成logo操作异常"
);
}
}
}
}
module
.
exports
=
CenterorderService
;
module
.
exports
=
CenterorderService
;
// var task = new CenterorderService();
// var task = new CenterorderService();
...
...
center-channel/app/front/entry/public/apidoc/README.md
View file @
11e4a5ea
...
@@ -38,4 +38,6 @@
...
@@ -38,4 +38,6 @@
1
[
政策接口
](
doc/api/platform/policy.md
)
1
[
政策接口
](
doc/api/platform/policy.md
)
## 12. ICP订单相关接口
## 12. ICP订单相关接口
1
[
ICP订单接口
](
doc/api/platform/icpOrder.md
)
1
[
ICP订单接口
](
doc/api/platform/icpOrder.md
)
\ No newline at end of file
## 13. Logo订单相关接口
1
[
Logo订单接口
](
doc/api/platform/logoOrder.md
)
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/platform/logoOrder.md
0 → 100644
View file @
11e4a5ea
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
生成logo
](
#singlelogo
)
1.
[
获取已购买的logo
](
#getLogoListByUser
)
1.
[
获取收藏的logo
](
#getCollectibleLogoListByUser
)
1.
[
收藏logo
](
#collectLogo
)
## **<a name="singlelogo"> icp方案提交</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/action/logoOrderApi/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:singlelogo
```
javascript
{
"actionType"
:
"singlelogo"
,
"actionBody"
:{
"title"
:
"周杰伦"
,
//名牌名称,必传
"subtitle"
:
"baby"
,
//品牌标语必填
"profession"
:
"通讯行业"
,
//行业 必填
"description"
:
"有公司的地方就有公司宝"
,
//现在必填,可以为空,后续会控制可传可不传
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"成功"
,
"data"
:
[
{
"id"
:
1138
,
//id:后续用了购买的标识,购买时需要回传
"description"
:
"淡蓝色象征着清新,淡雅"
,
//描述
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202004270135297459.png"
//图像url
},
{
"id"
:
1149
,
"description"
:
"灰色象征高雅,朴素,沉稳。"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202004270135315198.png"
}
]
}
```
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