Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
28baa87a
Commit
28baa87a
authored
Aug 06, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix del the loginauth
parent
37a56547
Pipeline
#11881
passed with stage
in 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
house.js
app/router/house.js
+2
-2
house_analysis.js
app/service/house/v2/house_analysis.js
+5
-1
No files found.
app/router/house.js
View file @
28baa87a
...
@@ -4,7 +4,7 @@ module.exports = app => {
...
@@ -4,7 +4,7 @@ module.exports = app => {
const
router
=
app
.
router
.
namespace
(
app
.
config
.
projectRootPath
+
'/house'
);
const
router
=
app
.
router
.
namespace
(
app
.
config
.
projectRootPath
+
'/house'
);
const
loginAuth
=
app
.
middleware
.
loginAuth
({
type
:
'new'
});
//登录中间件
const
loginAuth
=
app
.
middleware
.
loginAuth
({
type
:
'new'
});
//登录中间件
router
.
get
(
'/tool/:house_style/:area_code/:level'
,
'house.tool.getMapPoint'
);
//购房计划地图点位
router
.
get
(
'/tool/:house_style/:area_code/:level'
,
'house.tool.getMapPoint'
);
//购房计划地图点位
router
.
post
(
'/tool/plan'
,
'house.tool.generateBuyHousePlan'
);
//生成购房计划
router
.
post
(
'/tool/plan'
,
'house.tool.generateBuyHousePlan'
);
//生成购房计划
router
.
get
(
'/tool/:type/:area_code'
,
'house.tool.getHousePriceFeature'
);
//房价指数 房价涨跌 购房资格、贷款额度问答
router
.
get
(
'/tool/:type/:area_code'
,
'house.tool.getHousePriceFeature'
);
//房价指数 房价涨跌 购房资格、贷款额度问答
...
@@ -108,7 +108,7 @@ module.exports = app => {
...
@@ -108,7 +108,7 @@ module.exports = app => {
router
.
get
(
'/v2/house_analysis/info/:house_analysis_id'
,
'house.v2.houseAnalysis.getHouseAnalysisInfo'
);
//户型解析列表
router
.
get
(
'/v2/house_analysis/info/:house_analysis_id'
,
'house.v2.houseAnalysis.getHouseAnalysisInfo'
);
//户型解析列表
router
.
post
(
'/v2/house_analysis/'
,
loginAuth
,
'house.v2.houseAnalysis.uploadHouseAnalysis'
);
//上传户型信息
router
.
post
(
'/v2/house_analysis/'
,
loginAuth
,
'house.v2.houseAnalysis.uploadHouseAnalysis'
);
//上传户型信息
// router.post('/v2.1/house_analysis/', loginAuth, 'house.v2.houseAnalysis.uploadHouseAnalysis_2_1');//上传户型信息
// router.post('/v2.1/house_analysis/', loginAuth, 'house.v2.houseAnalysis.uploadHouseAnalysis_2_1');//上传户型信息
router
.
get
(
'/v2/house_analysis/mine'
,
loginAuth
,
'house.v2.houseAnalysis.getUserHouseAnalysis'
);
//我的户型
router
.
get
(
'/v2/house_analysis/mine'
,
'house.v2.houseAnalysis.getUserHouseAnalysis'
);
//我的户型
router
.
get
(
'/v2/house_analysis/city_list'
,
'house.v2.houseAnalysis.getHouseAnalysisSupportCity'
);
//上传户型解析的城市列表
router
.
get
(
'/v2/house_analysis/city_list'
,
'house.v2.houseAnalysis.getHouseAnalysisSupportCity'
);
//上传户型解析的城市列表
//提问
//提问
...
...
app/service/house/v2/house_analysis.js
View file @
28baa87a
...
@@ -100,7 +100,11 @@ class HouseAnalysisService extends Service {
...
@@ -100,7 +100,11 @@ class HouseAnalysisService extends Service {
const
user_id
=
ctx
.
userId
;
const
user_id
=
ctx
.
userId
;
const
app_type_id
=
ctx
.
appTypeId
;
const
app_type_id
=
ctx
.
appTypeId
;
if
(
!
user_id
||
!
app_type_id
)
{
if
(
!
user_id
||
!
app_type_id
)
{
ctx
.
failed
(
'login error'
);
// ctx.failed('login error');
//20190806未登录返回空
return
{
rows
:
[]
}
}
}
const
results
=
await
ctx
.
realestateModel
.
HouseAnalysis
.
list
({
page
:
page
,
limit
:
Number
(
limit
),
where
:
{
user_id
:
user_id
,
app_type_id
:
app_type_id
},
order
:
[[
'id'
,
'desc'
]]
});
const
results
=
await
ctx
.
realestateModel
.
HouseAnalysis
.
list
({
page
:
page
,
limit
:
Number
(
limit
),
where
:
{
user_id
:
user_id
,
app_type_id
:
app_type_id
},
order
:
[[
'id'
,
'desc'
]]
});
return
results
;
return
results
;
...
...
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