diff --git a/buyer/src/components/card/index.vue b/buyer/src/components/card/index.vue index 49a0698a..4db1316e 100644 --- a/buyer/src/components/card/index.vue +++ b/buyer/src/components/card/index.vue @@ -50,12 +50,21 @@ export default { type: null, default: null, }, + _ActiveTab: { + type: Number, + default: 0, + }, }, data() { return { - isActive: 0, + isActive: this._ActiveTab, }; }, + watch: { + _ActiveTab(val) { + this.isActive = val; + }, + }, methods: { callBack() { if (this._Src) { diff --git a/buyer/src/components/indexDecorate/modelList/Carousel.vue b/buyer/src/components/indexDecorate/modelList/Carousel.vue index 90013e92..3ad5a793 100644 --- a/buyer/src/components/indexDecorate/modelList/Carousel.vue +++ b/buyer/src/components/indexDecorate/modelList/Carousel.vue @@ -173,11 +173,30 @@ export default { carouselItemKey(item, index) { return item?.img || item?.url || `slide-${index}`; }, + resolveRoute(pathStr) { + if (!pathStr) return { path: "/" }; + const [path, search] = pathStr.split("?"); + if (!search) return { path }; + return { + path, + query: Object.fromEntries(new URLSearchParams(search)), + }; + }, // 快捷跳转中心 entryControl(val) { - console.log("val",val) - let url = this.$router.resolve(val.path); - window.open(url.href, '_blank'); + const location = this.resolveRoute(val.path); + if (location.path.startsWith("/home/") && !storage.getItem("userInfo")) { + this.$router.push({ + path: "/login", + query: { + rePath: location.path, + query: JSON.stringify(location.query || {}), + }, + }); + return; + } + const url = this.$router.resolve(location); + window.open(url.href, "_blank"); }, }, mounted() { diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 79d6d502..750404b4 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -10,7 +10,7 @@ {{ item.name }} -
+
{{ goodsMsg.data.storeName @@ -176,14 +176,23 @@ export default { }, async collect () { // 收藏店铺 + const storeId = this.goodsMsg.data && this.goodsMsg.data.storeId; + if (!storeId) { + return; + } + if (!this.Cookies.getItem("userInfo")) { + this.$Message.warning("请先登录"); + this.$router.push("/login"); + return; + } if (this.storeCollected) { - let cancel = await cancelStoreCollect("STORE", this.goodsMsg.data.storeId); + let cancel = await cancelStoreCollect("STORE", storeId); if (cancel.success) { this.$Message.success("已取消收藏"); this.storeCollected = false; } } else { - let collect = await collectStore("STORE", this.goodsMsg.data.storeId); + let collect = await collectStore("STORE", storeId); if (collect.code === 200) { this.storeCollected = true; this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看"); diff --git a/buyer/src/pages/Merchant.vue b/buyer/src/pages/Merchant.vue index fab5aaf9..8527a9c3 100644 --- a/buyer/src/pages/Merchant.vue +++ b/buyer/src/pages/Merchant.vue @@ -285,14 +285,23 @@ export default { }, async collect() { // 收藏店铺 + const storeId = this.storeMsg && this.storeMsg.storeId; + if (!storeId) { + return; + } + if (!this.Cookies.getItem("userInfo")) { + this.$Message.warning("请先登录"); + this.$router.push("/login"); + return; + } if (this.storeCollected) { - let cancel = await cancelStoreCollect("STORE", this.storeMsg.storeId); + let cancel = await cancelStoreCollect("STORE", storeId); if (cancel.success) { this.$Message.success("已取消收藏"); this.storeCollected = false; } } else { - let collect = await collectStore("STORE", this.storeMsg.storeId); + let collect = await collectStore("STORE", storeId); if (collect.code === 200) { this.storeCollected = true; this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看"); diff --git a/buyer/src/pages/home/memberCenter/ComplainList.vue b/buyer/src/pages/home/memberCenter/ComplainList.vue index 770e2bd6..22fb36c0 100644 --- a/buyer/src/pages/home/memberCenter/ComplainList.vue +++ b/buyer/src/pages/home/memberCenter/ComplainList.vue @@ -5,10 +5,10 @@
-
商品信息
-
投诉状态
-
投诉主题
-
+
商品信息
+
投诉状态
+
投诉主题
+
投诉内容
@@ -22,7 +22,7 @@ 取消投诉
-
+
@@ -30,11 +30,11 @@ {{item.goodsName}}
-
{{statusLabel[item.complainStatus]}}
-
+
{{statusLabel[item.complainStatus]}}
+
{{item.complainTopic}}
-
+
{{item.content}}