diff --git a/components/m-take-down-sale-goods/index.vue b/components/m-take-down-sale-goods/index.vue new file mode 100644 index 0000000..8a27d71 --- /dev/null +++ b/components/m-take-down-sale-goods/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 9d8cd0b..ba280b4 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -88,14 +88,14 @@ ¥{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0] }}.{{ - $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1] -}} + $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1] + }} ~ ¥{{ $options.filters.goodsFormatPrice(wholesaleList[0].price)[0] }}.{{ - $options.filters.goodsFormatPrice(wholesaleList[0].price)[1] -}} + $options.filters.goodsFormatPrice(wholesaleList[0].price)[1] + }} ¥{{ @@ -105,7 +105,12 @@ +
+ 暂无报价 +
+ ¥0 .00 +
@@ -189,6 +194,7 @@ + @@ -205,15 +211,20 @@ {{ nums }} + +
+ + 查看类似商品 +
- + 加入购物车 立即购买 暂未开始 - + ¥{{ goodsDetail.price | unitPrice }} 单独购买 @@ -253,6 +264,10 @@ @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId" v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku" :buyMask="buyMask" /> + + + + @@ -284,6 +299,7 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块 import popupAddress from "./product/popup/address"; //地址选择模块 import shares from "@/components/m-share/index"; //分享 import popups from "@/components/popups/popups"; //气泡框 +import takeDownFormSaleGoods from "@/components/m-take-down-sale-goods/index"; //下架框 import setup from "./product/popup/popup"; export default { @@ -302,6 +318,7 @@ export default { GoodsSwiper, popupGoods, popupAddress, + takeDownFormSaleGoods }, data () { return { @@ -385,10 +402,8 @@ export default { tabScrollTop: null, scrollArr: [], scrollId: "1", - scrollFlag: true, current: "1", //当前显示的轮播图页 - goodsDetail: {}, //商品数据 goodsSpec: "", //规格数据 imgList: [], //轮播图数据 @@ -398,12 +413,9 @@ export default { goodsInfo: false, //商品介绍弹窗 addressFlag: false, //配送地址弹窗 buyMask: false, //添加购物车直接购买,查看已选 弹窗 - num: 1, //添加到购物车的数量 - skuId: "", // storeDetail: "", //店铺基本信息, - // 店铺信息 storeParams: { pageNumber: 1, @@ -413,7 +425,6 @@ export default { likeGoodsList: "", //相似商品列表 PromotionList: "", //活动,促销,列表 specList: [], - skusCombination: [], selectedSpec: [], nums: 0, delivery: "", @@ -425,7 +436,8 @@ export default { routerVal: "", IMLink: "", // IM地址 - wholesaleList: [] + wholesaleList: [], + takeDownFromSale: false, // 下架销售状态 }; }, @@ -504,6 +516,10 @@ export default { }, methods: { + // 重新打开下架 + reStartTakeDownSale(){ + this.$refs.takeDownSale.show = true + }, share () { return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`; }, @@ -538,11 +554,16 @@ export default { // 这里请求获取到页面数据 解析数据 let response = await getGoods(id, goodsId); - + + // 判断当前接口返回内容 if (!response.data.success) { - setTimeout(() => { - uni.navigateBack(); - }, 500); + // 商品已下架 + if(response.data.code == 11001){ + this.takeDownFromSale = true + } + // setTimeout(() => { + // uni.navigateBack(); + // }, 500); } // 这里是绑定分销员 if (distributionId || this.$store.state.distributionId) { diff --git a/pages/product/product/product.scss b/pages/product/product/product.scss index 6dcbb8b..b1f7791 100644 --- a/pages/product/product/product.scss +++ b/pages/product/product/product.scss @@ -62,3 +62,7 @@ color: #262626; font-weight: 700; } + +.down-goods{ + font-size: 50rpx !important; +}