2023-09-12 20:19:08 +08:00
|
|
|
<script>
|
|
|
|
export default {
|
2023-09-25 19:13:07 +08:00
|
|
|
onLaunch: function(info) {
|
|
|
|
console.log('App Launch');
|
|
|
|
if (info.referrerInfo?.extraData?.uniMP) {
|
|
|
|
uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
|
|
|
|
uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token);
|
|
|
|
if(info.referrerInfo?.extraData?.avatar){
|
|
|
|
uni.setStorageSync('avatar', info.referrerInfo?.extraData?.avatar);
|
|
|
|
uni.$emit('MPinfo', {
|
|
|
|
avatar: info.referrerInfo?.extraData?.avatar,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2023-09-12 20:19:08 +08:00
|
|
|
},
|
|
|
|
onShow: function() {
|
2023-09-25 19:13:07 +08:00
|
|
|
console.log('App Show');
|
2023-09-12 20:19:08 +08:00
|
|
|
},
|
|
|
|
onHide: function() {
|
2023-09-25 19:13:07 +08:00
|
|
|
console.log('App Hide');
|
2023-09-12 20:19:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
/*每个页面公共css */
|
|
|
|
</style>
|