diff --git a/f/web-kboss/src/views/homePage/ncmatch/favoriteBox/index.vue b/f/web-kboss/src/views/homePage/ncmatch/favoriteBox/index.vue index c43fc49..a7d2119 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/favoriteBox/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/favoriteBox/index.vue @@ -100,6 +100,9 @@ export default { // 遍历product_info的所有属性 Object.keys(product.product_info).forEach(key => { + if(key == 'id'){ + flattenedProduct.productid = product.product_info.id; + } // 如果上一级已经有同名属性,则跳过(避免覆盖) if (!(key in flattenedProduct)) { flattenedProduct[key] = product.product_info[key]; diff --git a/f/web-kboss/src/views/homePage/ncmatch/historyBox/index.vue b/f/web-kboss/src/views/homePage/ncmatch/historyBox/index.vue index 2d6cc42..5ee8770 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/historyBox/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/historyBox/index.vue @@ -100,6 +100,9 @@ export default { // 遍历product_info的所有属性 Object.keys(product.product_info).forEach(key => { + if(key == 'id'){ + flattenedProduct.productid = product.product_info.id; + } // 如果上一级已经有同名属性,则跳过(避免覆盖) if (!(key in flattenedProduct)) { flattenedProduct[key] = product.product_info[key]; diff --git a/f/web-kboss/src/views/homePage/ncmatch/mainPage/index.vue b/f/web-kboss/src/views/homePage/ncmatch/mainPage/index.vue index b7d9097..aaed021 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/mainPage/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/mainPage/index.vue @@ -258,6 +258,20 @@ export default Vue.extend({ handleSearch() { console.log('搜索:1', this.searchKeyword) + }, + goFavorite() { + if (this.loginState) { + this.$router.push('/ncmatchHome/favoriteBox') + } else { + this.$router.push('/login') + } + }, + goHistory() { + if (this.loginState) { + this.$router.push('/ncmatchHome/historyBox') + } else { + this.$router.push('/login') + } } } }) @@ -303,8 +317,8 @@ export default Vue.extend({ 发布商品 diff --git a/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue b/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue index 099a7aa..6ff2c0b 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/mainPage/productCard/index.vue @@ -1,7 +1,6 @@