实现店铺管理的选择店铺的功能
This commit is contained in:
parent
6f655bed0b
commit
12f43b2dff
@ -54,4 +54,7 @@ export const apiArr = {
|
|||||||
checkComm: "/api/v2/wechat/community/check-comm", //检查小区是否属于当前用户
|
checkComm: "/api/v2/wechat/community/check-comm", //检查小区是否属于当前用户
|
||||||
|
|
||||||
delPay: "/api/v2/wechat/community-order-pay/del", //检查小区是否属于当前用户
|
delPay: "/api/v2/wechat/community-order-pay/del", //检查小区是否属于当前用户
|
||||||
|
|
||||||
|
|
||||||
|
getShopList: "/api/v2/wechat/merchant-crud-list/by-user", //根据用户获取商家列表
|
||||||
};
|
};
|
||||||
|
|||||||
@ -8,15 +8,15 @@
|
|||||||
|
|
||||||
<view class="community">
|
<view class="community">
|
||||||
<view class="community_left">
|
<view class="community_left">
|
||||||
<image mode="aspectFill" src="../../../static/logo.png" alt="" />
|
<image mode="aspectFill" :src="selectedShop.album_images" alt="" />
|
||||||
</view>
|
</view>
|
||||||
<view class="community_right" @click="changeShow">
|
<view class="community_right" @click="changeShow">
|
||||||
<view class="community_right_text">
|
<view class="community_right_text">
|
||||||
<view class="community_right_text1">七个2锁城</view>
|
<view class="community_right_text1">{{ selectedShop.merchant_name }}</view>
|
||||||
<view class="community_right_text2">衡水市上海公馆6A</view>
|
<view class="community_right_text2">{{ selectedShop.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="community_right_more">
|
<view class="community_right_more">
|
||||||
<u-icon bold color="#999999" size="30" name="arrow-right" @click="back"></u-icon>
|
<u-icon bold color="#999999" size="30" name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -62,20 +62,20 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="lines"></view>
|
<view class="lines"></view>
|
||||||
<view class="communityList">
|
<view class="communityList">
|
||||||
<view class="boxshadowCon_Text2">您有n个店铺的管理权限</view>
|
<view class="boxshadowCon_Text2">您有{{ shopList.length }}个店铺的管理权限</view>
|
||||||
<view style="width: 100%;height: 200rpx;">
|
<view style="width: 100%;height: 200rpx;">
|
||||||
<view class="communityItem" v-for="(item, index) in 8" :key="index">
|
<view class="communityItem" v-for="(item, index) in shopList" :key="index">
|
||||||
<view class="community_left">
|
<view class="community_left">
|
||||||
<image mode="aspectFill" src="../../../static/logo.png" alt="" />
|
<image mode="aspectFill" :src="item.album_images" alt="" />
|
||||||
</view>
|
</view>
|
||||||
<view class="community_right" @click="changeShow2">
|
<view class="community_right" @click="changeShow2(item)">
|
||||||
<view class="community_right_text">
|
<view class="community_right_text">
|
||||||
<view class="community_right_text1">七个2锁城</view>
|
<view class="community_right_text1">{{ item.merchant_name }}</view>
|
||||||
<view class="community_right_text2">衡水市上海公馆6A</view>
|
<view class="community_right_text2">{{ item.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="communityItem_radio">
|
<view class="communityItem_radio" @click="changeShow2(item)">
|
||||||
<radio></radio>
|
<radio :checked="selectedShop.merchant_name === item.merchant_name"></radio>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -108,6 +108,8 @@ export default {
|
|||||||
active: 1,
|
active: 1,
|
||||||
show: false,
|
show: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
|
shopList: [],
|
||||||
|
selectedShop: {},
|
||||||
baseList: [
|
baseList: [
|
||||||
{
|
{
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
|
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.top;
|
||||||
// this.top = meun.height + meun.top;
|
// this.top = meun.height + meun.top;
|
||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
|
this.getShopList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
methods: {
|
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) {
|
goWallet(type) {
|
||||||
NavgateTo('/packages/storeManagement/wallet/index?type=' + type);
|
NavgateTo('/packages/storeManagement/wallet/index?type=' + type);
|
||||||
},
|
},
|
||||||
@ -148,11 +163,11 @@ export default {
|
|||||||
changeShow() {
|
changeShow() {
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
changeShow2() {
|
changeShow2(item) {
|
||||||
this.show2 = !this.show
|
this.selectedShop = item;
|
||||||
|
this.show = false;
|
||||||
},
|
},
|
||||||
click(item) {
|
click(item) {
|
||||||
console.log("🚀 ~ click ~ item:", item)
|
|
||||||
// 根据item中的url进行跳转
|
// 根据item中的url进行跳转
|
||||||
if (item.url) {
|
if (item.url) {
|
||||||
NavgateTo(item.url)
|
NavgateTo(item.url)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user