From ca4e458db1094e351ef02e29ab3c9b5b429fe2eb Mon Sep 17 00:00:00 2001
From: Yer <17633066053@163.com>
Date: Wed, 10 May 2023 10:46:23 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8B=E6=9E=B6=E6=8F=90=E7=A4=BA=E6=A1=86?=
=?UTF-8?q?=EF=BC=8C=E5=9C=A8=E5=8E=9F=E6=9C=89=E7=9A=84=E4=B8=8B=E6=9E=B6?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=B8=AD=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=BC=B9=E5=87=BA?=
=?UTF-8?q?=E4=B8=8B=E6=9E=B6=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=B1=95=E7=A4=BA?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E5=95=86=E5=93=81=E5=8A=9F=E8=83=BD=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/m-take-down-sale-goods/index.vue | 34 +++++++++++++
pages/product/goods.vue | 55 ++++++++++++++-------
pages/product/product/product.scss | 4 ++
3 files changed, 76 insertions(+), 17 deletions(-)
create mode 100644 components/m-take-down-sale-goods/index.vue
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;
+}