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)