提交 0b811f27 authored 作者: 王鹏飞's avatar 王鹏飞

merge..

......@@ -100,20 +100,14 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
},
callback: function (res) {
// 进入视频,开始读取视频时,存储 vid、log_key
wx.setStorageSync({
key: 'video_001',
data: {
vid: vid,
log_key: res.data.log_key || ''
}
})
wx.setStorageSync('video_001', { vid: vid, log_key: res.data.log_key || ''})
let json = {
video: {
src: videoType == 3 ? res.data.video &&res.data.video.SD : res.data.video[0] && res.data.video[0].playurl,
src: res.data.video.SD,
spareSrc: '' // 正式环境时,需要将 contentVideo 中 spareSrc 改成 src
},
audio: {
src: videoType == 3 ? res.data.video &&res.data.video.SQ : res.data.audio[0].url,
src: res.data.video.SQ,
poster: res.data.ppts && res.data.ppts[0] && res.data.ppts[0].ppt_url || ''
},
image: {
......@@ -132,9 +126,10 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
/* 结束时,调用接口 */
const endVideo = () => {
let json = wx.getStorageSync('video_001') || { vid: '', log_key: '' }
if (vid !== '') {
if (json.vid !== '') {
util.requestApi({
url: util.config.URL_PATH1 + '/v2/education/end-aliyun-video-streaming',
method: 'POST',
data: json,
callback: function (res) {}
})
......
......@@ -2,9 +2,13 @@ import * as api from './api/base.js'
App({
store: {
pageshow: false,
user: {} // 用户信息
},
onLaunch: function () {},
onPageNotFound() {
wx.redirectTo({ url: 'pages/login/index' })
},
checkPageshow(callback) {
if (this.store.pageshow) {
callback && callback(true)
......
......@@ -16,9 +16,7 @@
"pages/learnSystem/my/my",
"pages/learnSystem/myScore/myScore",
"pages/learnSystem/myDiscuss/myDiscuss",
"pages/learnSystem/discussDetail/discussDetail",
"pages/videoPlayer/AllBugPages/bugPage1/bugPage1",
"pages/videoPlayer/AllBugPages/test"
"pages/learnSystem/discussDetail/discussDetail"
],
"window": {
"navigationBarBackgroundColor": "#fff",
......
......@@ -3,14 +3,14 @@ const env = 'production'
if (env === 'production') {
module.exports = {
appVersion: 'enterprise_v3.2.0',
appVersion: 'enterprise_v3.2.2',
apiBaseURL: 'https://wechat-api.ezijing.com', // 接口请求地址
tenant: 'classes'
}
} else {
module.exports = {
appVersion: 'enterprise_v3.2.0',
apiBaseURL: 'https://wechat-api.ezijing.com', // 接口请求地址
appVersion: 'enterprise_v3.2.2',
apiBaseURL: 'https://wechat-api2.ezijing.com', // 接口请求地址
tenant: 'classes'
}
}
......@@ -28,7 +28,6 @@ Audio.prototype = {
RATE: ['0.5', '0.8', '1.0', '1.25', '1.5'],
init: function (src, _that) {
let _auCtx = wx.createInnerAudioContext()
wx.setInnerAudioOption({ obeyMuteSwitch: false })
_auCtx.autoplay = false
_auCtx.src = src
/* 使用绑定事件,代替wxml中的事件绑定 */
......
......@@ -179,7 +179,7 @@ Page({
})
// CC视频走这个接口
ChapterApi.getCurrentChapterDetail(vid, videoType, (json) => {
ChapterApi.endVideo()
// ChapterApi.endVideo()
if (!json.is_locked && this.data.status.disable) {
this.setData({ 'status.disable': false })
}
......@@ -217,11 +217,11 @@ Page({
this.isBackend = true
this.pauseVA()
clearInterval(this.heartbeat)
ChapterApi.endVideo()
// ChapterApi.endVideo()
},
onUnload: function () {
this.pauseVA()
ChapterApi.endVideo()
// ChapterApi.endVideo()
},
onShow: function () {
/* 兼容 android 这里发现 android 打开预览大图,然后关闭 自动播放视频,而且关不掉, 兼容android强制关闭视频 */
......@@ -587,6 +587,7 @@ Page({
_rProgress.pt = parseInt(_rProgress.pt) + (10000 / 1000) * 1.5
_rProgress.cpt = tempTime
_rProgress.mpt = tempTime > _rProgress.mpt ? tempTime : _rProgress.mpt
_rProgress.ps = _rProgress.ps || []
ChapterApi.updateProgress(Object.assign({}, _rProgress, { ps: _rProgress.ps.join(',') }))
this.realTimeProgress.ps = []
}
......
......@@ -18,16 +18,19 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
......
......@@ -2,18 +2,18 @@
* 所有相关配置项
*/
const url_test = {
URL_PATH1: 'https://lms-api2.ezijing.com', // 正式域名 - 由于项目变动域名
URL_PATH2: 'https://sso2.ezijing.com', // 正式域名 - 由于项目变动域名
URL_PATH1: 'https://wechat-api2.ezijing.com/api/lms', // 正式域名 - 由于项目变动域名
URL_PATH2: 'https://wechat-api2.ezijing.com/api', // 正式域名 - 由于项目变动域名
outSiteLink: 'https://e-learning.ezijing.com', // 正式外链
tenant: 'classes',
version: '3.2.0'
version: '3.2.2'
}
const url_online = {
URL_PATH1: 'https://wechat-api.ezijing.com/api/lms-ep', // 正式域名 - 由于项目变动域名
URL_PATH2: 'https://wechat-api.ezijing.com/api', // 正式域名 - 由于项目变动域名
outSiteLink: 'https://e-learning.ezijing.com', // 正式外链
tenant: 'classes',
version: '3.2.0'
version: '3.2.2'
}
let config = url_online
/* 请求接口统一 重定义 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论