componentsMixin.js
577 Bytes
/*
* @Description:
* @Author: huyue
* @Date: 2022-09-01 11:28:34
* @LastEditors: huyue
* @LastEditTime: 2022-09-01 17:31:43
*/
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)
}
}
})