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

我的藏品详情页

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