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
3576ff32
Commit
3576ff32
authored
Sep 24, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into center-manage
parents
cc79359e
7589c3d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
center-manage/app/base/service/impl/product/productpriceSve.js
+4
-1
center-manage/app/config/routes/api.js
+2
-1
center-manage/app/config/routes/web.js
+17
-16
No files found.
center-manage/app/base/service/impl/product/productpriceSve.js
View file @
3576ff32
...
...
@@ -91,6 +91,9 @@ class ProductpriceService extends ServiceBase {
return
false
}
})
if
([
"北京市"
,
"天津市"
,
"上海市"
,
"重庆市"
].
includes
(
area
))
{
areaCode
[
0
].
code
=
`
${
areaCode
[
0
].
code
}
01`
}
areaCode
=
`
${
areaCode
[
0
].
code
}
00`
;
result
.
push
({
area
,
...
...
@@ -109,7 +112,7 @@ class ProductpriceService extends ServiceBase {
return
item
.
area
.
indexOf
(
region
)
>=
0
})
}
return
result
return
result
||
[]
}
async
updownProduct
(
uid
)
{
let
p
=
await
this
.
dao
.
findById
(
uid
)
...
...
center-manage/app/config/routes/api.js
View file @
3576ff32
...
...
@@ -90,7 +90,8 @@ module.exports = function (app) {
p
=
invokeObj
[
"doexec"
].
apply
(
invokeObj
,
params
);
}
p
.
then
(
r
=>
{
res
.
end
(
JSON
.
stringify
(
r
));
// res.end(JSON.stringify(r));
res
.
json
(
r
);
});
});
};
center-manage/app/config/routes/web.js
View file @
3576ff32
var
url
=
require
(
"url"
);
var
system
=
require
(
"../../base/system"
);
var
metaCtl
=
system
.
getObject
(
"web.common.metaCtl"
);
var
metaCtl
=
system
.
getObject
(
"web.common.metaCtl"
);
module
.
exports
=
function
(
app
)
{
app
.
get
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
classPath
=
gname
+
"."
+
classPath
;
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
classPath
=
gname
+
"."
+
classPath
;
var
params
=
[];
params
.
push
(
methodName
);
params
.
push
(
methodName
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
var
p
=
null
;
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
if
(
invokeObj
[
"doexec"
])
{
...
...
@@ -24,25 +24,26 @@ module.exports = function (app) {
app
.
post
(
'/web/:gname/:qname/:method'
,
function
(
req
,
res
)
{
req
.
codepath
=
req
.
headers
[
"codepath"
];
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
var
params
=
[];
classPath
=
gname
+
"."
+
classPath
;
var
methodName
=
req
.
params
[
"method"
];
var
gname
=
req
.
params
[
"gname"
];
var
params
=
[];
classPath
=
gname
+
"."
+
classPath
;
var
tClientIp
=
system
.
get_client_ip
(
req
);
req
.
body
.
clientIp
=
tClientIp
;
req
.
body
.
agent
=
req
.
headers
[
"user-agent"
];
req
.
body
.
classname
=
classPath
;
req
.
body
.
agent
=
req
.
headers
[
"user-agent"
];
req
.
body
.
classname
=
classPath
;
params
.
push
(
methodName
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
var
p
=
null
;
var
invokeObj
=
system
.
getObject
(
"web."
+
classPath
);
if
(
invokeObj
[
"doexec"
])
{
p
=
invokeObj
[
"doexec"
].
apply
(
invokeObj
,
params
);
}
p
.
then
(
r
=>
{
res
.
end
(
JSON
.
stringify
(
r
));
// res.end(JSON.stringify(r));
res
.
json
(
r
);
});
});
};
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