Commit 7f9bcb7a authored by AU-Pro-mac's avatar AU-Pro-mac

fixed open animation load lottie bug --02

parent c19fa890
...@@ -95,6 +95,7 @@ Page({ ...@@ -95,6 +95,7 @@ Page({
// 页面加载 // 页面加载
// 开场动画 // 开场动画
this.setData({ gameShow: true, gameType: 3, gameShow_timeout: true })
this.onAnimationLoadOver() this.onAnimationLoadOver()
this.getAuth() this.getAuth()
}, },
...@@ -221,18 +222,19 @@ Page({ ...@@ -221,18 +222,19 @@ Page({
// 收到 canvas lottie 加载结束的 信息 -- 且等待 开场动画 30s // 收到 canvas lottie 加载结束的 信息 -- 且等待 开场动画 30s
onAnimationLoadOver (msg = '') { onAnimationLoadOver (msg = '') {
if (msg = 'lottieReady') { if (msg === 'lottieReady') {
console.log('%creceive canvas lottie ready, onAnimationLoadOver', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;') console.log('%creceive canvas lottie ready, onAnimationLoadOver', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
console.log(`%c${msg}`, 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;') console.log(`%c${msg}`, 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
this.openAnimationTimeout = null
clearTimeout(this.openAnimationTimeout) clearTimeout(this.openAnimationTimeout)
this.openAnimationTimeout = setTimeout(() => { this.openAnimationTimeout = setTimeout(() => {
this.backToPage() this.setData({ gameShow_timeout: false, gameType: 0 })
setTimeout(() => { this.setData({ gameShow: false }) }, 350)
}, 5000) }, 5000)
} else if (!this.openAnimationTimeout) { } else if (!this.openAnimationTimeout) {
console.log('%conAnimationLoadOver timeout run', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;') console.log('%conAnimationLoadOver timeout run', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
this.openAnimationTimeout = setTimeout(() => { this.openAnimationTimeout = setTimeout(() => {
this.backToPage() this.setData({ gameShow_timeout: false, gameType: 0 })
setTimeout(() => { this.setData({ gameShow: false }) }, 350)
}, 30000) }, 30000)
} }
}, },
......
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