Merge branch 'dev_aliyun' into dev_chen

PCqiandao
cxt 5 years ago
commit 93cf97c4a3

3
.gitignore vendored

@ -7,6 +7,7 @@
# Ignore bundler config. # Ignore bundler config.
/.bundle /.bundle
/bundle /bundle
/node_modules
# Ignore lock config file # Ignore lock config file
*.lock *.lock
@ -46,6 +47,8 @@
/public/h5build /public/h5build
/public/npm-debug.log /public/npm-debug.log
/dist
# avatars # avatars
/public/images/avatars /public/images/avatars

@ -367,9 +367,9 @@ class FilesController < ApplicationController
@category_name = category.try(:module_name) @category_name = category.try(:module_name)
else else
@category = CourseSecondCategory.find category_id @category = CourseSecondCategory.find category_id
@category_id = category.try(:id) @category_id = @category.try(:id)
@category_name = category.try(:name) @category_name = @category.try(:name)
@parent_category_id = category&.parent_id.to_i @parent_category_id = @category&.parent_id.to_i
end end
end end

@ -43,7 +43,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
let isSeeking = false let isSeeking = false
let pos = []// let pos = []//
const log = useCallback((callback) => { const log = useCallback((callback, isEnd = false) => {
let params = {} let params = {}
if (logId) { if (logId) {
params['log_id'] = logId params['log_id'] = logId
@ -59,6 +59,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
params['duration'] = totalDuration params['duration'] = totalDuration
params['device'] = device params['device'] = device
} }
if (isEnd) {
params['ed'] = "1"
}
async function getLogId() { async function getLogId() {
isLoging = true isLoging = true
let id = await logWatchHistory(params) let id = await logWatchHistory(params)
@ -119,7 +122,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
isLoging = false isLoging = false
isSeeking = false isSeeking = false
pos = [] pos = []
}) }, true)
} }
function onTimeupdate() { function onTimeupdate() {

Loading…
Cancel
Save