From 6cb98e9f3776455abf00bf538f8774b69aa04ffa Mon Sep 17 00:00:00 2001
From: mixtan <424491071@qq.com>
Date: Mon, 28 Jul 2025 23:27:42 +0800
Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E5=A4=8D=E8=93=9D=E9=A9=B0?=
=?UTF-8?q?=E5=8A=A0=E8=B4=AD=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=EF=BC=9B=E5=AE=9E=E7=8E=B0=E5=85=A8=E9=83=A8=E5=95=86?=
=?UTF-8?q?=E5=93=81=E9=94=80=E9=87=8F=E4=B8=8B=E6=8B=89=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E5=95=86=E5=93=81=EF=BC=9B=E4=BF=AE=E5=A4=8D=E8=B4=AD=E7=89=A9?=
=?UTF-8?q?=E8=BD=A6=E5=88=98=E6=B5=B7=E5=AE=89=E5=85=A8=E8=BE=B9=E8=B7=9D?=
=?UTF-8?q?=E8=83=8C=E6=99=AF=E9=80=8F=E5=BA=95=E9=97=AE=E9=A2=98=EF=BC=9B?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=93=9D=E9=A9=B0=E5=8A=A0=E8=B4=AD=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=E6=97=A0=E7=A6=81=E7=94=A8=E6=97=A0=E6=8F=90=E7=A4=BA?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/themes/diy.vue | 65 ++++++++------
pages/index/cart.vue | 4 +-
pagesub/index/store.vue | 177 +++++++++++++++++++++++++++++++++++++-
store/index.js | 6 +-
4 files changed, 221 insertions(+), 31 deletions(-)
diff --git a/components/themes/diy.vue b/components/themes/diy.vue
index 343b221..93629e0 100644
--- a/components/themes/diy.vue
+++ b/components/themes/diy.vue
@@ -163,16 +163,15 @@
}}
-
-
-
-
-
+
+
+
@@ -399,21 +398,21 @@
+ }}
{{ items.name || __("请选择时间") }}
@@ -442,7 +441,7 @@
+ }}
@@ -569,7 +568,7 @@
@@ -607,7 +606,7 @@
+ }}
{{ __("已有") }}{{ items.OrderCount }} {{ __("人参加") }}
@@ -651,7 +650,7 @@
@@ -688,7 +687,7 @@
+ }}
{{ __("已有") }}{{ items.OrderCount }} {{
__("人参加") }}
@@ -736,7 +735,7 @@
diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index 901812d..f437d1e 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -1978,8 +1978,8 @@ export default {
width: 100%;
position: fixed;
bottom: 0;
- bottom: constant(safe-area-inset-bottom);
- bottom: env(safe-area-inset-bottom);
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
left: 0;
background-color: #fff;
border-top: 0rpx solid #e3e3e3;
diff --git a/pagesub/index/store.vue b/pagesub/index/store.vue
index 90b9774..e0c6c7c 100644
--- a/pagesub/index/store.vue
+++ b/pagesub/index/store.vue
@@ -428,6 +428,122 @@
+
+
+
+
+
+ {{ __("销量") }}
+
+
+ {{ __("新品") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __("正在加载") }}
+
+
+
+
+ {{
+ __("没有更多数据啦!")
+ }}
+
+
+
+
+
+
@@ -560,7 +676,9 @@ export default {
loadStoreInfoComplete: false, // 加载店铺基本信息完成
loadStoreConfigComplete: false, // 加载店铺配置信息完成
loadStoreCategoryComplete: false, // 加载店铺配置信息完成
- isRest:true
+ isRest:true,
+ showBackTop: false,
+ scrollThreshold: 600
};
},
computed: mapState([
@@ -628,7 +746,9 @@ export default {
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function () { },
+ onReachBottom: function () {
+ this.scrollbottom()
+ },
/**
* 用户点击右上角分享
@@ -669,7 +789,10 @@ export default {
/**
* 页面滚动触发事件的处理函数
*/
- onPageScroll: function () { },
+ onPageScroll: function (e) {
+ const scrollTop = e.scrollTop;
+ this.showBackTop = scrollTop >= this.scrollThreshold;
+ },
methods: {
...mapMutations([
@@ -679,6 +802,14 @@ export default {
"getStoreInfo",
]),
+ // 返回顶部
+ scrollToTop() {
+ uni.pageScrollTo({
+ scrollTop: 0,
+ duration: 300
+ });
+ },
+
goShopDetail(url) {
this.$.gopage(url)
},
@@ -693,6 +824,14 @@ export default {
SKU_Id: item.item_id,
};
+ if(item?.product_quantity == 0){
+ uni.showToast({
+ icon: 'error',
+ title: this.$.__("商品库存不足")
+ });
+ return false
+ }
+
await this.$store.dispatch(`addCart`, {
params: params,
callback: (data, status, msg, code) => {
@@ -1650,4 +1789,36 @@ export default {
.u-top-default{
bottom: 150px;
}
+
+.all_shop_tab{
+ position: sticky;
+ top: 0;
+ z-index: 100;
+ border-bottom: 1rpx solid #eee;
+}
+
+.back-to-top {
+ position: fixed;
+ top: 70%;
+ transform: translateY(-70%);
+ right: 20rpx;
+ width: 80rpx;
+ height: 80rpx;
+ text-align: center;
+ border-radius: 50%;
+ background-color: #fff;
+ color: #fff;
+ box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
+ opacity: 0;
+ transition: opacity 0.3s ease;
+ z-index: 98;
+ pointer-events: none;
+
+ &.show {
+ opacity: 1;
+ pointer-events: auto;
+ }
+}
+
+
diff --git a/store/index.js b/store/index.js
index cddf7cf..1d8645e 100644
--- a/store/index.js
+++ b/store/index.js
@@ -972,8 +972,12 @@ const store = new Vuex.Store({
provider.callback && provider.callback(data, status, msg, code);
} else {
+ uni.showModal({
+ title: '友情提示',
+ content: msg
+ });
// $.alert(msg);
- $.alert('点击太快了');
+ // $.alert('点击太快了');
}
},
fail: (err) => {