From b4f46ded2b95faaa2f70b8fa3e08b46bd36d41a4 Mon Sep 17 00:00:00 2001
From: Yer <17633066053@163.com>
Date: Mon, 8 May 2023 18:15:01 +0800
Subject: [PATCH 1/9] =?UTF-8?q?feat:=20=E6=88=91=E7=9A=84=E8=B6=B3?=
=?UTF-8?q?=E8=BF=B9=E6=96=B0=E5=A2=9E=E5=A4=B1=E6=95=88=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/myTracks.vue | 47 +++++++++++++----------------------------
1 file changed, 15 insertions(+), 32 deletions(-)
diff --git a/pages/mine/myTracks.vue b/pages/mine/myTracks.vue
index 89af420..1f712da 100644
--- a/pages/mine/myTracks.vue
+++ b/pages/mine/myTracks.vue
@@ -6,16 +6,21 @@
- {{item.storeName}}
+ {{item.storeName}}
-
-
+
+
+ 已失效商品
+
+
+
+
-
+
{{ item.goodsName }}
@@ -83,7 +88,7 @@
/**
* 导航到店铺
*/
- navgaiteToStore(val) {
+ navigateToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
@@ -99,7 +104,7 @@
/**
* 跳转详情
*/
- navgaiteToDetail(item) {
+ navigateToDetail(item) {
uni.navigateTo({
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
});
@@ -154,6 +159,10 @@
From 7b8e954555be83b4d4d1342be6c2a258cbe1c262 Mon Sep 17 00:00:00 2001
From: Yer <17633066053@163.com>
Date: Tue, 9 May 2023 18:12:52 +0800
Subject: [PATCH 2/9] =?UTF-8?q?fix:=20:bug:=20request=20=E6=B8=85=E7=A9=BA?=
=?UTF-8?q?=E7=BC=93=E5=AD=98=20uuid=E4=B8=A2=E5=A4=B1=E5=88=A4=E6=96=AD?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
utils/request.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/utils/request.js b/utils/request.js
index 65393ae..60e6767 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -53,12 +53,19 @@ function cleanStorage() {
let http = new Request();
-http.setConfig((config) => {
- // 没有uuid创建
+/**
+ * 创建uuid方法
+ */
+const createUuid = () => {
if (!storage.getUuid()) {
storage.setUuid(uuid.v1());
+ console.log("uuid", storage.getUuid());
}
+}
+
+http.setConfig((config) => {
+ createUuid();
/* 设置全局配置 */
config.baseURL = api.buyer;
config.header = {
@@ -105,9 +112,10 @@ http.interceptors.request.use(
}
+ createUuid();
config.header = {
...config.header,
- uuid: storage.getUuid() || uuid.v1(),
+ uuid: storage.getUuid()
};
return config;
},
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 3/9] =?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;
+}
From a353022d36ac6ead6b9983b0d3b4c8eae75976ba Mon Sep 17 00:00:00 2001
From: Yer <17633066053@163.com>
Date: Thu, 11 May 2023 18:24:07 +0800
Subject: [PATCH 4/9] =?UTF-8?q?fix:=20:bug:=20=E5=9C=B0=E5=9D=80=E5=8F=96?=
=?UTF-8?q?=E6=B6=88=E5=8A=A0=E8=BD=BD=20loading=20Bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/address/add.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pages/mine/address/add.vue b/pages/mine/address/add.vue
index 1ca7598..d19e4a3 100644
--- a/pages/mine/address/add.vue
+++ b/pages/mine/address/add.vue
@@ -121,6 +121,7 @@ export default {
// 选择地址后数据的回调
callBackAddress(val) {
+ console.log(val)
uni.showLoading({
title: "加载中",
});
@@ -133,7 +134,7 @@ export default {
this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割
this.form.lat = val.latitude; //纬度
this.form.lon = val.longitude; //经度
- if (this.$store.state.isShowToast){ uni.hideLoading() };
+ uni.hideLoading();
}
this.mapFlag = !this.mapFlag; //关闭地图
From 5e5d5b904b8f75b4ee44f9e460e99d64006f4575 Mon Sep 17 00:00:00 2001
From: chc <1501738723@qq.com>
Date: Mon, 15 May 2023 14:21:38 +0800
Subject: [PATCH 5/9] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BA=97?=
=?UTF-8?q?=E9=93=BA=E6=94=B6=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/members.js | 20 ++++++++++++++++----
pages/product/shopPage.vue | 8 ++++----
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/api/members.js b/api/members.js
index 46eb96b..153941a 100644
--- a/api/members.js
+++ b/api/members.js
@@ -236,7 +236,7 @@ export function deleteGoodsCollection(ids) {
*/
export function deleteStoreCollection(store_id) {
return http.request({
- url: `/member/collection/delete/STORE/${store_id}`,
+ url: `/member/storeCollection/delete/STORE/${store_id}`,
method: Method.DELETE,
needToken: true,
});
@@ -255,6 +255,19 @@ export function getGoodsIsCollect(type, good_id) {
});
}
+/**
+ * 获取商品是否被收藏
+ * @param good_id
+ */
+export function getStoreIsCollect(type, store_id) {
+ return http.request({
+ url: `/member/storeCollection/isCollection/${type}/${store_id}`,
+ method: Method.GET,
+ needToken: true,
+ loading: false,
+ });
+}
+
/**
* 收藏店铺
* @param store_id 店铺ID
@@ -262,10 +275,9 @@ export function getGoodsIsCollect(type, good_id) {
*/
export function collectionStore(store_id) {
return http.request({
- url: "members/collection/store",
- header: { "content-type": "application/x-www-form-urlencoded" },
+ url: `/member/storeCollection/add/STORE/${store_id}`,
method: Method.POST,
- data: { store_id },
+ needToken: true,
});
}
diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue
index 487e497..f3cc7de 100644
--- a/pages/product/shopPage.vue
+++ b/pages/product/shopPage.vue
@@ -181,8 +181,8 @@ import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js";
import {
receiveCoupons,
deleteStoreCollection,
- collectionGoods,
- getGoodsIsCollect,
+ collectionStore,
+ getStoreIsCollect,
} from "@/api/members.js";
import config from "@/config/config";
@@ -374,7 +374,7 @@ export default {
},
/**是否收藏店铺 */
async enableGoodsIsCollect() {
- let res = await getGoodsIsCollect("STORE", this.storeId);
+ let res = await getStoreIsCollect("STORE", this.storeId);
if (res.data.success) {
this.isCollection = res.data.result;
}
@@ -465,7 +465,7 @@ export default {
}
});
} else {
- collectionGoods("STORE", this.storeId).then((res) => {
+ collectionStore(this.storeId).then((res) => {
if (res.data.success) {
this.isCollection = true;
uni.showToast({
From 67177217251ae5fceae67da0560edbe9c6a657e1 Mon Sep 17 00:00:00 2001
From: chc <1501738723@qq.com>
Date: Mon, 15 May 2023 14:34:54 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BA=97?=
=?UTF-8?q?=E9=93=BA=E6=94=B6=E8=97=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/members.js | 16 ++++++++++++++++
pages/mine/myCollect.vue | 5 +++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/api/members.js b/api/members.js
index 153941a..e198238 100644
--- a/api/members.js
+++ b/api/members.js
@@ -202,6 +202,22 @@ export function getGoodsCollection(params, type) {
});
}
+/**
+ * 获取商品收藏
+ * @param params
+ * @returns {AxiosPromise}
+ */
+export function getStoreCollection(params, type) {
+ return http.request({
+ url: `/member/storeCollection/${type}`,
+ method: Method.GET,
+ needToken: true,
+ loading: false,
+ message: false,
+ params,
+ });
+}
+
/**
* 收藏商品
* @returns {AxiosPromise}
diff --git a/pages/mine/myCollect.vue b/pages/mine/myCollect.vue
index 7191f68..036d676 100644
--- a/pages/mine/myCollect.vue
+++ b/pages/mine/myCollect.vue
@@ -64,6 +64,7 @@