From 12f43b2dffb04e101c5d4c5277733aa0f3bbabcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Wed, 8 Oct 2025 10:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=BA=97=E9=93=BA=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E9=80=89=E6=8B=A9=E5=BA=97=E9=93=BA=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/community.js | 3 ++ packages/storeManagement/index/index.vue | 45 ++++++++++++++++-------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/api/community.js b/api/community.js index ac6172ff..4f128427 100644 --- a/api/community.js +++ b/api/community.js @@ -54,4 +54,7 @@ export const apiArr = { checkComm: "/api/v2/wechat/community/check-comm", //检查小区是否属于当前用户 delPay: "/api/v2/wechat/community-order-pay/del", //检查小区是否属于当前用户 + + + getShopList: "/api/v2/wechat/merchant-crud-list/by-user", //根据用户获取商家列表 }; diff --git a/packages/storeManagement/index/index.vue b/packages/storeManagement/index/index.vue index a0fa00bd..07bfaa07 100644 --- a/packages/storeManagement/index/index.vue +++ b/packages/storeManagement/index/index.vue @@ -8,15 +8,15 @@ - + - 七个2锁城 - 衡水市上海公馆6A + {{ selectedShop.merchant_name }} + {{ selectedShop.address }} - + @@ -62,20 +62,20 @@ - 您有n个店铺的管理权限 + 您有{{ shopList.length }}个店铺的管理权限 - + - + - + - 七个2锁城 - 衡水市上海公馆6A + {{ item.merchant_name }} + {{ item.address }} - - + + @@ -108,6 +108,8 @@ export default { active: 1, show: false, show2: false, + shopList: [], + selectedShop: {}, baseList: [ { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png", @@ -130,10 +132,23 @@ export default { this.top = meun.top; // this.top = meun.height + meun.top; this.localHeight = meun.height; + this.getShopList(); }, methods: { + // 获取商家列表 + getShopList() { + request(apiArr.getShopList, 'POST', {}, { silent: false }).then(res => { + res.rows.map(item => { + item.album_images = picUrl + item.album_images; + }) + this.shopList = res.rows; + if (this.shopList.length > 0) { + this.selectedShop = this.shopList[0]; + } + }) + }, goWallet(type) { NavgateTo('/packages/storeManagement/wallet/index?type=' + type); }, @@ -148,11 +163,11 @@ export default { changeShow() { this.show = !this.show }, - changeShow2() { - this.show2 = !this.show + changeShow2(item) { + this.selectedShop = item; + this.show = false; }, click(item) { - console.log("🚀 ~ click ~ item:", item) // 根据item中的url进行跳转 if (item.url) { NavgateTo(item.url)