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
1a562059
Commit
1a562059
authored
Nov 13, 2019
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add course
parent
dd401208
Pipeline
#16297
passed with stage
in 46 seconds
Changes
12
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
293 additions
and
115 deletions
+293
-115
institutionSub.js
app/controller/course/institutionSub.js
+99
-0
courseStudentVideo.js
app/model/class/courseStudentVideo.js
+46
-0
course_cat.js
app/model/class/course_cat.js
+26
-27
course_images.js
app/model/class/course_images.js
+23
-21
course_institution_to_cat.js
app/model/class/course_institution_to_cat.js
+4
-4
course_log_user_gps.js
app/model/class/course_log_user_gps.js
+4
-4
course_user.js
app/model/class/course_user.js
+25
-25
course_user_baby.js
app/model/class/course_user_baby.js
+25
-25
course_user_collection.js
app/model/class/course_user_collection.js
+4
-4
course.js
app/router/course.js
+32
-0
institutionSub.js
app/service/course/institutionSub.js
+0
-0
config.local.js
config/config.local.js
+5
-5
No files found.
app/controller/course/institutionSub.js
0 → 100644
View file @
1a562059
'use strict'
;
const
Controller
=
require
(
'egg'
).
Controller
;
class
InstitutionSubController
extends
Controller
{
/**
* 机构列表
*/
async
institutionList
()
{
const
{
ctx
}
=
this
;
const
input_params
=
ctx
.
request
.
body
;
const
results
=
await
ctx
.
service
.
course
.
institutionSub
.
getInstitutions
(
input_params
);
ctx
.
success
({
results
});
}
/**
* 机构详情
*/
async
institutionInfo
()
{
const
{
ctx
}
=
this
;
let
input_params
=
ctx
.
params
;
const
query
=
ctx
.
query
;
input_params
=
Object
.
assign
(
input_params
,
query
);
const
result
=
await
ctx
.
service
.
course
.
institutionSub
.
getInstitution
(
input_params
);
ctx
.
success
({
result
});
}
/**
* 课程列表
*/
async
classList
()
{
const
{
ctx
}
=
this
;
const
input_params
=
ctx
.
request
.
body
;
const
results
=
await
ctx
.
service
.
course
.
institutionSub
.
getClasses
(
input_params
);
ctx
.
success
({
results
});
}
/**
* 课程详情
*/
async
classInfo
()
{
const
{
ctx
}
=
this
;
const
class_id
=
ctx
.
params
.
class_id
;
if
(
!
class_id
)
{
ctx
.
failed
(
'error class_id'
);
}
const
ret
=
await
ctx
.
service
.
course
.
institutionSub
.
getClass
(
class_id
);
ctx
.
success
(
ret
);
}
/**
* 老师列表
*/
async
teacherList
()
{
const
{
ctx
}
=
this
;
const
input_params
=
ctx
.
request
.
body
;
const
ret
=
await
ctx
.
service
.
course
.
institutionSub
.
getTeachers
(
input_params
);
ctx
.
success
(
ret
);
}
/**
* 老师详情
*/
async
teacherInfo
()
{
const
{
ctx
}
=
this
;
const
teacher_id
=
ctx
.
params
.
teacher_id
;
if
(
!
teacher_id
)
{
ctx
.
failed
(
'error teacher_id'
);
}
const
ret
=
await
ctx
.
service
.
course
.
institutionSub
.
getTeacher
(
teacher_id
);
ctx
.
success
(
ret
);
}
// 获取分类
async
getCats
()
{
const
{
ctx
}
=
this
;
const
ret
=
await
ctx
.
service
.
course
.
institutionSub
.
getCats
();
ctx
.
success
(
ret
);
}
}
module
.
exports
=
InstitutionSubController
;
app/model/class/courseStudentVideo.js
0 → 100644
View file @
1a562059
'use strict'
;
const
moment
=
require
(
'moment'
);
module
.
exports
=
app
=>
{
const
{
STRING
,
INTEGER
,
DATE
,
DECIMAL
,
TEXT
,
ENUM
}
=
app
.
Sequelize
;
const
CourseStudentVideo
=
app
.
classModel
.
define
(
'course_student_video'
,
{
id
:
{
type
:
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
,
},
institution_id
:
INTEGER
,
video_url
:
STRING
,
title
:
STRING
,
age
:
STRING
,
time
:
STRING
,
sort
:
INTEGER
,
status
:
ENUM
(
'offline'
,
'online'
),
is_deleted
:
INTEGER
,
created_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_time'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_time'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
},
{
timestamps
:
false
,
tableName
:
'course_student_video'
,
});
return
CourseStudentVideo
;
};
app/model/class/course_cat.js
View file @
1a562059
'use strict'
;
'use strict'
;
const
moment
=
require
(
'moment'
);
...
...
@@ -10,30 +10,29 @@ module.exports = app => {
id
:
{
type
:
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
,
},
first_id
:
INTEGER
,
parent_id
:
INTEGER
,
level
:
INTEGER
,
name
:
STRING
,
image
:
STRING
,
color
:
STRING
,
tips
:
STRING
,
status
:
ENUM
(
'offline'
,
'online'
),
is_deleted
:
INTEGER
,
created_at
:
{
sort
:
INTEGER
,
created_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_at
'
);
const
date
=
this
.
getDataValue
(
'created_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_at
:
{
updated_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_at
'
);
const
date
=
this
.
getDataValue
(
'updated_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
@@ -42,25 +41,25 @@ module.exports = app => {
tableName
:
'course_cat'
,
});
CourseCat
.
one
=
async
(
data
)
=>
{
CourseCat
.
one
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
CourseCat
.
findOne
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
});
}
};
CourseCat
.
all
=
async
(
data
)
=>
{
CourseCat
.
all
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
order
=
data
.
order
?
data
.
order
:
[];
return
await
CourseCat
.
findAll
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
order
,
});
}
};
CourseCat
.
list
=
async
(
data
=
{})
=>
{
const
limit
=
data
.
limit
?
Number
(
data
.
limit
)
:
10
;
...
...
@@ -71,35 +70,35 @@ module.exports = app => {
const
condition
=
{
offset
:
(
page
-
1
)
*
limit
,
limit
,
where
:
where
,
order
:
order
,
attributes
:
attributes
,
where
,
order
,
attributes
,
};
const
{
count
,
rows
}
=
await
CourseCat
.
findAndCountAll
(
condition
);
return
{
page
,
count
,
rows
};
}
};
CourseCat
.
add
=
async
(
data
)
=>
{
CourseCat
.
add
=
async
data
=>
{
try
{
//返回promise对象实力 instance
// 返回promise对象实力 instance
const
res
=
await
CourseCat
.
create
(
data
);
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
return
res
.
id
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
CourseCat
.
edit
=
async
(
data
)
=>
{
CourseCat
.
edit
=
async
data
=>
{
const
where
=
data
.
where
;
const
params
=
data
.
params
;
try
{
const
res
=
await
CourseCat
.
update
(
params
,
{
where
:
where
})
const
res
=
await
CourseCat
.
update
(
params
,
{
where
});
return
res
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
return
CourseCat
;
...
...
app/model/class/course_images.js
View file @
1a562059
'use strict'
;
'use strict'
;
const
moment
=
require
(
'moment'
);
...
...
@@ -11,7 +11,7 @@ module.exports = app => {
id
:
{
type
:
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
,
},
type
:
INTEGER
,
type_id
:
INTEGER
,
...
...
@@ -20,6 +20,8 @@ module.exports = app => {
is_cover
:
INTEGER
,
is_video
:
INTEGER
,
sort
:
INTEGER
,
status
:
ENUM
(
'offline'
,
'online'
),
is_deleted
:
INTEGER
,
created_time
:
{
type
:
DATE
,
allowNull
:
true
,
...
...
@@ -33,25 +35,25 @@ module.exports = app => {
tableName
:
'course_images'
,
});
CourseImages
.
one
=
async
(
data
)
=>
{
CourseImages
.
one
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
CourseImages
.
findOne
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
});
}
};
CourseImages
.
all
=
async
(
data
)
=>
{
CourseImages
.
all
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
order
=
data
.
order
?
data
.
order
:
[];
return
await
CourseImages
.
findAll
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
order
,
});
}
};
CourseImages
.
list
=
async
(
data
=
{})
=>
{
const
limit
=
data
.
limit
?
Number
(
data
.
limit
)
:
10
;
...
...
@@ -62,35 +64,35 @@ module.exports = app => {
const
condition
=
{
offset
:
(
page
-
1
)
*
limit
,
limit
,
where
:
where
,
order
:
order
,
attributes
:
attributes
,
where
,
order
,
attributes
,
};
const
{
count
,
rows
}
=
await
CourseImages
.
findAndCountAll
(
condition
);
return
{
page
,
count
,
rows
};
}
};
CourseImages
.
add
=
async
(
data
)
=>
{
CourseImages
.
add
=
async
data
=>
{
try
{
//返回promise对象实力 instance
// 返回promise对象实力 instance
const
res
=
await
CourseImages
.
create
(
data
);
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
return
res
.
id
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
CourseImages
.
edit
=
async
(
data
)
=>
{
CourseImages
.
edit
=
async
data
=>
{
const
where
=
data
.
where
;
const
params
=
data
.
params
;
try
{
const
res
=
await
CourseImages
.
update
(
params
,
{
where
:
where
})
const
res
=
await
CourseImages
.
update
(
params
,
{
where
});
return
res
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
return
CourseImages
;
...
...
app/model/class/course_institution_to_cat.js
View file @
1a562059
...
...
@@ -16,19 +16,19 @@ module.exports = app => {
cat_id
:
INTEGER
,
status
:
ENUM
(
'offline'
,
'online'
),
is_deleted
:
INTEGER
,
created_
at
:
{
created_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_
at
'
);
const
date
=
this
.
getDataValue
(
'created_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_
at
:
{
updated_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_
at
'
);
const
date
=
this
.
getDataValue
(
'updated_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
app/model/class/course_log_user_gps.js
View file @
1a562059
...
...
@@ -17,19 +17,19 @@ module.exports = app => {
lat
:
DECIMAL
,
lng
:
DECIMAL
,
is_deleted
:
INTEGER
,
created_
at
:
{
created_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_
at
'
);
const
date
=
this
.
getDataValue
(
'created_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_
at
:
{
updated_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_
at
'
);
const
date
=
this
.
getDataValue
(
'updated_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
app/model/class/course_user.js
View file @
1a562059
'use strict'
;
'use strict'
;
const
moment
=
require
(
'moment'
);
...
...
@@ -10,7 +10,7 @@ module.exports = app => {
id
:
{
type
:
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
,
},
uuid
:
STRING
,
app_id
:
STRING
,
...
...
@@ -23,19 +23,19 @@ module.exports = app => {
sex
:
STRING
,
openid
:
STRING
,
is_deleted
:
INTEGER
,
created_at
:
{
created_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_at
'
);
const
date
=
this
.
getDataValue
(
'created_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_at
:
{
updated_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_at
'
);
const
date
=
this
.
getDataValue
(
'updated_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
@@ -44,25 +44,25 @@ module.exports = app => {
tableName
:
'course_user'
,
});
CourseUser
.
one
=
async
(
data
)
=>
{
CourseUser
.
one
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
CourseUser
.
findOne
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
});
}
};
CourseUser
.
all
=
async
(
data
)
=>
{
CourseUser
.
all
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
order
=
data
.
order
?
data
.
order
:
[];
return
await
CourseUser
.
findAll
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
order
,
});
}
};
CourseUser
.
list
=
async
(
data
=
{})
=>
{
const
limit
=
data
.
limit
?
Number
(
data
.
limit
)
:
10
;
...
...
@@ -73,35 +73,35 @@ module.exports = app => {
const
condition
=
{
offset
:
(
page
-
1
)
*
limit
,
limit
,
where
:
where
,
order
:
order
,
attributes
:
attributes
,
where
,
order
,
attributes
,
};
const
{
count
,
rows
}
=
await
CourseUser
.
findAndCountAll
(
condition
);
return
{
page
,
count
,
rows
};
}
};
CourseUser
.
add
=
async
(
data
)
=>
{
CourseUser
.
add
=
async
data
=>
{
try
{
//返回promise对象实力 instance
// 返回promise对象实力 instance
const
res
=
await
CourseUser
.
create
(
data
);
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
return
res
.
id
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
CourseUser
.
edit
=
async
(
data
)
=>
{
CourseUser
.
edit
=
async
data
=>
{
const
where
=
data
.
where
;
const
params
=
data
.
params
;
try
{
const
res
=
await
CourseUser
.
update
(
params
,
{
where
:
where
})
const
res
=
await
CourseUser
.
update
(
params
,
{
where
});
return
res
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
return
CourseUser
;
...
...
app/model/class/course_user_baby.js
View file @
1a562059
'use strict'
;
'use strict'
;
const
moment
=
require
(
'moment'
);
...
...
@@ -10,7 +10,7 @@ module.exports = app => {
id
:
{
type
:
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
autoIncrement
:
true
,
},
user_uuid
:
STRING
,
gender
:
ENUM
(
'boy'
,
'girl'
),
...
...
@@ -19,19 +19,19 @@ module.exports = app => {
lat
:
DECIMAL
,
lng
:
DECIMAL
,
is_deleted
:
INTEGER
,
created_at
:
{
created_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_at
'
);
const
date
=
this
.
getDataValue
(
'created_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_at
:
{
updated_time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_at
'
);
const
date
=
this
.
getDataValue
(
'updated_time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
@@ -40,25 +40,25 @@ module.exports = app => {
tableName
:
'course_user_baby'
,
});
CourseUserBaby
.
one
=
async
(
data
)
=>
{
CourseUserBaby
.
one
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
CourseUserBaby
.
findOne
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
});
}
};
CourseUserBaby
.
all
=
async
(
data
)
=>
{
CourseUserBaby
.
all
=
async
data
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
order
=
data
.
order
?
data
.
order
:
[];
return
await
CourseUserBaby
.
findAll
({
attributes
:
attributes
,
where
:
where
,
attributes
,
where
,
order
,
});
}
};
CourseUserBaby
.
list
=
async
(
data
=
{})
=>
{
const
limit
=
data
.
limit
?
Number
(
data
.
limit
)
:
10
;
...
...
@@ -69,35 +69,35 @@ module.exports = app => {
const
condition
=
{
offset
:
(
page
-
1
)
*
limit
,
limit
,
where
:
where
,
order
:
order
,
attributes
:
attributes
,
where
,
order
,
attributes
,
};
const
{
count
,
rows
}
=
await
CourseUserBaby
.
findAndCountAll
(
condition
);
return
{
page
,
count
,
rows
};
}
};
CourseUserBaby
.
add
=
async
(
data
)
=>
{
CourseUserBaby
.
add
=
async
data
=>
{
try
{
//返回promise对象实力 instance
// 返回promise对象实力 instance
const
res
=
await
CourseUserBaby
.
create
(
data
);
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
//
从promise 实例中中获得需要的id号,id 必须是自增长,而且必须主键,否则返回null
return
res
.
id
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
CourseUserBaby
.
edit
=
async
(
data
)
=>
{
CourseUserBaby
.
edit
=
async
data
=>
{
const
where
=
data
.
where
;
const
params
=
data
.
params
;
try
{
const
res
=
await
CourseUserBaby
.
update
(
params
,
{
where
:
where
})
const
res
=
await
CourseUserBaby
.
update
(
params
,
{
where
});
return
res
;
}
catch
(
error
)
{
throw
(
error
);
}
}
};
return
CourseUserBaby
;
...
...
app/model/class/course_user_collection.js
View file @
1a562059
...
...
@@ -15,19 +15,19 @@ module.exports = app => {
user_uuid
:
STRING
,
institution_id
:
INTEGER
,
is_deleted
:
INTEGER
,
created_
at
:
{
created_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_
at
'
);
const
date
=
this
.
getDataValue
(
'created_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
updated_
at
:
{
updated_
time
:
{
type
:
DATE
,
allowNull
:
true
,
get
()
{
const
date
=
this
.
getDataValue
(
'updated_
at
'
);
const
date
=
this
.
getDataValue
(
'updated_
time
'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
},
...
...
app/router/course.js
View file @
1a562059
...
...
@@ -31,4 +31,36 @@ module.exports = app => {
router
.
get
(
'third'
,
'/wechat/callbackAction'
,
'course.wechat.check'
);
router
.
post
(
'third'
,
'/wechat/callbackAction'
,
'course.wechat.callbackAction'
);
router
.
post
(
'third'
,
'/wechat/test'
,
'course.wechat.test'
);
// 版本二
router
.
get
(
'third'
,
'/sub/cats'
,
'course.institutionSub.getCats'
);
// 分类
router
.
get
(
'third'
,
'/sub/options'
,
'course.option.getOptions'
);
// 筛选项
router
.
post
(
'third'
,
'/sub/address'
,
miniAuth
,
'course.location.getAddress'
);
// 根据经纬度或ip获取地理位置信息
router
.
post
(
'third'
,
'/sub/institutions'
,
miniAuth
,
'course.institutionSub.institutionList'
);
// 机构列表
router
.
get
(
'third'
,
'/sub/institutions'
,
miniAuth
,
'course.institutionSub.institutionList'
);
// 机构列表
router
.
get
(
'third'
,
'/sub/institution/:institution_id'
,
miniAuth
,
'course.institutionSub.institutionInfo'
);
// 机构详情
router
.
post
(
'third'
,
'/sub/classes'
,
miniAuth
,
'course.institution.classList'
);
// 课程列表
router
.
get
(
'third'
,
'/sub/classes'
,
miniAuth
,
'course.institution.classList'
);
// 课程列表
router
.
get
(
'third'
,
'/sub/class/:class_id'
,
miniAuth
,
'course.institution.classInfo'
);
// 课程详情
router
.
post
(
'third'
,
'/sub/teachers'
,
miniAuth
,
'course.institution.teacherList'
);
// 老师列表
router
.
get
(
'third'
,
'/sub/teachers'
,
miniAuth
,
'course.institution.teacherList'
);
// 老师详情
router
.
get
(
'third'
,
'/sub/teacher/:teacher_id'
,
miniAuth
,
'course.institution.teacherInfo'
);
// 老师详情
router
.
post
(
'third'
,
'/sub/user/auth'
,
'course.user.auth'
);
// 微信授权登录
router
.
post
(
'third'
,
'/sub/user/register_user'
,
miniAuth
,
'course.user.registerUserInfo'
);
// 授权后注册用户
router
.
get
(
'third'
,
'/sub/user/baby'
,
miniAuth
,
'course.user.getBabyInfo'
);
// 获取baby信息
router
.
post
(
'third'
,
'/sub/user/baby'
,
miniAuth
,
'course.user.saveBabyInfo'
);
// 保存baby信息
router
.
delete
(
'third'
,
'/sub/user/baby'
,
miniAuth
,
'course.user.delBabyInfo'
);
// 删除baby信息
router
.
get
(
'third'
,
'/sub/user/collection/institution'
,
miniAuth
,
'course.user.getCollectInstitutions'
);
// 收藏的机构列表
router
.
post
(
'third'
,
'/sub/user/collection/institution'
,
miniAuth
,
'course.user.collectInstitution'
);
// 收藏机构
router
.
delete
(
'third'
,
'/sub/user/collection/institution'
,
miniAuth
,
'course.user.delCollectInstitution'
);
// 取消收藏机构
router
.
get
(
'third'
,
'/sub/wechat/callbackAction'
,
'course.wechat.check'
);
router
.
post
(
'third'
,
'/sub/wechat/callbackAction'
,
'course.wechat.callbackAction'
);
router
.
post
(
'third'
,
'/sub/wechat/test'
,
'course.wechat.test'
);
};
app/service/course/institutionSub.js
0 → 100644
View file @
1a562059
This diff is collapsed.
Click to expand it.
config/config.local.js
View file @
1a562059
...
...
@@ -17,7 +17,7 @@ module.exports = appInfo => {
domainWhiteList
:
[],
};
config
.
middleware
=
[
'errorHandler'
,
'deviceLogin'
,
'deviceInit'
,
'responseSet'
];
config
.
middleware
=
[
'errorHandler'
,
'deviceLogin'
,
'deviceInit'
,
'responseSet'
];
config
.
middleware
=
[];
exports
.
multipart
=
{
...
...
@@ -90,7 +90,7 @@ module.exports = appInfo => {
// other sequelize configurations
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'prometheus_
uat
'
,
database
:
'prometheus_
dev
'
,
username
:
'prometheus'
,
password
:
'q9t8Ay4qIUW4sw3s25K28'
,
port
:
3306
,
...
...
@@ -103,7 +103,7 @@ module.exports = appInfo => {
// other sequelize configurations
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'class_
uat
'
,
database
:
'class_
dev
'
,
username
:
'class_testing'
,
password
:
'WV862L32451I6KD58tU9K'
,
port
:
3306
,
...
...
@@ -170,11 +170,11 @@ module.exports = appInfo => {
config
.
TX_LBS_URL
=
'https://apis.map.qq.com/ws'
;
// 地址解析;逆地址解析
//我的信用-通化检测
//
我的信用-通化检测
config
.
YYS_APP_KEY
=
'A86BB96F55B64DCE87A46E919A347993'
;
config
.
YYS_APPLY_APPSECRET
=
'a695e9b3c0f1e3f15fb0b958fd3a4b67'
;
//运营商报告
//
运营商报告
config
.
YYS_REPORT_KEY
=
'F4E0CA710F484CFFB1756741696E29A3'
;
config
.
YYS_REPORT_APPSECRET
=
'233B8E10E31B4C899EE6FEB3AEC22F140B6528BF'
;
config
.
YYS_REPORT_URL
=
'http://47.96.253.64:8049/mycredit/thxdReport'
;
...
...
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