144 lines
3.1 KiB
Vue
144 lines
3.1 KiB
Vue
<template>
|
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" :up="upOption" @down="downCallback">
|
|
<view class="shop">
|
|
<view class="shop-menu">
|
|
<view class="shop-menu-item" v-for="(item, index) in list" :key="index">
|
|
<view style="width: 100%;">
|
|
<view class="flex">
|
|
<u-image width="120rpx" height="120rpx" border-radius="50%" :src="item.shopLogo"></u-image>
|
|
<view>
|
|
<view class="bold lg m-l-10">{{item.shopName}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="menu flex flex-wrap" v-if="item.rule">
|
|
<view class="bold item flex-col col-center m-b-20" v-for="(v, k) in item.rule" :key="k">
|
|
<router-link :to="{path: v.path, query: {lstore_id: item.lstore_id}}">
|
|
<u-image class="flex row-center" :src="aliOSSDomain + v.image" width="40rpx" height="40rpx"></u-image>
|
|
{{v.name}}
|
|
</router-link>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</mescroll-body>
|
|
</template>
|
|
|
|
<script>
|
|
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
|
|
import {
|
|
inBindList
|
|
} from "@/api/local_store"
|
|
import {mapGetters} from 'vuex'
|
|
export default {
|
|
mixins: [MescrollMixin],
|
|
data() {
|
|
return {
|
|
upOption: {
|
|
empty: {
|
|
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
|
|
tip: '暂无记录', // 提示
|
|
}
|
|
},
|
|
storeState: 1,
|
|
list: []
|
|
}
|
|
},
|
|
onLoad() {
|
|
},
|
|
methods: {
|
|
goPage(id) {
|
|
this.$Router.push({
|
|
path: '/bundle_b/pages/local_shop/local_shop_info?lstore_id=' + id
|
|
})
|
|
},
|
|
|
|
upCallback(page) {
|
|
const pageNum = page.num;
|
|
const pageSize = page.size;
|
|
inBindList({
|
|
page_size: pageSize,
|
|
page_no: pageNum,
|
|
}).then(({
|
|
data
|
|
}) => {
|
|
if (page.num == 1) this.list = [];
|
|
const curPageData = data.list;
|
|
const curPageLen = curPageData.length;
|
|
const hasNext = !!data.more;
|
|
this.list = this.list.concat(curPageData);
|
|
this.mescroll.endSuccess(curPageLen, hasNext);
|
|
}).catch(() => {
|
|
this.mescroll.endErr()
|
|
})
|
|
}
|
|
},
|
|
computed: {
|
|
...mapGetters(["userInfo"])
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.shop {
|
|
.shop-header {
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
top: 60rpx;
|
|
left: 30rpx;
|
|
|
|
& > view {
|
|
margin-left: 20rpx;
|
|
font-weight: bold;
|
|
font-size: 32rpx;
|
|
margin-top: 40rpx;
|
|
}
|
|
}
|
|
|
|
.shop-menu {
|
|
background-color: #F6F6F6;
|
|
padding: 20rpx 0;
|
|
|
|
.shop-menu-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background-color: #ffffff;
|
|
margin-bottom: 20rpx;
|
|
border-radius: 20rpx;
|
|
padding: 40rpx 12rpx;
|
|
|
|
view:first-child {
|
|
width: 100%;
|
|
}
|
|
|
|
.menu {
|
|
padding: 26rpx 0 0;
|
|
flex-wrap: wrap;
|
|
|
|
.assets-item {
|
|
flex: 1;
|
|
}
|
|
|
|
.item {
|
|
width: 25%;
|
|
}
|
|
|
|
.nav-icon {
|
|
width: 52rpx;
|
|
height: 52rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.submit-text {
|
|
text-align: center;
|
|
margin-top: 40rpx;
|
|
text-decoration: underline;
|
|
color: #FF2C3C;
|
|
}
|
|
</style> |