Commit 2f71a204 authored by yu's avatar yu

1

parent c599ca1b
......@@ -784,10 +784,15 @@ cc.Class({
},
cardAction(card) {
return new Promise((resolve, reject) => {
pg.audio.playAudioByUrlCall(card.data.audio).then((id) => {
let time = cc.audioEngine.getDuration(id);
if (card.data.audio) {
pg.audio.playAudioByUrlCall(card.data.audio).then((id) => {
let time = cc.audioEngine.getDuration(id);
cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start();
})
} else {
let time = 0.8;
cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start();
})
}
});
},
showSliderAction(time) {
......
......@@ -20,12 +20,12 @@ export const defaultData = {
{
"card": "p",
"color": "0",
"audio": "http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3"
// "audio": "http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3"
},
{
"card": "en",
"color": "1",
"audio": "http://staging-teach.cdn.ireadabc.com/a855504f6ab7af375d881a9e16e61213.mp3"
// "audio": "http://staging-teach.cdn.ireadabc.com/a855504f6ab7af375d881a9e16e61213.mp3"
}
],
"bgImg": "http://staging-teach.cdn.ireadabc.com/d5d3f7f4cf27a026fbb31c2ed52b5774.png",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment