From 461ccf2cd732023055efdcce14ad056201197097 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Wed, 8 Apr 2026 18:05:41 +0800 Subject: [PATCH] 11 --- components/tab-bar/myCenter.vue | 57 +++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/components/tab-bar/myCenter.vue b/components/tab-bar/myCenter.vue index ecad922..c32a0cb 100644 --- a/components/tab-bar/myCenter.vue +++ b/components/tab-bar/myCenter.vue @@ -13,6 +13,17 @@ + + + + + 您有多个店铺 + + + {{item.shopName}} + + + @@ -20,7 +31,7 @@ export default { data() { return { - + schoolShop:[] } }, props:{ @@ -32,13 +43,30 @@ methods: { init(){ console.log("我的初始化") + this.schoolShop = uni.getStorageSync('schoolShop') + }, + clickShop(item){ + uni.setStorageSync('shopId',item.id) + uni.setStorageSync('shopName',item.shopName) + uni.setStorageSync('shopIcon',item.shopIcon) + uni.navigateTo({ + url: '/package1/myCenter/merchantCenter' + }) }, navigatorTo(e){ let url = "" if(e=='addgoods'){ url = '/package1/myCenter/addGoods' }else if(e=='merchantCenter'){ - url = '/package1/myCenter/merchantCenter' + if(this.schoolShop.length>1){ + this.$refs.shopPopup.open() + return + }else if(this.schoolShop != ''){ + uni.setStorageSync('shopId',this.schoolShop[0].id) + uni.setStorageSync('shopName',this.schoolShop[0].shopName) + uni.setStorageSync('shopIcon',this.schoolShop[0].shopIcon) + url = '/package1/myCenter/merchantCenter' + } }else if(e=='addType'){ url = '/package1/myCenter/addType' }else if(e=='goodsList'){ @@ -100,4 +128,29 @@ height: 350px; position: relative; } + .shop-content{ + width: 300px; + height: auto; + position: relative; + background: #fff; + border-radius: 10px; + padding: 10px; + } + .popup-pay-title { + font-size: 36rpx; + font-weight: bold; + text-align: center; + position: relative; + padding-bottom: 10px; + border-bottom: 1px solid #eee; + margin-bottom: 10px; + } + .popup-list{ + height: 30px; + text-align: center; + font-size: 14px; + font-weight: 700; + border-bottom: 1px solid #eee; + line-height: 30px; + } \ No newline at end of file