Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
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
wangxuelai
wechatapp.shangjiadao.com
Commits
7252b178
Commit
7252b178
authored
Mar 04, 2020
by
sujie@126.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lvtz_home' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-0220
parents
44cd9c0b
3ce56b61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
55 deletions
+65
-55
index.js
business/pages/calendarthemeeditor/index.js
+1
-1
index.js
business/pages/themeeditor/index.js
+57
-53
index.js
src/components/clockitemv2/index.js
+7
-1
No files found.
business/pages/calendarthemeeditor/index.js
View file @
7252b178
...
...
@@ -734,7 +734,7 @@ Page({
}
})
this
.
innerAudioContext
.
seek
(
audioStorage
[
value
].
currentTime
)
this
.
innerAudioContext
.
play
()
;
this
.
innerAudioContext
.
play
()
this
.
innerAudioContext
.
onError
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
;
...
...
business/pages/themeeditor/index.js
View file @
7252b178
...
...
@@ -112,10 +112,52 @@ Page({
{
type
:
5
,
label
:
"今日练字作业"
,
title
:
'请各位同学认真查看今日要练习的作业,并跟着练习'
}
],
currentMockType
:
0
,
successDailogShow
:
false
successDailogShow
:
false
,
actPalyaudioValue
:
''
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
that
=
this
;
this
.
innerAudioContext
=
wx
.
createInnerAudioContext
();
// 当前页面唯一的一个音频容器
this
.
innerAudioContext
.
onWaiting
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
actPalyaudioValue
].
isWaiting
){
return
}
audioStorage
[
actPalyaudioValue
].
isWaiting
=
true
that
.
setData
({
audioStorage
,
})
setTimeout
((
e
)
=>
{
this
.
data
.
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
;
this
.
setData
({
audioStorage
:
this
.
data
.
audioStorage
})
},
5000
)
})
this
.
innerAudioContext
.
onTimeUpdate
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
actPalyaudioValue
].
isWaiting
)
{
clearInterval
(
that
.
data
.
voiceInterval
);
that
.
voiceIntervalPlay
(
actPalyaudioValue
);
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
that
.
setData
({
audioStorage
,
})
}
})
this
.
innerAudioContext
.
onError
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
;
audioStorage
[
actPalyaudioValue
].
play
=
false
;
wx
.
showToast
({
title
:
'音频播放出错啦'
,
icon
:
'none'
,
duration
:
2000
})
that
.
setData
({
audioStorage
,
})
});
const
{
id
,
tid
,
...
...
@@ -612,60 +654,22 @@ Page({
audioStorage
[
value
].
play
=
true
;
}
}
this
.
innerAudioContext
.
onWaiting
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
actPalyaudioValue
].
isWaiting
){
return
}
audioStorage
[
actPalyaudioValue
].
isWaiting
=
true
that
.
setData
({
audioStorage
,
})
setTimeout
((
e
)
=>
{
this
.
data
.
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
;
this
.
setData
({
audioStorage
:
this
.
data
.
audioStorage
})
},
5000
)
})
this
.
innerAudioContext
.
onTimeUpdate
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
actPalyaudioValue
].
isWaiting
)
{
clearInterval
(
that
.
data
.
voiceInterval
);
that
.
voiceIntervalPlay
(
actPalyaudioValue
);
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
that
.
setData
({
audioStorage
,
})
}
})
this
.
innerAudioContext
.
onCanplay
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
actPalyaudioValue
].
isWaiting
)
{
clearInterval
(
that
.
data
.
voiceInterval
);
that
.
voiceIntervalPlay
(
actPalyaudioValue
);
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
that
.
setData
({
audioStorage
,
})
}
})
// this.innerAudioContext.onCanplay((e)=>{
// const { actPalyaudioValue, audioStorage} = this.data
// if (audioStorage[actPalyaudioValue].isWaiting) {
// clearInterval(that.data.voiceInterval);
// that.voiceIntervalPlay(actPalyaudioValue);
// audioStorage[actPalyaudioValue].isWaiting = false
// that.setData({
// audioStorage,
// })
// }
// })
console
.
log
(
audioStorage
[
value
].
currentTime
,
'audioStorage[value].currentTime'
);
this
.
innerAudioContext
.
seek
(
audioStorage
[
value
].
currentTime
)
this
.
innerAudioContext
.
play
();
this
.
innerAudioContext
.
onError
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
audioStorage
[
actPalyaudioValue
].
isWaiting
=
false
;
audioStorage
[
actPalyaudioValue
].
play
=
false
;
wx
.
showToast
({
title
:
'音频播放出错啦'
,
icon
:
'none'
,
duration
:
2000
})
that
.
setData
({
audioStorage
,
})
});
//that.voiceIntervalPlay(value);
that
.
setData
({
audioStorage
,
...
...
src/components/clockitemv2/index.js
View file @
7252b178
...
...
@@ -112,7 +112,10 @@ Component({
fingureAnimation
:
false
,
},
created
()
{
// console.log(LocalStorage.getItem('visitor'), "LocalStorage.getItem('visitor')")
// this.setData({
// visitor: LocalStorage.getItem('visitor'),
// })
},
attached
()
{
},
...
...
@@ -123,6 +126,9 @@ Component({
// 最后一次单击事件点击发生时间
lastTapTime
:
0
,
ready
()
{
this
.
setData
({
visitor
:
LocalStorage
.
getItem
(
'visitor'
),
})
// const customerId = LocalStorage.getItem('visitor') && LocalStorage.getItem('visitor').studentId;
const
customerId
=
app
.
globalData
.
currentSchoolStudentId
;
this
.
setData
({
...
...
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