Commit 2a0af2e9 authored by 王炽's avatar 王炽

我的藏品详情页

parent e4768d84
......@@ -228,6 +228,8 @@ const showNoTimePopup = ref(false) // 无次数弹窗
const shoucangListIdx = ref(1);
const shoucangTotalPage = ref(0);
const currentItemType = ref('cangguan');
// onPageScroll((e) => {
// console.log('e.scrollTop=',e);
// const newVal = e.scrollTop;
......@@ -365,7 +367,11 @@ onShow(async () => {
if(isFavorite == 1){
currentItem.value.collection = true;
}else{
if(currentItemType.value == 'cangguan'){
currentItem.value.collection = false;
}else{
shoucangList.value.splice(currentItem.value, 1)
}
}
}
......@@ -484,6 +490,7 @@ const switchTab = (tab) => {
}
}
//我的藏品/我的收藏tab
const switchSubTab = async (subTab) => {
if(subTab == 'collections'){
if(currentFrontNavType != 'collections'){
......@@ -495,9 +502,11 @@ const switchSubTab = async (subTab) => {
componentName: "我的藏品",
componentContent: "我的藏品-我的藏品"
});
await reloadCangpinList();
// await reloadCangpinList();
//走onshow刷新,因为去发布按钮埋点
}
}else if(subTab == 'favorites'){
if(currentFrontNavType != 'favorites'){
md.sensorComponentLogTake({
......@@ -509,6 +518,7 @@ const switchSubTab = async (subTab) => {
currentFrontNavType = 'favorites'
await reloadShoucangList();
}
}
activeSubTab.value = subTab
// if(currentFrontNavType == 'collections'){
......@@ -594,7 +604,7 @@ const handleBottomNavClick = async (navType) => {
if(currentButtomNavType != 'wodecangguan'){
currentButtomNavType = 'wodecangguan';
if(currentFrontNavType == ''){
// debugger;
if(!(cangpinList && cangpinList.length > 0)){
md.sensorComponentLogTake({
xcxComponentExposure: "true",
......@@ -614,6 +624,7 @@ const handleBottomNavClick = async (navType) => {
activeSubTab.value = 'collections'
currentFrontNavType = 'collections'
await reloadCangpinList();
}else{
currentFrontNavType = activeSubTab.value;
if(activeSubTab.value == 'collections'){
......@@ -633,7 +644,8 @@ const handleBottomNavClick = async (navType) => {
componentContent: "我的藏品-我的藏品"
});
}
await reloadCangpinList();
// await reloadCangpinList();
//走onshow刷新,因为去发布按钮埋点
}else{
md.sensorComponentLogTake({
xcxComponentExposure: "true",
......@@ -652,6 +664,7 @@ const handleBottomNavClick = async (navType) => {
const handleItemClick_cangguan = (item, index) => {
console.log('点击了项目藏馆:', item)
currentItem.value = item;
currentItemType.value = 'cangguan';
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "星妈lab首页",
......@@ -676,6 +689,8 @@ const handleItemClick_cangpin = (item, index) => {
const handleItemClick_shoucang = (item, index) => {
currentItem.value = index;
currentItemType.value = 'shoucang';
console.log('点击了项目收藏:', item)
// 这里可以添加跳转逻辑
// currentItem.value = item;
......
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