From 18f06d0d4723c109a509b5173cc44a562d23b0ff Mon Sep 17 00:00:00 2001
From: bob bob <2529156631@qq.com>
Date: Sun, 20 Oct 2024 03:47:37 +0000
Subject: [PATCH] =?UTF-8?q?uniapp=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91?=
=?UTF-8?q?=EF=BC=9A=20=E6=96=B0=E5=A2=9E=E6=B7=BB=E5=8A=A0=E8=B4=AD?=
=?UTF-8?q?=E7=89=A9=E8=BD=A6=EF=BC=8C=E6=8F=90=E4=BA=A4=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=EF=BC=8C=E7=AB=8B=E5=8D=B3=E8=B4=AD=E4=B9=B0=EF=BC=8C=E4=BB=A3?=
=?UTF-8?q?=E7=90=86=EF=BC=8C=E5=88=86=E9=94=80=E5=BA=97=E9=93=BA=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=AE=A2=E5=8D=95=E6=94=AF=E4=BB=98,?=
=?UTF-8?q?=E7=A7=92=E6=9D=80=E8=AF=A6=E6=83=85=E7=AB=8B=E5=8D=B3=E8=B4=AD?=
=?UTF-8?q?=E4=B9=B0=EF=BC=8C=E5=9B=A2=E8=B4=AD=E8=AF=A6=E6=83=85=E7=AB=8B?=
=?UTF-8?q?=E5=8D=B3=E8=B4=AD=E4=B9=B0=EF=BC=8C=E5=9B=A2=E8=B4=AD=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E8=B4=AD=E4=B9=B0=E6=93=8D=E4=BD=9C=EF=BC=8C=E6=94=B6?=
=?UTF-8?q?=E8=B4=A7=E5=9C=B0=E5=9D=80=E6=8F=90=E4=BA=A4=EF=BC=8C=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E5=94=AE=E5=90=8E=E6=8F=90=E4=BA=A4=20=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0loading=20=E7=A6=81=E7=94=A8=E5=A4=9A=E6=AC=A1?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../coreshop-button/coreshop-button.vue | 29 ++++++-----
.../CoreShop/pages/cart/cart.vue | 11 +---
.../classify-five/classify-five.vue | 16 ++++--
.../classify-four/classify-four.vue | 19 ++++---
.../goods-detail-sku/goods-detail-sku.scss | 11 ++++
.../goods-detail-sku/goods-detail-sku.vue | 52 ++++++++++++++++---
.../pages/components/pay-method/index.vue | 27 ++++++----
.../CoreShop/pages/order/pay/pay.vue | 15 +++---
.../CoreShop/pages/order/submit/submit.vue | 13 +++--
.../activity/groupBuying/detail/detail.vue | 14 ++---
.../activity/pinTuan/detail/detail.vue | 28 +++++-----
.../activity/seckill/detail/detail.vue | 30 ++++++-----
.../subpackage/agency/store-set/index.vue | 13 +++--
.../distribution/store-set/index.vue | 13 +++--
.../subpackage/member/address/index/index.vue | 14 +++--
.../member/afterSales/apply/apply.vue | 14 +++--
16 files changed, 213 insertions(+), 106 deletions(-)
diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-button/coreshop-button.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-button/coreshop-button.vue
index dde49887..371e8807 100644
--- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-button/coreshop-button.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-button/coreshop-button.vue
@@ -1,7 +1,7 @@
-
- {{props.title}}
-
+
\ No newline at end of file
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/cart/cart.vue b/CoreCms.Net.Uni-App/CoreShop/pages/cart/cart.vue
index dc720aa7..4a9e7d1f 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/cart/cart.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/cart/cart.vue
@@ -101,9 +101,6 @@
-
-
-
@@ -313,12 +310,8 @@
/** 去购买 */
const handleGoToBuy = () => {
- let ids : Array = [];
- state.cartList.forEach((item : CartListType) => {
- if (item.select) {
- ids.push(item.id)
- }
- })
+ const ids : Array= state.cartList.filter(x=>x.select).map(x=>x.id);
+
if (ids.length > 0) {
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${ids.join(',')}`)
} else {
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-five/classify-five.vue b/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-five/classify-five.vue
index e83abaa4..9456ba2f 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-five/classify-five.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-five/classify-five.vue
@@ -96,8 +96,8 @@
+ :safeAreaInsetBottom="false" :buyNowNowloading="buyNowLoading" :addCartloading="addCartLoading"
+ @handleChangePopup="handleChangePopup" @handleAddCart="handleAddCart" @handleBuyNow="handleBuyNow">
@@ -131,6 +131,7 @@
import { getDomInfo, handleStaticResources, handleRouteNavigateTo, handleShowToast, handleRouteSwitchTab } from '@/core/utils';
import { AddCartEnum, PaymentTypeEnum, RouteSwitchTabEnum } from '@/core/enum';
import GoodsDetailSkuPopup from '@/pages/components/goods-detail/components/goods-detail-sku/goods-detail-sku.vue';
+ import { useLoadingFn } from '@/core/hooks';
const instance = getCurrentInstance();
@@ -185,6 +186,13 @@
goodsDetailData: {},
});
+ const buyNowLoading = ref(false);
+ const addCartLoading = ref(false);
+
+ const handleBuyNow = useLoadingFn(onBuyNow, buyNowLoading);
+ const handleAddCart = useLoadingFn(onAddCart, addCartLoading)
+
+
watch(() => props.data, (newVal : Array) => {
if (newVal) {
state.classifyData = newVal.map((item : CategoriesType) => {
@@ -277,7 +285,7 @@
}
/** 添加购物车 */
- const handleAddCart = async ({ productId, nums } : any) => {
+ async function onAddCart({ productId, nums } : any) {
const addCart : Response = await queryAddCart({
productId,
nums,
@@ -295,7 +303,7 @@
}
/** 立即购买 */
- const handleBuyNow = async ({ productId, nums } : any) => {
+ async function onBuyNow({ productId, nums } : any) {
const addCart : Response = await queryAddCart({
productId,
nums,
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-four/classify-four.vue b/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-four/classify-four.vue
index 10c26825..f4b92642 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-four/classify-four.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/classify/classify-page/classify-four/classify-four.vue
@@ -67,15 +67,15 @@
+ :safeAreaInsetBottom="false" :buyNowNowloading="buyNowLoading" :addCartloading="addCartLoading"
+ @handleChangePopup="handleChangePopup" @handleAddCart="handleAddCart" @handleBuyNow="handleBuyNow">