diff --git a/buyer/src/components/empty/Main.vue b/buyer/src/components/empty/Main.vue index 95bd4dd5..65ca3a37 100644 --- a/buyer/src/components/empty/Main.vue +++ b/buyer/src/components/empty/Main.vue @@ -7,6 +7,7 @@ alt="" />

{{ _Title }}

+ @@ -35,6 +36,6 @@ export default { } p { cursor: pointer; - + } diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 63a421f0..89685d2c 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -12,7 +12,7 @@ {{ item.name }} -
+
{{ goodsMsg.data.storeName @@ -32,6 +32,12 @@ + +
+ + +
+
@@ -41,6 +47,7 @@ import Search from "@/components/Search"; import ShopHeader from "@/components/header/ShopHeader"; import ShowGoods from "@/components/goodsDetail/ShowGoods"; +import empty from "@/components/empty/Main"; import ShowGoodsDetail from "@/components/goodsDetail/ShowGoodsDetail"; import { goodsSkuDetail } from "@/api/goods"; import { @@ -68,11 +75,16 @@ export default { categoryBar: [], // 分类 storeCollected: false, // 商品收藏 storeMsg: {}, // 店铺信息 + takeDownSale:false, // 是否下架 }; }, methods: { + // 跳转首页或商品页面 + target(url){ + this.$router.push({path: url}) + }, // 点击规格 targetClickSku (val) { this.getGoodsDetail(val); @@ -139,11 +151,14 @@ export default { } } else { this.$Message.error(res.message); - this.$router.push("/"); + this.isLoading = false } }) .catch((e) => { - this.$router.push("/"); + this.isLoading = false + if(e.code === 11001){ + this.takeDownSale = true + } }); }, goGoodsList (currIndex) { @@ -179,6 +194,7 @@ export default { ShopHeader, ShowGoods, ShowGoodsDetail, + empty }, }; @@ -209,4 +225,8 @@ export default { } } } +.sale-btn{ + margin:10px 0 + +} diff --git a/buyer/src/plugins/request.js b/buyer/src/plugins/request.js index 20503d87..0fe57a84 100644 --- a/buyer/src/plugins/request.js +++ b/buyer/src/plugins/request.js @@ -160,7 +160,7 @@ service.interceptors.response.use( Message.error(errorData.message || _message); } } - return Promise.reject(error); + return Promise.reject(errorData); } );