merge
This commit is contained in:
@@ -132,13 +132,6 @@ Page({
|
||||
onReady(res) {
|
||||
this.videoContext = wx.createVideoContext('myVideo')
|
||||
},
|
||||
bindseekcomplete(e) {
|
||||
console.log(e)
|
||||
},
|
||||
videoPause(e){
|
||||
console.log('暂停了')
|
||||
},
|
||||
|
||||
// 视频更新事件
|
||||
videoTimeupdated(e) {
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
@@ -163,12 +156,11 @@ Page({
|
||||
this.setData({
|
||||
selectVideoItem: selectVideoItem
|
||||
})
|
||||
console.log('视频更新事件', selectVideoItem.currentSteps)
|
||||
},
|
||||
|
||||
// 视频播放结束事件
|
||||
videoEnded() {
|
||||
console.log('视频播放结束事件')
|
||||
// console.log('视频播放结束事件')
|
||||
// 完成弹窗 重置基础数据
|
||||
|
||||
this.setData({
|
||||
@@ -188,7 +180,7 @@ Page({
|
||||
|
||||
// 点击暂停视频
|
||||
videoPauseTab() {
|
||||
console.log('暂停')
|
||||
// console.log('暂停')
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
selectVideoItem.playedState = false
|
||||
this.setData({
|
||||
@@ -199,7 +191,7 @@ Page({
|
||||
|
||||
// 点击播放视频
|
||||
videoPlayTab() {
|
||||
console.log('播放')
|
||||
// console.log('播放')
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
selectVideoItem.playedState = true
|
||||
selectVideoItem.muted = false
|
||||
@@ -211,13 +203,13 @@ Page({
|
||||
|
||||
// 轮播图切换
|
||||
swiperChange(e) {
|
||||
console.log(e.detail)
|
||||
// console.log(e.detail)
|
||||
},
|
||||
|
||||
// 选择视频教程-点击
|
||||
selectVideo(e) {
|
||||
let item = e.currentTarget.dataset.item
|
||||
console.log(this.data.selectVideoItem.video_id, item.video_id)
|
||||
// console.log(this.data.selectVideoItem.video_id, item.video_id)
|
||||
if (this.data.selectVideoItem.video_id == item.video_id) return
|
||||
|
||||
item.playedState = false
|
||||
@@ -235,7 +227,7 @@ Page({
|
||||
|
||||
// 播放视频
|
||||
doPlay(position) {
|
||||
console.log(position)
|
||||
// console.log(position)
|
||||
this.videoContext.seek(position)
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
selectVideoItem.playedState = true
|
||||
@@ -248,9 +240,9 @@ Page({
|
||||
|
||||
// 静音非经营处理
|
||||
mutedTab(e) {
|
||||
console.log(e)
|
||||
// console.log(e)
|
||||
let type = e.target.dataset.type
|
||||
console.log(type)
|
||||
// console.log(type)
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
if (type == 'open') {
|
||||
selectVideoItem.muted = false
|
||||
@@ -322,7 +314,7 @@ Page({
|
||||
wx.getSetting({
|
||||
success: (res) => {
|
||||
let authSetting = res.authSetting
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if (!authSetting['scope.camera'] || authSetting['scope.camera'] == undefined) {
|
||||
wx.showModal({
|
||||
title: '温馨提示',
|
||||
@@ -334,8 +326,8 @@ Page({
|
||||
success: (res) => {
|
||||
if (res.confirm) { //允许打开授权页面
|
||||
//调起客户端小程序设置界面,返回用户设置的操作结果
|
||||
console.log(JSON.stringify(authSetting['scope.camera']), authSetting['scope.camera'] == undefined)
|
||||
console.log(authSetting['scope.camera'])
|
||||
// console.log(JSON.stringify(authSetting['scope.camera']), authSetting['scope.camera'] == undefined)
|
||||
// console.log(authSetting['scope.camera'])
|
||||
if (authSetting['scope.camera'] == undefined) {
|
||||
wx.authorize({
|
||||
scope: 'scope.camera',
|
||||
@@ -353,7 +345,7 @@ Page({
|
||||
} else {
|
||||
wx.openSetting({
|
||||
success: (res) => {
|
||||
console.log('res', res)
|
||||
// console.log('res', res)
|
||||
res.authSetting = {
|
||||
"scope.camera": true
|
||||
}
|
||||
@@ -387,7 +379,7 @@ Page({
|
||||
},
|
||||
getVideos() {
|
||||
wx.$api.user.videos().then(res => {
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
this.setData({
|
||||
videos: res.data.data,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user