门店管理新增创建按钮
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<view class="lists">
|
||||
<block v-if="lists.length > 0">
|
||||
<view class="header-flex">
|
||||
门店数量{{total}}
|
||||
<view class="add-btn" @click="$Router.push({name: 'shopCreate'})">添加门店</view>
|
||||
</view>
|
||||
<view class="lists-item" v-for="(item, index) in lists" :key="index" @click="$Router.push({name: 'shopCreate', params: { id: item.store_id }})">
|
||||
<view class="header">
|
||||
<image class="logo" :src="item.cover" mode="aspectFill"></image>
|
||||
@@ -28,19 +32,37 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: []
|
||||
lists: [],
|
||||
total: 0
|
||||
};
|
||||
},
|
||||
onShow(){
|
||||
shops().then(res => {
|
||||
console.log(res)
|
||||
this.lists = res.data
|
||||
this.total = res.page.total
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 添加员工header
|
||||
.header-flex{
|
||||
background: white;
|
||||
padding: ($padding/2) $padding;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: $margin - 10;
|
||||
line-height: 60rpx;
|
||||
color: $text-gray;
|
||||
.add-btn{
|
||||
background: $mian-color;
|
||||
color: white;
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
}
|
||||
// 空提示
|
||||
.list-null{
|
||||
width: 100vw;
|
||||
|
||||
Reference in New Issue
Block a user