componentsMixin.js
443 Bytes
module.exports = Behavior({
lifetimes: {
attached() {
let componentTimer = setInterval(() => {
let thisPage = wx.$router.getPageInstance()
let {
IMGURL,
img_version
} = thisPage.data
if (IMGURL && img_version) {
this.setData({
IMGURL,
img_version
})
clearInterval(componentTimer)
}
}, 0.25 * 1000)
}
}
})