<!-- pagesA -->
<script>
export default {
onPageScroll(e) {
uni.setStorageSync('scrollPosition', e.scrollTop);
},
onShow() {
this.scroll = uni.getStorageSync('scroll');
setTimeout(() => {
uni.pageScrollTo({
scrollTop: this.scroll,
duration: 0,
});
}, 100);
},
methods: {
jump() {
const scrollPosition = uni.getStorageSync('scrollPosition');
uni.navigateTo({
url:
'/pagesC/catCard/editImage?data=' +
list +
'&scroll=' +
scrollPosition,
});
},
},
};
</script>
<!-- pagesB -->
<script>
export default {
async onLoad(options) {
this.scroll = options.scroll;
}
methods: {
jump() {
uni.setStorageSync('scroll', this.scroll);
this.app.goPage(-1);
}
}
};
</script>