Commit bf69e3d2 authored by 王炽's avatar 王炽

6666666

parent 4545dc87
......@@ -310,6 +310,8 @@ const handleImageLoad = (e, item, index) => {
console.log(`图片 ${index} 加载完成,设置高度为: ${item.itemHeight}px`);
}
const currentItem = ref(null);
onShow(async () => {
md.sensorComponentLogTake({
......@@ -333,12 +335,27 @@ onShow(async () => {
componentContent: "我的藏品"
});
// console.log('onshow')
await xingmaLabStore.loadXingmaInfo();
const pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
const isFavorite = currentPage?.options?.isFavorite
await reloadCangguanList();
await reloadCangpinList();
await reloadShoucangList();
console.log('isFavorite=', isFavorite);
console.log('currentPage=', currentPage);
// console.log('onshow')
//1收藏,-1取消收藏,不存在刷新页面
if(!isFavorite){
await xingmaLabStore.loadXingmaInfo();
await reloadCangguanList();
await reloadCangpinList();
await reloadShoucangList();
}else{
if(isFavorite == 1){
currentItem.value.collection = true;
}else{
currentItem.value.collection = false;
}
}
})
......@@ -608,7 +625,7 @@ const handleBottomNavClick = async (navType) => {
const handleItemClick_cangguan = (item, index) => {
console.log('点击了项目藏馆:', item)
currentItem.value = item;
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "星妈lab首页",
......@@ -624,6 +641,7 @@ const handleItemClick_cangguan = (item, index) => {
const handleItemClick_cangpin = (item, index) => {
console.log('点击了项目藏品:', item)
// currentItem.value = item;
// 这里可以添加跳转逻辑
uni.navigateTo({
url: '/pages/XingmaLabDetailPage/XingmaLabDetailPage?id=' + item.id + '&index=' + index
......@@ -634,6 +652,7 @@ const handleItemClick_cangpin = (item, index) => {
const handleItemClick_shoucang = (item, index) => {
console.log('点击了项目收藏:', item)
// 这里可以添加跳转逻辑
// currentItem.value = item;
uni.navigateTo({
url: '/pages/XingmaLabDetailPage/XingmaLabDetailPage?id=' + item.id + '&index=' + index
})
......
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