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
b3eaa8e5
Commit
b3eaa8e5
authored
May 10, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
db32df6f
25d06343
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
632 additions
and
123 deletions
+632
-123
center-channel/app/base/api/impl/action/tmQuery.js
+8
-0
center-channel/app/base/api/impl/action/tmTools.js
+4
-4
center-channel/app/base/db/cache/feishuAppAccessTokenCache.js
+33
-0
center-channel/app/base/db/cache/feishuAppTicketCache.js
+33
-0
center-channel/app/base/db/cache/feishuUserAccessTokenCache.js
+42
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+7
-2
center-channel/app/base/service/impl/common/feishuLoginSve.js
+91
-0
center-channel/app/base/service/impl/trademark/tmquerySve.js
+5
-0
center-channel/app/base/service/impl/trademark/toolSve.js
+10
-29
center-channel/app/base/service/impl/utilsSve/utilsFeishuSve.js
+159
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+91
-10
center-channel/app/base/utils/aliyunClient.js
+1
-1
center-channel/app/base/utils/ossClient.js
+4
-2
center-channel/app/config/routes/api.js
+29
-2
center-channel/app/config/settings.js
+8
-0
center-channel/app/front/entry/public/apidoc/opTrademark/tmSearch.md
+32
-0
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
+15
-15
center-channel/app/front/entry/public/apidoc/platform/logoOrder.md
+57
-57
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
+3
-1
No files found.
center-channel/app/base/api/impl/action/tmQuery.js
View file @
b3eaa8e5
...
...
@@ -91,6 +91,14 @@ class TmQueryAPI extends WEBBase {
case
"icheming"
:
//商标智能分析 -----
opResult
=
await
this
.
toolSve
.
icheming
(
action_body
,
req
);
break
;
case
"tmreport"
:
//商标报告--TODO:后期将要迁移到center-service
var
rtn
=
await
this
.
tmquerySve
.
tmreport
(
action_body
,
req
);
if
(
rtn
.
code
>
0
)
{
opResult
=
system
.
getResultSuccess
();
}
else
{
opResult
=
system
.
getResultFail
();
}
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/api/impl/action/tmTools.js
View file @
b3eaa8e5
...
...
@@ -18,10 +18,10 @@ class TmToolsAPI extends WEBBase {
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
action_process
,
action_type
,
action_body
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
// sy
...
...
@@ -34,8 +34,8 @@ class TmToolsAPI extends WEBBase {
case
"decryptStr"
:
//
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
break
;
case
"getOssConfig"
:
//
opResult
=
await
this
.
toolSve
.
getOssConfig
();
case
"getOssConfig"
:
//
获取oss信息
opResult
=
await
this
.
toolSve
.
getOssConfig
(
pobj
);
break
;
case
"getNcl"
:
//尼斯查询(一)
opResult
=
await
this
.
toolSve
.
getNcl
(
action_body
,
req
);
...
...
center-channel/app/base/db/cache/feishuAppAccessTokenCache.js
0 → 100644
View file @
b3eaa8e5
const
CacheBase
=
require
(
"../cache.base"
);
const
system
=
require
(
"../../system"
);
// const OpenplatformWxop = require("../../wxop/impl/openplatformWxop");
/**
* 飞书小程序--AppAccessToken缓存--有效时间7100s
*/
class
feishuAppAccessTokenCache
extends
CacheBase
{
constructor
(){
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
prefix
=
"feishu_appAccessToken_9e28dcb1d637100d"
;
}
desc
()
{
return
"应用UI配置缓存"
;
}
prefix
()
{
return
"feishu_appAccessToken_9e28dcb1d637100d"
;
}
async
get
(){
var
key
=
this
.
prefix
;
var
result
=
await
this
.
redisClient
.
get
(
key
);
return
result
;
}
async
set
(
accessToken
){
var
key
=
this
.
prefix
;
if
(
accessToken
){
await
this
.
redisClient
.
setWithEx
(
key
,
accessToken
,
7100
);
}
return
accessToken
;
}
}
module
.
exports
=
feishuAppAccessTokenCache
;
\ No newline at end of file
center-channel/app/base/db/cache/feishuAppTicketCache.js
0 → 100644
View file @
b3eaa8e5
const
CacheBase
=
require
(
"../cache.base"
);
const
system
=
require
(
"../../system"
);
// const OpenplatformWxop = require("../../wxop/impl/openplatformWxop");
/**
* 飞书小程序--AppTicket缓存--有效时间7100s
*/
class
feishuAppTicketCache
extends
CacheBase
{
constructor
(){
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
prefix
=
"feishu_appTicket_cli_9e28dcb1d637100d"
;
}
desc
()
{
return
"应用UI配置缓存"
;
}
prefix
()
{
return
"feishu_appTicket_cli_9e28dcb1d637100d"
;
}
async
get
(){
var
key
=
this
.
prefix
;
var
result
=
await
this
.
redisClient
.
get
(
key
);
return
result
}
async
set
(
appTicket
){
var
key
=
this
.
prefix
;
if
(
appTicket
){
await
this
.
redisClient
.
setWithEx
(
key
,
appTicket
,
7100
);
}
return
appTicket
;
}
}
module
.
exports
=
feishuAppTicketCache
;
\ No newline at end of file
center-channel/app/base/db/cache/feishuUserAccessTokenCache.js
0 → 100644
View file @
b3eaa8e5
const
CacheBase
=
require
(
"../cache.base"
);
const
system
=
require
(
"../../system"
);
// const OpenplatformWxop = require("../../wxop/impl/openplatformWxop");
/**
* 飞书小程序--UserAccessTokenCache缓存--有效时间7100s
*/
class
feishuUserAccessTokenCache
extends
CacheBase
{
constructor
(){
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
prefix
=
"feishu_userAccessToken_9e28dcb1d637100d"
;
}
desc
()
{
return
"应用UI配置缓存"
;
}
prefix
()
{
return
"feishu_userAccessToken_9e28dcb1d637100d"
;
}
async
get
(
openid
){
var
key
=
this
.
prefix
+
"_"
+
openid
;
var
result
=
await
this
.
redisClient
.
get
(
key
);
var
obj
=
null
;
if
(
result
){
obj
=
JSON
.
parse
(
result
);
}
if
(
obj
&&
obj
.
access_token
){
return
obj
;
}
return
null
;
}
async
set
(
obj
,
openid
){
var
key
=
this
.
prefix
+
"_"
+
openid
;
if
(
obj
&&
obj
.
access_token
){
var
stringobj
=
JSON
.
stringify
(
obj
);
await
this
.
redisClient
.
setWithEx
(
key
,
stringobj
,
7100
);
return
obj
;
}
return
null
;
}
}
module
.
exports
=
feishuUserAccessTokenCache
;
\ No newline at end of file
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
b3eaa8e5
...
...
@@ -221,6 +221,7 @@ class CenterorderService extends AppServiceBase {
// pobj.actionBody = data.data;
pobj
.
actionBody
.
orderNo
=
pobj
.
actionBody
.
bizId
;
pobj
.
actionBody
.
totalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
orderPrice
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
data
.
data
.
payCode
;
pobj
.
actionBody
.
channelItemCode
=
data
.
data
.
channelItemCode
;
...
...
@@ -241,7 +242,6 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionBody
.
orderNo
=
orderrtn
.
data
.
orderNo
}
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
solutionBizId
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
...
...
@@ -255,9 +255,14 @@ class CenterorderService extends AppServiceBase {
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
if
(
pobj
.
actionBody
.
channelItemCode
==
'5'
){
pobj
.
actionBody
.
regType
=
"ali.icp"
;
}
else
if
(
pobj
.
actionBody
.
channelItemCode
==
'7'
){
pobj
.
actionBody
.
regType
=
"ali.edi"
;
}
if
(
solutiondata
.
status
==
0
)
{
pobj
.
actionBody
.
orderNo
=
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
;
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"p
ushOrderBusin
ess"
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"p
aySucc
ess"
);
}
return
system
.
getResultSuccess
();
}
...
...
center-channel/app/base/service/impl/common/feishuLoginSve.js
0 → 100644
View file @
b3eaa8e5
const
system
=
require
(
"../../../system"
);
const
crypto
=
require
(
'crypto'
);
var
settings
=
require
(
"../../../../config/settings"
);
class
feishuLoginService
{
constructor
()
{
this
.
utilsFeishuSve
=
system
.
getObject
(
"service.utilsSve.utilsFeishuSve"
);
this
.
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
};
//用户登录
async
checkAndLogin
(
pobj
){
if
(
!
pobj
.
code
){
return
system
.
getResultFail
(
-
100
,
"code参数不能为空"
);
}
//获取 app_access_token(应用商店应用)
var
appAccessTokenRes
=
await
this
.
utilsFeishuSve
.
getAppAccessToken
();
if
(
appAccessTokenRes
.
status
!=
0
){
return
appAccessTokenRes
;
}
var
app_access_token
=
appAccessTokenRes
.
data
;
//获取飞书登录用户身份
var
userAccessTokenParams
=
{
"code"
:
pobj
.
code
,
"app_access_token"
:
app_access_token
,
"open_id"
:
pobj
.
open_id
||
""
};
var
userAccessTokenRes
=
await
this
.
utilsFeishuSve
.
getUserAccessToken
(
userAccessTokenParams
);
if
(
userAccessTokenRes
.
status
!=
0
){
return
userAccessTokenRes
;
}
var
userAccessTokenObj
=
userAccessTokenRes
.
data
;
//帐号登录---若用户信息已存在 则返回userpin 不存在则返回空
var
loginByUserNameParams
=
{
"actionType"
:
"getLoginByUserName"
,
"actionBody"
:
{
"open_id"
:
userAccessTokenObj
.
open_id
}
};
var
loginByUserNameRes
=
await
this
.
getLoginByUserName
(
loginByUserNameParams
);
if
(
loginByUserNameRes
&&
loginByUserNameRes
.
status
==
0
){
return
loginByUserNameRes
;
//获取userpin直接返回
}
//获取飞书用户信息
var
userInfoParams
=
{
user_access_token
:
userAccessTokenObj
.
access_token
};
var
userInfoRes
=
await
this
.
utilsFeishuSve
.
getUserInfo
(
userInfoParams
);
if
(
userInfoRes
.
status
!=
0
){
return
userInfoRes
;
}
var
userInfoObj
=
userInfoRes
.
data
;
var
createUserParams
=
{
// uapp_id,channel_userid,channel_username,channel_nickname,open_id,he
};
loginByUserNameParams
=
{
"actionType"
:
"getLoginByUserName"
,
"actionBody"
:
{
"open_id"
:
userAccessTokenObj
.
open_id
,
"channelUserId"
:
userInfoObj
.
mobile
,
// Y 渠道用户ID
"channelUserName"
:
userInfoObj
.
name
,
// N 渠道用户名
"mobile"
:
userInfoObj
.
mobile
,
// N 渠道用户手机号
"nickName"
:
userInfoObj
.
name
,
// N 用户昵称
"email"
:
userInfoObj
.
eamil
,
//邮箱
"head_url"
:
userInfoObj
.
avatar_url
//头像
}
};
loginByUserNameRes
=
await
this
.
getLoginByUserName
(
loginByUserNameParams
);
if
(
loginByUserNameRes
&&
loginByUserNameRes
.
status
==
0
){
return
loginByUserNameRes
;
//获取userpin直接返回
}
return
system
.
getResultFail
(
"获取userpin失败"
);
}
//渠道通过账户进行登录,有则返回用户信息,没有则创建用户------>供后端调用
async
getLoginByUserName
(
pobj
){
var
tmpOpResult
=
await
this
.
utilsAuthSve
.
getLoginByUserName
(
pobj
,
pobj
.
actionBody
);
if
(
tmpOpResult
.
status
!=
0
&&
tmpOpResult
.
status
!=
2060
)
{
return
tmpOpResult
;
}
opResult
=
system
.
getResultSuccess
({
userpin
:
pobj
.
actionBody
.
userpin
})
if
(
tmpOpResult
.
status
==
2060
)
{
opResult
.
msg
=
tmpOpResult
.
msg
;
opResult
.
data
.
userpin
=
tmpOpResult
.
data
.
userpin
;
}
return
opResult
;
}
}
module
.
exports
=
feishuLoginService
;
\ No newline at end of file
center-channel/app/base/service/impl/trademark/tmquerySve.js
View file @
b3eaa8e5
...
...
@@ -74,6 +74,11 @@ class TmqueryService {
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
async
tmreport
(
queryobj
,
req
)
{
var
url
=
settings
.
igirlWeburl
()
+
"web/toolCtl/createMonitoringReportH5p"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
async
opReqResult
(
reqUrl
,
queryobj
,
req
)
{
var
rtn
=
await
this
.
execClient
.
execPushDataPost
(
queryobj
,
reqUrl
,
req
.
headers
[
"token"
],
req
.
headers
[
"request-id"
]);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
...
...
center-channel/app/base/service/impl/trademark/toolSve.js
View file @
b3eaa8e5
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
crypto
=
require
(
'crypto'
);
const
cryptoJS
=
require
(
"crypto-js"
);
var
fs
=
require
(
"fs"
);
var
accesskey
=
'DHmRtFlw2Zr3KaRwUFeiu7FWATnmla'
;
var
accessKeyId
=
'LTAIyAUK8AD04P5S'
;
var
url
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com"
;
class
ToolService
{
class
ToolService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
zcApiUrl
=
settings
.
reqZcApi
();
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
//
this.execClient = system.getObject("util.execClient");
}
async
getCropperPic
(
obj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/tool/toolApi/getCropperPic"
;
...
...
@@ -79,29 +78,11 @@ class ToolService {
return
data
;
}
async
getOssConfig
(
queryobj
,
req
)
{
var
policyText
=
{
"expiration"
:
"2119-12-31T16:00:00.000Z"
,
"conditions"
:
[
[
"content-length-range"
,
0
,
1048576000
],
[
"starts-with"
,
"$key"
,
"zc"
]
]
};
var
b
=
new
Buffer
(
JSON
.
stringify
(
policyText
));
var
policyBase64
=
b
.
toString
(
'base64'
);
var
signature
=
crypto
.
createHmac
(
'sha1'
,
accesskey
).
update
(
policyBase64
).
digest
().
toString
(
'base64'
);
//base64
var
data
=
{
OSSAccessKeyId
:
accessKeyId
,
policy
:
policyBase64
,
Signature
:
signature
,
Bucket
:
'gsb-zc'
,
success_action_status
:
201
,
url
:
url
};
return
system
.
getResultSuccess
(
data
);
};
async
getOssConfig
(
pobj
,
req
)
{
//获取oss信息
var
reqUrl
=
settings
.
centerAppUrl
()
+
"auth/accessAuth/getOssInfo"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
}
//加密信息
async
encryptStr
(
app
,
opStr
)
{
if
(
!
opStr
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsFeishuSve.js
0 → 100644
View file @
b3eaa8e5
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
/**
* 飞书小程序相关接口
*/
class
UtilsFeishuService
{
constructor
()
{
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
appConfig
=
{
app_id
:
"cli_9e28dcb1d637100d"
,
app_secret
:
"zL1uRrWFzwhFbLWZrmSuCh72JGjJXQg0"
}
};
//飞书通知
async
notify
(
pobj
){
if
(
!
pobj
||
!
pobj
.
type
){
return
system
.
getResultFail
(
"参数错误"
);
}
if
(
pobj
.
type
==
"url_verification"
){
//表示这是一个验证请求
return
this
.
subscribeVerification
(
pobj
);
}
if
(
pobj
.
type
==
"event_callback"
){
//事件回调
if
(
!
pobj
.
event
){
return
system
.
getResultFail
(
"event参数错误"
);
}
var
event
=
pobj
.
event
;
if
(
event
.
type
==
"app_ticket"
){
//app_ticket 事件
return
this
.
receiveAppTicket
(
pobj
);
}
else
{
return
system
.
getResultFail
(
"未知事件"
);
}
}
return
system
.
getResultFail
(
"未知事件"
);
}
//订阅验证
async
subscribeVerification
(
pobj
){
if
(
pobj
&&
pobj
.
challenge
){
return
{
"challenge"
:
pobj
.
challenge
};
}
else
{
return
{};
}
}
//接收app_ticket
async
receiveAppTicket
(
pobj
){
if
(
pobj
&&
pobj
.
event
&&
pobj
.
event
.
app_ticket
&&
pobj
.
event
.
type
&&
pobj
.
event
.
type
==
"app_ticket"
){
//将app_ticket保存到缓存
await
this
.
cacheManager
[
"feishuAppTicketCache"
].
set
(
pobj
.
event
.
app_ticket
);
return
system
.
getResultSuccess
();
}
return
system
.
getResultFail
();
}
//重新推送app_ticket(主动触发)
async
resendAppTicket
(){
var
url
=
"https://open.feishu.cn/open-apis/auth/v3/app_ticket/resend"
;
var
pobj
=
{
app_id
:
this
.
appConfig
.
app_id
,
//应用唯一标识,创建应用后获得
app_secret
:
this
.
appConfig
.
app_secret
//应用秘钥,创建应用后获得
};
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
code
==
0
){
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"execPost data is empty.错误码:"
+
result
.
code
);
}
//获取app_access_token(应用商店应用)
async
getAppAccessToken
(){
var
appAccessToken
=
await
this
.
cacheManager
[
"feishuAppAccessTokenCache"
].
get
();
if
(
appAccessToken
){
return
system
.
getResultSuccess
(
appAccessToken
);
}
var
app_ticket
=
await
this
.
cacheManager
[
"feishuAppTicketCache"
].
get
();
if
(
!
app_ticket
){
await
this
.
resendAppTicket
();
//重新推送app_ticket
return
system
.
getResultFail
(
"app_ticket不存在"
);
}
var
url
=
"https://open.feishu.cn/open-apis/auth/v3/app_access_token"
;
var
obj
=
{
app_id
:
this
.
appConfig
.
app_id
,
//应用唯一标识,创建应用后获得
app_secret
:
this
.
appConfig
.
app_secret
,
//应用秘钥,创建应用后获得
app_ticket
:
app_ticket
//平台定时推送给应用的临时凭证,通过事件监听机制获得,详见订阅事件
};
var
rtn
=
await
this
.
execClient
.
execPost
(
obj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
code
==
0
&&
result
.
app_access_token
){
//缓存AppAccessToken
await
this
.
cacheManager
[
"feishuAppAccessTokenCache"
].
set
(
result
.
app_access_token
);
return
system
.
getResultSuccess
(
result
.
app_access_token
);
}
return
system
.
getResultFail
(
"获取appAccessToken失败"
);
}
//获取登录用户身份
async
getUserAccessToken
(
obj
){
var
resData
=
{};
if
(
obj
.
open_id
){
//缓存中获取登录用户身份
resData
=
await
this
.
cacheManager
[
"feishuUserAccessTokenCache"
].
get
(
obj
.
open_id
);
}
//缓存中存在 直接返回
if
(
resData
&&
resData
.
access_token
){
return
system
.
getResultSuccess
(
resData
);
}
if
(
!
obj
.
code
){
return
system
.
getResultFail
(
"code参数不能为空"
);
}
if
(
!
obj
.
app_access_token
){
return
system
.
getResultFail
(
"app_access_token参数不能为空"
);
}
var
url
=
"https://open.feishu.cn/open-apis/authen/v1/access_token"
;
var
fsObj
=
{
app_access_token
:
obj
.
app_access_token
,
//应用的 app_access_token,必须与请求身份验证中的应用保持一致
grant_type
:
"authorization_code"
,
//在本流程中,此值为 authorization_code
code
:
obj
.
code
//来自请求身份验证(新)流程,用户扫码登录后会自动302到redirect_uri并带上此参数
};
var
rtn
=
await
this
.
execClient
.
execPost
(
fsObj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
code
==
0
&&
result
.
data
){
//缓存AppAccessToken
await
this
.
cacheManager
[
"feishuUserAccessTokenCache"
].
set
(
result
.
data
,
result
.
data
.
open_id
);
return
system
.
getResultSuccess
(
result
.
data
);
}
return
system
.
getResult
(
null
,
"获取飞书登录用户身份失败"
);
}
//获取用户信息
async
getUserInfo
(
pobj
){
if
(
!
pobj
.
user_access_token
){
return
system
.
getResultFail
(
"user_access_token参数不能为空"
)
}
var
url
=
"https://open.feishu.cn/open-apis/authen/v1/user_info"
;
var
obj
=
{
user_access_token
:
pobj
.
user_access_token
};
var
rtn
=
await
this
.
execClient
.
execGet
(
obj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
code
==
0
&&
result
.
data
){
return
system
.
getResultSuccess
(
result
.
data
);
}
return
system
.
getResult
(
null
,
"获取飞书用户信息失败"
);
}
}
module
.
exports
=
UtilsFeishuService
;
// var task = new UtilsFeishuService();
// task.resendAppTicket().then(res=>{
// console.log(res,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
// })
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
b3eaa8e5
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
fs
=
require
(
"fs"
);
//需求操作类
class
UtilsNeedService
extends
AppServiceBase
{
constructor
()
{
...
...
@@ -9,6 +10,7 @@ class UtilsNeedService extends AppServiceBase {
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
ossClient
=
system
.
getObject
(
"util.ossClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
}
/**
...
...
@@ -39,7 +41,16 @@ class UtilsNeedService extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
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
;
}
...
...
@@ -50,7 +61,7 @@ class UtilsNeedService extends AppServiceBase {
if
(
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
}
pobj
.
actionType
=
"
abolishIcpProgramme
"
;
pobj
.
actionType
=
"
receiveIcpFeedback
"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
...
...
@@ -142,36 +153,37 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100495"
);
}
actionBody
.
BizId
=
actionBody
.
bizId
;
if
(
!
actionBody
.
status
)
{
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,100495"
);
}
if
(
actionBody
.
businessLicense
)
{
actionBody
.
newbusinessLicense
=
await
self
.
o
ssClient
.
aliurl2zcurl
(
actionBody
.
businessLicense
);
actionBody
.
newbusinessLicense
=
await
self
.
o
pDownFileInfo
(
actionBody
.
businessLicense
);
}
if
(
actionBody
.
idCardUrlList
)
{
var
jsonidCardUrlList
=
JSON
.
stringify
(
actionBody
.
idCardUrlList
);
var
jsonidCardUrlList
=
JSON
.
parse
(
actionBody
.
idCardUrlList
);
var
newidCardUrlList
=
[];
for
(
var
i
=
0
;
i
<
jsonidCardUrlList
.
length
;
i
++
)
{
var
key
=
jsonidCardUrlList
[
i
];
newidCardUrlList
.
push
(
await
self
.
o
ssClient
.
aliurl2zcurl
(
key
));
newidCardUrlList
.
push
(
await
self
.
o
pDownFileInfo
(
key
));
}
actionBody
.
newidCardUrlList
=
newidCardUrlList
;
}
if
(
actionBody
.
userPlan
)
{
actionBody
.
newuserPlan
=
await
self
.
o
ssClient
.
aliurl2zcurl
(
actionBody
.
userPlan
);
actionBody
.
newuserPlan
=
await
self
.
o
pDownFileInfo
(
actionBody
.
userPlan
);
}
if
(
actionBody
.
userForeig
)
{
actionBody
.
newuserForeig
=
await
self
.
o
ssClient
.
aliurl2zcurl
(
actionBody
.
userForeig
);
actionBody
.
newuserForeig
=
await
self
.
o
pDownFileInfo
(
actionBody
.
userForeig
);
}
if
(
actionBody
.
userLaw
)
{
actionBody
.
newuserLaw
=
await
self
.
o
ssClient
.
aliurl2zcurl
(
actionBody
.
userLaw
);
actionBody
.
newuserLaw
=
await
self
.
o
pDownFileInfo
(
actionBody
.
userLaw
);
}
if
(
actionBody
.
userOtherList
)
{
var
jsonuserOtherList
=
JSON
.
stringify
(
actionBody
.
userOtherList
);
var
jsonuserOtherList
=
JSON
.
parse
(
actionBody
.
userOtherList
);
var
newuserOtherList
=
[];
for
(
var
i
=
0
;
i
<
jsonuserOtherList
.
length
;
i
++
)
{
var
key
=
jsonuserOtherList
[
i
];
newuserOtherList
.
push
(
await
self
.
o
ssClient
.
aliurl2zcurl
(
key
));
newuserOtherList
.
push
(
await
self
.
o
pDownFileInfo
(
key
));
}
actionBody
.
newuserOtherList
=
newuserOtherList
;
}
...
...
@@ -180,7 +192,75 @@ class UtilsNeedService extends AppServiceBase {
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
rtn
;
}
async
opDownFileInfo
(
docUrl
,
result
)
{
//从oss下载到本地并上传到自己oss,之后删除本地文件
/*docUrl下载链接,全路径,如:https://XXXXXX.pdf?XXXXX */
try
{
var
tmpFileName
=
docUrl
.
substring
(
0
,
docUrl
.
lastIndexOf
(
"?"
));
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
//解码后的文件全名:xxx.pdf
var
fileAllName
=
decodeURIComponent
(
fileName
);
//为xxx.pdf
var
saveFilePath
=
'/tmp/'
+
fileAllName
;
// 下载文件到指定的路径
var
tmpp
=
await
this
.
restClient
.
execDownload
(
"'"
+
docUrl
+
"'"
,
saveFilePath
);
//上传 saveFilePath的文件 到ossClient
var
rtn
=
await
this
.
ossClient
.
upfile
(
fileAllName
,
saveFilePath
);
result
=
rtn
.
url
;
//删除本地文件
fs
.
unlink
(
saveFilePath
,
function
(
err
)
{
});
}
catch
(
e
)
{
}
return
result
;
}
async
needDetailByChannelNo
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100491"
);
}
var
solutionobj
=
{
actionType
:
"getIcpProgrammeDetail"
,
actionBody
:
{
BizId
:
pobj
.
actionBody
.
bizId
},
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
var
url
=
this
.
centerOrderUrl
+
"action/icpapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
solutionobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
[
0
].
channelNeedNo
)
{
pobj
.
actionBody
.
needNo
=
solutiondata
.
data
[
0
].
channelNeedNo
;
pobj
.
actionBody
.
needId
=
solutiondata
.
data
[
0
].
channelNeedNo
;
pobj
.
actionBody
.
channelSolutionNo
=
solutiondata
.
data
[
0
].
channelSolutionNo
;
}
var
sobj
=
{
actionType
:
"getItemByChannelNeedNo"
,
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
sobj
,
reqUrl
);
if
(
itemResult
.
status
==
0
){
itemResult
.
data
.
channelSolutionNo
=
pobj
.
actionBody
.
channelSolutionNo
;
}
return
itemResult
;
}
// async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
// console.log(a.data);
// return a;
// }
}
module
.
exports
=
UtilsNeedService
;
// var a=new UtilsNeedService();
// a.test1();
\ No newline at end of file
center-channel/app/base/utils/aliyunClient.js
View file @
b3eaa8e5
...
...
@@ -55,7 +55,7 @@ class aliyunClient {
appkey
:
obj
.
appInfo
?
obj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
obj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
obj
),
//推送的参数信息
resultInfo
:
"error:"
+
JSON
.
stringify
(
e
.
stack
),
resultInfo
:
"error:"
+
JSON
.
stringify
(
e
),
clientIp
:
obj
.
clientIp
||
""
,
failType
:
1
,
opTitle
:
"old-reqbyget推送阿里信息返回异常"
,
...
...
center-channel/app/base/utils/ossClient.js
View file @
b3eaa8e5
...
...
@@ -39,10 +39,12 @@ class OSSClient {
}
async
aliurl2zcurl
(
key
)
{
var
writeStream
=
fs
.
createWriteStream
(
"/tmp/"
+
key
.
split
(
"/"
).
pop
())
var
filename
=
key
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
var
writeStream
=
fs
.
createWriteStream
(
"/tmp/tmpfile.jpg"
);
var
self
=
this
;
request
(
key
).
pipe
(
writeStream
);
writeStream
.
on
(
'finish'
,
function
()
{
oss
.
upfile
(
"20200412aaa33.jpg"
,
"/tmp/"
+
key
.
split
(
"/"
).
pop
()
).
then
(
function
(
result
)
{
self
.
upfile
(
filename
,
"/tmp/tmpfile.jsp"
).
then
(
function
(
result
)
{
console
.
log
(
result
.
res
.
requestUrls
[
0
]);
return
result
.
res
.
requestUrls
[
0
];
});
...
...
center-channel/app/config/routes/api.js
View file @
b3eaa8e5
...
...
@@ -3,6 +3,7 @@ var system = require("../../base/system");
const
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
const
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
const
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
const
utilsFeishuSve
=
system
.
getObject
(
"service.utilsSve.utilsFeishuSve"
);
module
.
exports
=
function
(
app
)
{
//-----------------------新的模式---------web---------开始
...
...
@@ -114,7 +115,7 @@ module.exports = function (app) {
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
,
"getPaidLogoListByUser"
,
"getCollectibleLogoListByUser"
,
"collectLogo"
,
"getLogoMaterial"
,
"cancelCollectLogo"
"getPaidLogoListByUser"
,
"getCollectibleLogoListByUser"
,
"collectLogo"
,
"getLogoMaterial"
,
"cancelCollectLogo"
,
"icpNotify"
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
@@ -238,7 +239,7 @@ module.exports = function (app) {
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
"submitNeed"
,
"paySuccess"
"submitNeed"
,
"paySuccess"
,
"icpNotify"
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
@@ -324,4 +325,30 @@ module.exports = function (app) {
//-----------------------新的模式---------api---------结束
//----------------------飞书小程序---------------------------------------------开始
//飞书通知
app
.
use
(
'/feishu/notify'
,
async
function
(
req
,
res
)
{
try
{
var
client_ip
=
system
.
get_client_ip
(
req
);
var
result
=
await
utilsFeishuSve
.
notify
(
req
.
body
);
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"飞书小程序记录回调处理结果,method=notify"
,
op
:
"app/config/routes/api.js/feishu/notify"
,
content
:
"回调参数:"
+
JSON
.
stringify
(
req
.
body
)
+
"回调结果:"
+
JSON
.
stringify
(
result
),
clientIp
:
client_ip
||
""
});
var
returnObj
=
JSON
.
stringify
(
result
);
return
res
.
end
(
returnObj
);
}
catch
(
error
)
{
logCtl
.
error
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"飞书小程序记录回调处理结果异常:,method=notify"
,
op
:
"app/config/routes/api.js/feishu/notify"
,
content
:
"回调参数:"
+
JSON
.
stringify
(
req
.
body
)
+
"error:"
+
error
.
stack
,
clientIp
:
client_ip
||
""
});
}
});
//----------------------飞书小程序---------------------------------------------结束
};
center-channel/app/config/settings.js
View file @
b3eaa8e5
...
...
@@ -83,6 +83,14 @@ var settings = {
return
"http://center-order-service/"
;
}
},
igirlWeburl
:
function
(){
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.210.106:3000/"
;
}
else
{
return
"http://igirl-service/"
;
}
},
reqTransferurl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.61:3003/"
;
...
...
center-channel/app/front/entry/public/apidoc/opTrademark/tmSearch.md
View file @
b3eaa8e5
...
...
@@ -17,6 +17,7 @@
1.
[
获取尼斯群组
](
#gettwoNcl
)
1.
[
尼斯分类检索
](
#nclFuwuSearch
)
1.
[
商标智能分析
](
#bycznfx
)
1.
[
商标报告
](
#tmreport
)
...
...
@@ -2647,3 +2648,34 @@
```
## **<a name="tmreport"> 商标报告</a>**
[
返回到目录
](
#menu
)
##### URL
[
api/action/tmQuery/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:tmreport
```
javascript
{
"actionType"
:
"tmreport"
,
"actionBody"
:
{
"companyname"
:
""
,
//公司名称
"phonenum"
:
""
,
//电话 非必添
"email"
:
""
,
//邮箱
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestId"
:
"3b8c2108ec8743c0a138081c5223f91c"
}
```
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
View file @
b3eaa8e5
...
...
@@ -62,14 +62,14 @@
{
"actionType"
:
"submitIcpMaterial"
,
"actionBody"
:{
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
"material"
:{
"Domain"
:
"备案域名"
,
"CorporateName"
:
"法人名称"
,
"IncludeForeignInvestment"
:
true
,
"PartnerBusinessLicense"
:
"营业执照"
,
"PartnerIdCardList"
:[
"相关人员身份证"
],
"PartnerDomainCertificate"
:
"域名证书"
,
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
必填
"material"
:{
//材料信息
"Domain"
:
"备案域名"
,
//必填
"CorporateName"
:
"法人名称"
,
//必填
"IncludeForeignInvestment"
:
true
,
//必填
"PartnerBusinessLicense"
:
"营业执照"
,
//必填
"PartnerIdCardList"
:[
"相关人员身份证"
],
//必填
"PartnerDomainCertificate"
:
"域名证书"
,
//必填
"PartnerPreviewOtherList"
:[
"合作方递交其他供预览的件,只能传递ZIP包"
],
"PartnerPlan"
:
"收费方案计划书"
,
"PartnerForeignInvestment"
:
"股东追溯不涉及外资承诺书"
,
...
...
@@ -108,7 +108,7 @@
{
"actionType"
:
"getProgrammeInfoByChannelNeedNo"
,
"actionBody"
:{
"needNo"
:
"20200413210610000001"
//渠道需求号
"needNo"
:
"20200413210610000001"
//渠道需求号
必填
}
}
...
...
@@ -349,9 +349,9 @@
{
"actionType"
:
"acceptIcpPartnerNotification"
,
"actionBody"
:{
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
"OfficialFileUrl"
:
"官⽂下载地址"
,
"ApplicationStatus"
:
"507"
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
必填
"OfficialFileUrl"
:
"官⽂下载地址"
,
//官文 非必填
"ApplicationStatus"
:
"507"
//状态码 必填
}
}
ApplicationStatus
:
...
...
@@ -387,8 +387,8 @@ ApplicationStatus:
{
"actionType"
:
"abolishIcpProgramme"
,
"actionBody"
:{
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
"Note"
:
"备注"
"BizId"
:
"S20200323174838000zhb"
,
//渠道方案号 同channelSolutionNo
必填
"Note"
:
"备注"
//关闭原因 必填
}
}
```
...
...
@@ -417,7 +417,7 @@ ApplicationStatus:
{
"actionType"
:
"getNeedSolutionDetailByUser"
,
"actionBody"
:{
"solutionNo"
:
"NS202004131008iKPRDB"
//方案号
"solutionNo"
:
"NS202004131008iKPRDB"
//方案号
必填
}
}
```
...
...
center-channel/app/front/entry/public/apidoc/platform/logoOrder.md
View file @
b3eaa8e5
...
...
@@ -22,12 +22,12 @@
{
"actionType"
:
"singlelogo"
,
"actionBody"
:{
"title"
:
"周杰伦"
,
"subtitle"
:
"baby"
,
"profession"
:
"通信行业"
,
"description"
:
"有公司的地方就有公司宝"
,
"curpage"
:
1
,
"pagesize"
:
10
"title"
:
"周杰伦"
,
//品牌名称 必填
"subtitle"
:
"baby"
,
//品牌标语 非必填
"profession"
:
"通信行业"
,
//行业 必填
"description"
:
"有公司的地方就有公司宝"
,
//品牌描述 非必填
"curpage"
:
1
,
//页码 非必填
"pagesize"
:
10
//每页条数 非必填
}
}
```
...
...
@@ -40,14 +40,14 @@
"total"
:
30
,
"data"
:[
{
"id"
:
4384
,
"title"
:
"周杰伦"
,
"subtitle"
:
"baby"
,
"first_color"
:
"(1,62,143)"
,
"sec_color"
:
"(0,0,0)"
,
"color_description"
:
"蓝色是博大的色彩,天空和大海这辽阔的景色都呈蔚蓝色。蓝色是永恒的象征"
,
"font_description"
:
""
周杰伦
"选用"
Gentium
"字体,字体整齐划一,笔画纤细,结构严谨,应用广泛,设计感强。"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202005060211078083.png"
"id"
:
4384
,
//品牌id
"title"
:
"周杰伦"
,
//品牌名称
"subtitle"
:
"baby"
,
//品牌标语
"first_color"
:
"(1,62,143)"
,
//主颜色
"sec_color"
:
"(0,0,0)"
,
//配色
"color_description"
:
"蓝色是博大的色彩,天空和大海这辽阔的景色都呈蔚蓝色。蓝色是永恒的象征"
,
//颜色描述
"font_description"
:
""
周杰伦
"选用"
Gentium
"字体,字体整齐划一,笔画纤细,结构严谨,应用广泛,设计感强。"
,
//字体描述
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202005060211078083.png"
//品牌图片
},
{
"id"
:
4380
,
...
...
@@ -160,10 +160,10 @@
{
"actionType"
:
"collectLogo"
,
"actionBody"
:{
"title"
:
"周杰伦"
,
//名牌名称,必
传
"subtitle"
:
"baby"
,
//品牌标语必填
"title"
:
"周杰伦"
,
//名牌名称,必
填
"subtitle"
:
"baby"
,
//品牌标语
必填
"profession"
:
"通讯行业"
,
//行业 必填
"description"
:
"有公司的地方就有公司宝"
,
//
现在必填,可以为空,后续会控制可传可不传
"description"
:
"有公司的地方就有公司宝"
,
//
品牌描述 非必填
"logo_id"
:
"1147"
,
//id:后续用了购买的标识,购买时需要回传 (生成logo接口返回) 必填
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202004270425473400.png"
,
//图片地址(生成logo接口返回) 必填
"first_color"
:
"(118,163,255)"
,
//主颜色RGB
...
...
@@ -215,22 +215,22 @@
"id"
:
178
,
"uapp_id"
:
22
,
"channelUserId"
:
"13075556693"
,
"collectContent"
:{
"title"
:
"周杰伦"
,
"logo_id"
:
"4365"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202005060211166237.png"
,
"itemCode"
:
"znlogosjcp"
,
"subtitle"
:
"baby"
,
"sec_color"
:
"(0,0,0)"
,
"profession"
:
"通讯行业"
,
"description"
:
"有公司的地方就有公司宝"
,
"first_color"
:
"(118,163,255)"
,
"font_description"
:
""
周杰伦
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
"color_description"
:
"淡蓝色象征着清新,淡雅"
"collectContent"
:{
//logo信息
"title"
:
"周杰伦"
,
//品牌名称
"logo_id"
:
"4365"
,
//品牌id
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202005060211166237.png"
,
//品牌图片
"itemCode"
:
"znlogosjcp"
,
//产品码
"subtitle"
:
"baby"
,
//品牌标语
"sec_color"
:
"(0,0,0)"
,
//配色
"profession"
:
"通讯行业"
,
//行业名称
"description"
:
"有公司的地方就有公司宝"
,
//品牌描述
"first_color"
:
"(118,163,255)"
,
//主色
"font_description"
:
""
周杰伦
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
//字体描述
"color_description"
:
"淡蓝色象征着清新,淡雅"
//颜色描述
}
}
],
"dataCount"
:
1
,
"dataCount"
:
1
,
//总条数
"requestId"
:
"f6a6d59e9beb41f49fb71a5c4b6ef7d6"
}
...
...
@@ -249,8 +249,8 @@
{
"actionType"
:
"getPaidLogoListByUser"
,
"actionBody"
:{
"pageSize"
:
20
,
"pageIndex"
:
1
"pageSize"
:
20
,
//每页条数
"pageIndex"
:
1
//页码
}
}
```
...
...
@@ -263,24 +263,24 @@
"data"
:[
{
"id"
:
271
,
"orderNo"
:
"LOGO2220200506151119"
,
"sourceOrderNo"
:
"LOGO2220200506151119"
,
"deliveryContent"
:{
"title"
:
"周杰伦"
,
"logo_id"
:
"4365"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202004282246057578.png"
,
"itemCode"
:
"znlogosjcp"
,
"subtitle"
:
"baby"
,
"sec_color"
:
"(0,0,0)"
,
"description"
:
"有公司的地方就有公司宝"
,
"first_color"
:
"(118,163,255)"
,
"font_description"
:
""
周杰伦
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
"color_description"
:
"淡蓝色象征着清新,淡雅"
"orderNo"
:
"LOGO2220200506151119"
,
//订单号
"sourceOrderNo"
:
"LOGO2220200506151119"
,
//订单号
"deliveryContent"
:{
//logo信息
"title"
:
"周杰伦"
,
//品牌名称
"logo_id"
:
"4365"
,
//logoid
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_202004282246057578.png"
,
//logo图片
"itemCode"
:
"znlogosjcp"
,
//产品码
"subtitle"
:
"baby"
,
//品牌标语
"sec_color"
:
"(0,0,0)"
,
//配色RGB
"description"
:
"有公司的地方就有公司宝"
,
//品牌描述
"first_color"
:
"(118,163,255)"
,
//主颜色
"font_description"
:
""
周杰伦
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
//字体描述
"color_description"
:
"淡蓝色象征着清新,淡雅"
//颜色描述
},
"itemCode"
:
"znlogosjcp"
"itemCode"
:
"znlogosjcp"
//产品码
}
],
"dataCount"
:
1
,
"dataCount"
:
1
,
//总条数
"requestId"
:
"8c80fd1172064c2c93530c404732de28"
}
...
...
@@ -328,7 +328,7 @@
{
"actionType"
:
"cancelCollectLogo"
,
"actionBody"
:{
"id"
:
"302"
//收藏id
"id"
:
"302"
//收藏
logo
id
}
}
```
...
...
@@ -360,7 +360,7 @@
"title"
:
"庄冰"
,
//品牌名称 必填
"subtitle"
:
"bing"
,
//品牌标语 非必填
"profession"
:
"通信行业"
,
//行业 必填
"description"
:
""
//简介
"description"
:
""
//简介
非必填
}
}
```
...
...
@@ -373,14 +373,14 @@
"total"
:
10
,
"data"
:[
{
"id"
:
5936
,
"title"
:
"庄冰"
,
"subtitle"
:
"bing"
,
"first_color"
:
"(4,18,5)"
,
"sec_color"
:
"(0,0,0)"
,
"color_description"
:
"基础百搭的庄重黑色,象征专业,前卫,严正。"
,
"font_description"
:
""
庄冰
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_20200507043158756.png"
"id"
:
5936
,
//生成的LOGOid
"title"
:
"庄冰"
,
//品牌名称
"subtitle"
:
"bing"
,
//品牌标语
"first_color"
:
"(4,18,5)"
,
//主颜色RGB
"sec_color"
:
"(0,0,0)"
,
//配色RGB
"color_description"
:
"基础百搭的庄重黑色,象征专业,前卫,严正。"
,
//对主颜色的描述
"font_description"
:
""
庄冰
"选用"
庞门正道粗书体
"字体,字体结构严谨,笔画端正,却又带着书法韵味,利用笔锋破型,打破拘谨。"
,
//对字体的描述
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com/generator_20200507043158756.png"
//生成logo的url
},
{
"id"
:
5928
,
...
...
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
View file @
b3eaa8e5
...
...
@@ -273,7 +273,9 @@
#### 渠道执行的类型 actionType:getOssConfig
```
javascript
{}
{
"bucket"
:
"gsb-zc"
// N 桶的名称
}
```
...
...
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