From 6cab276416acdc121709f2f1ebbc2e80248cad47 Mon Sep 17 00:00:00 2001 From: mixtan <424491071@qq.com> Date: Sun, 7 Sep 2025 10:30:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=95=86=E5=93=81=E3=80=81=E8=A3=85=E4=BF=AE=E5=95=86=E5=93=81?= =?UTF-8?q?=E3=80=81=E5=BA=97=E9=93=BA=E5=95=86=E5=93=81=E7=9A=84=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E4=B8=80=E9=94=AE=E7=99=BB=E5=BD=95=EF=BC=9B=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E5=88=86=E7=B1=BB=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=92=8C=E6=8F=8F=E8=BF=B0=E4=BF=AE=E6=94=B9=EF=BC=9B=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E5=BA=95=E9=83=A8=E5=AF=BC=E8=88=AA=E8=A2=AB=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/product-list.vue | 15 ++ components/themes/diy.vue | 14 ++ components/themes/shoptheme1.vue | 250 ++++++++++++++++------------ pages/product/detail.vue | 12 +- pagesub/index/components/tabbar.vue | 2 +- pagesub/index/store.vue | 16 +- 6 files changed, 192 insertions(+), 117 deletions(-) diff --git a/components/product-list.vue b/components/product-list.vue index 341a078..53dd2f3 100644 --- a/components/product-list.vue +++ b/components/product-list.vue @@ -790,6 +790,8 @@ + + @@ -798,6 +800,7 @@ import uniDrawer from "@/components/uni-drawer.vue"; import uniTag from "@/components/uni-tag/uni-tag.vue"; import { mapMutations, mapState } from "vuex"; import $ from "../helpers/util"; +import loginPopup from "@/components/loginPopup.vue"; export default { props: { @@ -987,12 +990,15 @@ export default { shareTitle: "", chatUrl: "", timer: null, + + showLoginPopup: false, }; }, components: { uniDrawer, uniTag, + loginPopup, }, computed: mapState([ "Config", @@ -1254,6 +1260,10 @@ export default { "getUserInfo", ]), + closeLoginPopup() { + this.showLoginPopup = false; + }, + async init() { await this.$store.dispatch(`getCartList`, (data) => { this.cartList = data.items; @@ -1902,6 +1912,11 @@ export default { //列表购物车 addCart: async function (e) { + if (!this.hasLogin) { + this.showLoginPopup = true; + return; + } + let that = this; let index = e.currentTarget.dataset.index; let step = parseInt(e.currentTarget.dataset.step); diff --git a/components/themes/diy.vue b/components/themes/diy.vue index e838f30..94b07fb 100644 --- a/components/themes/diy.vue +++ b/components/themes/diy.vue @@ -888,6 +888,8 @@ }" v-if="item.eltmType == 103"> + + @@ -897,6 +899,7 @@ import diyCountdown from "../../components/themes/diy-countdown"; import guessYouLike from "@/components/product-list.vue"; import storeLists from "@/components/store-lists.vue"; +import loginPopup from "@/components/loginPopup.vue"; import { mapState, mapMutations } from "vuex"; import $ from "../../helpers/util"; @@ -908,6 +911,7 @@ export default { storeLists, wxParse, diyCountdown, + loginPopup, }, props: { BgConfig: { @@ -984,6 +988,7 @@ export default { return { w: 0, //windowWidth loaded: false, + showLoginPopup: false, chatUrl: "", initX: "690", initY: "1336", @@ -1056,12 +1061,21 @@ export default { "showCartNum", ]), + closeLoginPopup() { + this.showLoginPopup = false; + }, + getGoodsStatus (item){ return item?.product_quantity == 0 || item?.item_quantity == 0 }, async addCart(item) { + if (!this.hasLogin) { + this.showLoginPopup = true; + return; + } + if (item?.product_quantity == 0 || item?.item_quantity == 0) { uni.showToast({ icon: 'error', diff --git a/components/themes/shoptheme1.vue b/components/themes/shoptheme1.vue index ff383a5..458bc91 100644 --- a/components/themes/shoptheme1.vue +++ b/components/themes/shoptheme1.vue @@ -1,135 +1,167 @@ - - diff --git a/pages/product/detail.vue b/pages/product/detail.vue index 0630347..56f0631 100644 --- a/pages/product/detail.vue +++ b/pages/product/detail.vue @@ -1746,16 +1746,16 @@ export default { ispage: false, shareData: { - shareText: "澜驰商城系统,支持原生App、微信小程序,邀请你一起体验!", - shareTitle: "澜驰商城系统,支持原生App、微信小程序,邀请你一起体验!", - href: "https://www.suteshop.com", + shareText: "同城特惠,一站式购买小发精选好物。", + shareTitle: "大型综合体商城,30分钟送货到家", + href: "https://gpxscs.cn/", image: "", price: 0, }, - shareText: "澜驰商城系统,支持原生App、微信小程序,邀请你一起体验!", - shareTitle: "澜驰商城系统,支持原生App、微信小程序,邀请你一起体验!", - href: "https://www.suteshop.com", + shareText: "同城特惠,一站式购买小发精选好物。", + shareTitle: "大型综合体商城,30分钟送货到家", + href: "https://gpxscs.cn/", image: "", shareBoxFlag: 0, diff --git a/pagesub/index/components/tabbar.vue b/pagesub/index/components/tabbar.vue index 48de537..70cfad8 100644 --- a/pagesub/index/components/tabbar.vue +++ b/pagesub/index/components/tabbar.vue @@ -142,7 +142,7 @@ export default { bottom: 0; right: 0; left: 0; - z-index: 10; + z-index: 100; display: flex; align-items: center; border-top: 1px solid rgba(0, 0, 0, 0.1); diff --git a/pagesub/index/store.vue b/pagesub/index/store.vue index e1598c8..28192d1 100644 --- a/pagesub/index/store.vue +++ b/pagesub/index/store.vue @@ -573,6 +573,8 @@ + + @@ -640,6 +642,7 @@ import shoptheme6 from "../../components/themes/shoptheme6.vue"; import diy from "../../components/themes/diy.vue"; import uniTag from "@/components/uni-tag/uni-tag.vue"; import MyTabbar from "./components/tabbar.vue"; +import loginPopup from "@/components/loginPopup.vue"; import favorite from "@/helpers/favorite"; @@ -704,7 +707,8 @@ export default { loadStoreCategoryComplete: false, // 加载店铺配置信息完成 isRest:true, showBackTop: false, - scrollThreshold: 600 + scrollThreshold: 600, + showLoginPopup: false, }; }, computed: mapState([ @@ -728,6 +732,7 @@ export default { uniTag, wxParse, MyTabbar, + loginPopup, }, onBackPress({ from }) { @@ -836,6 +841,10 @@ export default { "getStoreInfo", ]), + closeLoginPopup() { + this.showLoginPopup = false; + }, + // 返回顶部 scrollToTop() { uni.pageScrollTo({ @@ -863,6 +872,11 @@ export default { SKU_Id: item.item_id, }; + if (!this.hasLogin) { + this.showLoginPopup = true; + return; + } + if(item?.product_quantity == 0){ uni.showToast({ icon: 'error',