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) => {