Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yysh5
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data_server
yysh5
Commits
c97a05d6
Commit
c97a05d6
authored
Apr 22, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yys
parent
274a9930
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
21 deletions
+23
-21
order.js
app/controller/order.js
+2
-2
scripts.js
app/service/scripts.js
+4
-2
storage.js
app/service/storage.js
+3
-3
config.local.js
config/config.local.js
+7
-7
config.prod.js
config/config.prod.js
+7
-7
No files found.
app/controller/order.js
View file @
c97a05d6
...
...
@@ -65,13 +65,13 @@ class OrderController extends Controller {
async
create
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
createRule
);
cons
t
{
appKey
,
userId
,
notifyUrl
,
backUrl
,
orderId
,
phone
,
netMark
}
=
ctx
.
request
.
body
;
le
t
{
appKey
,
userId
,
notifyUrl
,
backUrl
,
orderId
,
phone
,
netMark
}
=
ctx
.
request
.
body
;
const
appKeyInfo
=
await
service
.
partner
.
fetchInfo
(
appKey
);
if
(
!
(
appKeyInfo
&&
appKeyInfo
.
valid
===
true
&&
appKeyInfo
.
enableYys
===
true
))
{
return
ctx
.
fail
(
'未开通此服务'
);
}
if
(
netMark
!==
1
)
{
netMark
=
==
0
;
netMark
=
0
;
}
const
areaInfo
=
await
service
.
task
.
phoneArea
(
phone
);
const
object
=
{
...
...
app/service/scripts.js
View file @
c97a05d6
...
...
@@ -146,8 +146,10 @@ class ScriptsService extends Service {
contentType
:
'json'
,
});
ctx
.
logger
.
info
(
`fetchScriptByCityName,
${
baseURL
+
fetchScriptByCityNameUrl
+
'?name='
+
name
}
`
,
'result:'
,
JSON
.
stringify
(
result
.
data
));
return
result
.
data
;
if
(
result
.
stauts
===
200
)
{
return
result
.
data
.
scriptId
;
}
ctx
.
throw
(
400
,
'手机号码区域验证失败'
);
}
async
fetchScriptName
(
scriptId
)
{
...
...
app/service/storage.js
View file @
c97a05d6
...
...
@@ -43,7 +43,7 @@ class StorageService extends Service {
}
async
read
(
orderId
,
appKey
)
{
const
{
readUrl
,
readDataKey
,
ctx
}
=
this
;
const
{
readUrl
,
ctx
}
=
this
;
const
result
=
await
this
.
_request
(
`
${
readUrl
}
/
${
orderId
}
`
,
{
method
:
'get'
,
contentType
:
'json'
,
...
...
@@ -57,9 +57,9 @@ class StorageService extends Service {
await
ctx
.
model
.
Cusdata
.
create
({
appKey
,
orderId
,
type
:
'
gjj
'
,
type
:
'
yys
'
,
});
return
result
.
data
.
data
[
readDataKey
]
;
return
result
.
data
.
data
;
}
}
...
...
config/config.local.js
View file @
c97a05d6
...
...
@@ -54,13 +54,13 @@ module.exports = () => {
alhost
:
'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel='
,
};
//
config.storageAPI = {
//
host: 'http://tv.51gjj.com:11252',
//
writeUrl: '/data',
// readUrl: '/gjj
',
// writeType: 'gjj
',
// readDataKey: 'gjj
Data',
//
};
config
.
storageAPI
=
{
host
:
'http://tv.51gjj.com:11252'
,
writeUrl
:
'/data'
,
readUrl
:
'/order
'
,
writeType
:
'thxd
'
,
readDataKey
:
'thxd
Data'
,
};
config
.
washAPI
=
{
host
:
'http://t.51gjj.com:3007'
,
...
...
config/config.prod.js
View file @
c97a05d6
...
...
@@ -45,13 +45,13 @@ module.exports = () => {
alhost
:
'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel='
,
};
//
config.storageAPI = {
//
host: process.env.STORAGEAPI_HOST || 'http://tv.51gjj.com:11252',
//
writeUrl: '/data',
// readUrl: '/gjj
',
// writeType: 'gjj
',
// readDataKey: 'gjj
Data',
//
};
config
.
storageAPI
=
{
host
:
process
.
env
.
STORAGEAPI_HOST
||
'http://tv.51gjj.com:11252'
,
writeUrl
:
'/data'
,
readUrl
:
'/order
'
,
writeType
:
'order
'
,
readDataKey
:
'thxd
Data'
,
};
config
.
washAPI
=
{
host
:
process
.
env
.
WASHAPI_HOST
||
'http://t.51gjj.com:3007'
,
...
...
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