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
4f16dc31
Commit
4f16dc31
authored
Sep 29, 2019
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix teacher
parent
fa812e82
Pipeline
#14435
passed with stage
in 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
test.js
app/controller/common/test.js
+1
-1
institution.js
app/service/course/institution.js
+3
-3
config.local.js
config/config.local.js
+1
-1
No files found.
app/controller/common/test.js
View file @
4f16dc31
...
...
@@ -6,7 +6,7 @@ class TestController extends Controller {
const
{
service
,
ctx
}
=
this
;
const
from
=
{
lng
:
120.069206
,
lat
:
30.291121
};
const
to
=
{
lng
:
120.212997
,
lat
:
30.29133
};
const
ret
=
await
service
.
course
.
lbs
.
getLBSDistance
(
'
driving'
,
from
,
[
to
]);
const
ret
=
await
service
.
course
.
lbs
.
getLBSDistance
(
'
walking'
,
from
,
[
to
,
to
]);
ctx
.
success
(
ret
);
}
}
...
...
app/service/course/institution.js
View file @
4f16dc31
...
...
@@ -74,7 +74,7 @@ class InstitutionService extends Service {
const
institution_images
=
await
ctx
.
classModel
.
CourseImages
.
all
({
where
:
{
type
:
1
,
type_id
:
institution_id
}
});
//图片
//处理详情页信息
const
current_area
=
await
ctx
.
classModel
.
CourseArea
.
one
({
id
:
area_id
});
const
current_area
=
await
ctx
.
classModel
.
CourseArea
.
one
({
where
:{
id
:
area_id
}
});
let
institution_detail
=
await
this
.
formatInstitutions
([
institution
]);
institution_detail
=
institution_detail
[
0
];
institution_detail
.
address
=
current_area
.
address
;
...
...
@@ -179,8 +179,8 @@ class InstitutionService extends Service {
const
teachers
=
await
ctx
.
classModel
.
CourseTeacher
.
list
({
attributes
,
page
,
limit
,
where
});
const
ret
=
[];
for
(
let
i
in
teachers
)
{
const
teacher
=
teachers
[
i
];
for
(
let
i
in
teachers
.
rows
)
{
const
teacher
=
teachers
.
rows
[
i
];
ret
.
push
({
id
:
teacher
.
id
,
institution_id
:
teacher
.
institution_id
,
...
...
config/config.local.js
View file @
4f16dc31
...
...
@@ -103,7 +103,7 @@ module.exports = appInfo => {
// other sequelize configurations
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'class_
dev
'
,
database
:
'class_
uat
'
,
username
:
'class_testing'
,
password
:
'WV862L32451I6KD58tU9K'
,
port
:
3306
,
...
...
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