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
359caf3a
Commit
359caf3a
authored
Nov 02, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
6cb7c4d5
5c1d619c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
12 deletions
+127
-12
center-channel/app/base/api/impl/icp/consultation.js
+102
-0
center-channel/app/base/api/impl/nmaction/name.js
+1
-1
center-channel/app/base/service/impl/common/signSve.js
+23
-10
center-channel/app/config/environment.js
+1
-1
No files found.
center-channel/app/base/api/impl/icp/consultation.js
View file @
359caf3a
...
...
@@ -157,6 +157,108 @@ class Consultation extends APIBase {
case
"34"
:
pobj
.
area
=
"海南"
;
break
;
case
"BEIJING"
:
pobj
.
area
=
"北京"
;
break
;
case
"SHANGHAI"
:
pobj
.
area
=
"上海"
;
break
;
case
"FUJIAN"
:
pobj
.
area
=
"福建"
;
break
;
case
"GUANGXI"
:
pobj
.
area
=
"广西"
;
break
;
case
"GUANGDONG"
:
pobj
.
area
=
"广东"
;
break
;
case
"ANHUI"
:
pobj
.
area
=
"安徽"
;
break
;
case
"HENAN"
:
pobj
.
area
=
"河南"
;
break
;
case
"HUBEI"
:
pobj
.
area
=
"湖北"
;
break
;
case
"ZHEJIANG"
:
pobj
.
area
=
"浙江"
;
break
;
case
"JIANGSU"
:
pobj
.
area
=
"江苏"
;
break
;
case
"SHANDONG"
:
pobj
.
area
=
"山东"
;
break
;
case
"SHANGXI_SHAN"
:
pobj
.
area
=
"陕西"
;
break
;
case
"NINGXIA"
:
pobj
.
area
=
"宁夏"
;
break
;
case
"GANSU"
:
pobj
.
area
=
"甘肃"
;
break
;
case
"XINJIANG"
:
pobj
.
area
=
"新疆"
;
break
;
case
"QINGHAI"
:
pobj
.
area
=
"青海"
;
break
;
case
"TIANJIN"
:
pobj
.
area
=
"天津"
;
break
;
case
"CHONGQING"
:
pobj
.
area
=
"重庆"
;
break
;
case
"HEBEI"
:
pobj
.
area
=
"河北"
;
break
;
case
"SHANXI_JIN"
:
pobj
.
area
=
"山西"
;
break
;
case
"LIAONING"
:
pobj
.
area
=
"辽宁"
;
break
;
case
"JINLIN"
:
pobj
.
area
=
"吉林"
;
break
;
case
"HEILONGJIANG"
:
pobj
.
area
=
"黑龙江"
;
break
;
case
"JIANGXI"
:
pobj
.
area
=
"江西"
;
break
;
case
"HUNAN"
:
pobj
.
area
=
"湖南"
;
break
;
case
"SICHUAN"
:
pobj
.
area
=
"四川"
;
break
;
case
"GUIZHOU"
:
pobj
.
area
=
"贵州"
;
break
;
case
"YUNNAN"
:
pobj
.
area
=
"云南"
;
break
;
case
"NEIMENGGU"
:
pobj
.
area
=
"内蒙古"
;
break
;
case
"XIZANG"
:
pobj
.
area
=
"西藏"
;
break
;
case
"HANWAIZI"
:
pobj
.
area
=
"含外资"
;
break
;
case
"QUANWAIZI"
:
pobj
.
area
=
"全外资"
;
break
;
case
"XIANGGANG"
:
pobj
.
area
=
"香港"
;
break
;
case
"HAINAN"
:
pobj
.
area
=
"海南"
;
break
;
default
:
pobj
.
area
=
""
;
break
;
...
...
center-channel/app/base/api/impl/nmaction/name.js
View file @
359caf3a
...
...
@@ -141,7 +141,7 @@ class NameAPI extends WEBBase {
if
(
result
.
status
!=
0
)
{
return
result
;
}
const
tmpData
=
result
.
data
?
result
.
data
.
companyName
:
[];
const
tmpData
=
result
.
data
?
result
.
data
.
companyName
?
result
.
data
.
companyName
:
result
.
data
:
[];
return
system
.
getResultSuccess
(
tmpData
);
}
}
...
...
center-channel/app/base/service/impl/common/signSve.js
View file @
359caf3a
...
...
@@ -5,6 +5,7 @@ class SignService{
constructor
()
{
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
async
restPostUrl
(
pobj
,
url
)
{
try
{
...
...
@@ -20,9 +21,23 @@ class SignService{
}
}
async
getAppInfoByAppKey
(
appkey
){
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
appkey
},
url
);
return
appInfoRt
;
try
{
var
shaStr
=
"getAppInfoByAppKey_"
+
appkey
;
var
cacheRes
=
await
this
.
redisClient
.
get
(
shaStr
);
if
(
cacheRes
)
{
return
JSON
.
parse
(
cacheRes
);
}
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
appkey
},
url
);
if
(
appInfoRt
&&
appInfoRt
.
status
==
0
){
//保存缓存
await
this
.
redisClient
.
setWithEx
(
shaStr
,
JSON
.
stringify
(
appInfoRt
),
3600
);
}
return
appInfoRt
;
}
catch
(
error
)
{
var
errres
=
system
.
getResultFail
(
"获取应用信息失败!"
);
return
errres
;
}
}
/**
* 验证签名
...
...
@@ -88,13 +103,11 @@ class SignService{
module
.
exports
=
SignService
;
// var task = new SignService();
// var obj = {
// "intentionBizId": "zhuangbingceshi008",
// "phone": "13075556693",
// "userName": "庄冰",
// "description": "1111111111111222",
// "area": "1",
// "consultType": 5
// };
// "bizId":"ICP202010221032hhvcUV2",
// "isDirectBuy":"0",
// "orderNo":"ICPO20201022103hhvcUV2"
// ,"sign": "4F598C56E565628107B5A9A851D4B6A4"
// };
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
center-channel/app/config/environment.js
View file @
359caf3a
...
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
req
.
objs
=
system
;
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token
,userpin
'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
res
.
header
(
'content-type'
,
'text/html;charset=UTF-8'
);
...
...
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